You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This one is really weird. It happens only if the let block in question is on the rhs of an assignment, otherwise it works just fine:
julia> a =let@generatedf(x) =1f(1)
end
ERROR: MethodError: no method matching #s24#27(::Type{var"#f#28"}, ::Type{Int64})
The applicable method may be too new: running in world age 28483, while current world is 28484.
Closest candidates are:#s24#27(::Any, ::Any) at none:0 (method too new to be called from this world context.)
Stacktrace:
[1] (::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any, N}where N)
@ Core ./boot.jl:556
[2] top-level scope
@ REPL[14]:3
julia>let@generatedf(x) =1f(1)
end1
It's also interesting what happens if I use if @generated for f:
julia> a =letf(x) =if@generated() 1elseerror() endf(1)
end
ERROR:
Stacktrace:
[1] error()
@ Base ./error.jl:42
[2] (::var"#f#24")(x::Int64)
@ Main ./REPL[12]:2
[3] top-level scope
@ REPL[12]:3
julia>letf(x) =if@generated() 1elseerror() endf(1)
end1
That it's a worldage error is what probably confuses me the most. I would have thought this could be an issue during lowering, but perhaps it occurs later on?
cc: @mcabbott
The text was updated successfully, but these errors were encountered:
@JeffBezanson Any ideas why the produced lowered code would be so different here? (left one is just with a = in front, right one without) It seems to happen somewhere after form expansion at least.
This one is really weird. It happens only if the
let
block in question is on the rhs of an assignment, otherwise it works just fine:It's also interesting what happens if I use
if @generated
forf
:That it's a worldage error is what probably confuses me the most. I would have thought this could be an issue during lowering, but perhaps it occurs later on?
cc: @mcabbott
The text was updated successfully, but these errors were encountered: