-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Description
julia> using GPUCompiler
julia> function foo end
foo (generic function with 0 methods)
julia> methodinstance(Base._stable_typeof(foo), Base.to_tuple_type(()))
ERROR: MethodError: no method matching foo()
Stacktrace:
[1] macro expansion
@ GPUCompiler ~/.julia/packages/GPUCompiler/U36Ed/src/jlgen.jl:0 [inlined]
[2] methodinstance(ft::Type{typeof(foo)}, tt::Type{Tuple{}})
@ GPUCompiler ~/.julia/packages/GPUCompiler/U36Ed/src/jlgen.jl:123
[3] top-level scope
@ REPL[3]:1
julia> foo() = nothing
foo (generic function with 1 method)
julia> methodinstance(Base._stable_typeof(foo), Base.to_tuple_type(()))
ERROR: MethodError: no method matching foo()
The applicable method may be too new: running in world age 25447, while current world is 25448.
Closest candidates are:
foo() (method too new to be called from this world context.)
@ Main REPL[4]:1
Stacktrace:
[1] macro expansion
@ GPUCompiler ~/.julia/packages/GPUCompiler/U36Ed/src/jlgen.jl:0 [inlined]
[2] methodinstance(ft::Type{typeof(foo)}, tt::Type{Tuple{}})
@ GPUCompiler ~/.julia/packages/GPUCompiler/U36Ed/src/jlgen.jl:123
[3] top-level scope
@ REPL[5]:1
If I had made no mistake and defined the method before calling methodinstance
:
julia> using GPUCompiler
julia> function foo end
foo (generic function with 0 methods)
julia> foo() = nothing
foo (generic function with 1 method)
julia> methodinstance(Base._stable_typeof(foo), Base.to_tuple_type(())).def
foo()
@ Main REPL[3]:1
julia> foo() = nothing
foo (generic function with 1 method)
julia> methodinstance(Base._stable_typeof(foo), Base.to_tuple_type(())).def
foo()
@ Main REPL[5]:1
Metadata
Metadata
Assignees
Labels
No labels