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
A literal pattern or == with a value of an unrelated type passes the checker #773
A String literal arm in a match on an Integer, and == between an Integer and a String, are both accepted, though neither can ever be true.
let name(n: Integer) -> String do
match n do
"one" => "1"
_ => "other"
end
end
main do
IO.printLine(name(1))
IO.printLine(1 == "1")
end
kex -C says No errors found., and both backends print other and false.
The same mistakes with optionals and constructors are rejected: KEXET-0494 for String? == String, and KEXET-0113 for another type's constructor in a pattern. Expected the same for literals and for == between unrelated types.
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