-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
non-boolean Missing
found in boolean context (1/2 union split): goto %44 if not _4::Union{Missing, Bool}
#457
Comments
Are you claiming this is a JET bug? (Without having looked at the code, the report seems plausible to me.) If not, wouldn't Julia itself be a better place to report this? |
It might also be worth noting that not all JET reports require action. Take this one as an example: inference can't prove that some call doesn't return julia> x = missing
missing
julia> if x
println("OK!")
end
ERROR: TypeError: non-boolean (Missing) used in boolean context
Stacktrace:
[1] top-level scope
@ REPL[2]:1 and JET doesn't like the fact that julia> begin
if !isa(x, Bool)
error("x should be a Bool, got $x")
end
if x
println("OK!")
end
end
ERROR: x should be a Bool, got missing
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] top-level scope
@ REPL[4]:3 But I think this is scarcely an improvement, so personally I would just ignore this report. |
Since I don't think there's any action needed, let's close this. |
The text was updated successfully, but these errors were encountered: