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
julia> function foo(x::Integer, y::Bool=(x isa Int))
if y
x * "string"
else
x + one(x)
end
end
foo (generic function with 2 methods)
julia> @report_call foo(0x01)
═════ 1 possible error found ═════
┌ @ REPL[4]:2 #self#(x, Main.isa(x, Main.Int))
│┌ @ REPL[4]:3 Main.*(x, "string")
││ no matching method found for call signature (Tuple{typeof(*), UInt8, String}): Main.*(x::UInt8, "string")
│└─────────────
The error showed can in fact never happen, since in the call f(0x01), y statically should resolve to false.
I have no idea whether this kind of constant prop is feasible, either in Julia's compiler itself, or in JET.
This is on Julia 1.7-rc1.
The text was updated successfully, but these errors were encountered:
Minimal example
The error showed can in fact never happen, since in the call
f(0x01)
,y
statically should resolve tofalse
.I have no idea whether this kind of constant prop is feasible, either in Julia's compiler itself, or in JET.
This is on Julia 1.7-rc1.
The text was updated successfully, but these errors were encountered: