-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:inferenceType inferenceType inference
Description
MWE:
using Base.Experimental: @opaque
some_method(x) = 2x
make_oc() = @opaque (x::Int)->some_method(x)
function foo()
f = make_oc()
println(Core.stdout, "Hello, world! ", f(1)) # fine
println(Core.stdout, "Hello, world! ", f()) # errors in type-inference
end
foo()
This code leads to an AssertionError
in inference:
AssertionError(msg="invalid `given_argtypes` for `mi`")
va_process_argtypes at ./compiler/inferenceresult.jl:123
InferenceState at ./compiler/inferencestate.jl:310
InferenceState at ./compiler/inferencestate.jl:546
typeinf_edge at ./compiler/typeinfer.jl:911
abstract_call_method at ./compiler/abstractinterpretation.jl:744
abstract_call_opaque_closure at ./compiler/abstractinterpretation.jl:2290
...
Occurs on nightly (but not 1.10 or 1.11):
Julia Version 1.12.0-DEV.1108
Commit 378f1920db0 (2024-08-28 15:58 UTC)
Build Info:
Official https://julialang.org release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 12 × 12th Gen Intel(R) Core(TM) i7-1255U
WORD_SIZE: 64
LLVM: libLLVM-18.1.7 (ORCJIT, alderlake)
Threads: 1 default, 0 interactive, 1 GC (on 12 virtual cores)
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:inferenceType inferenceType inference