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
{{ message }}
Repository navigation
return Error(...) passes the checker in a function declared to return Integer #768
A return of an Error is not checked against a plain return type.
let parse(text: String) -> Integer do
return Error("bad") if text.empty?
1
end
main do
IO.printLine(parse("") + 1)
end
kex -C: No errors found.
kex -R: runtime error: cannot add Result<?, String> and Integer at the + 1.
kex (BEAM): Internal error: badarith
The checker believes parse answers an Integer, so the Error comes out at the caller. Expected: KEXET-0124, as for return "text" in the same place. This may be the postfix-return case from #723 again, but with a constructor in place of a literal.
Seen on kex 0.4.0-rc.4 built from main at 371bbdf, and on 5773911. Found while writing explanations for oops.kex.run.
Activity