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 map with values of different types passes the checker #771
A list rejects mixed element types (KEXET-0438), but a map literal with mixed value types is accepted, and so is put with a value of another type.
main do
let ages = { "ada": 36, "bob": "old" }
IO.printLine(ages)
let more = { "ada": 36 }.put("bob", "old")
IO.printLine(more)
end
kex -C says No errors found., and both backends print { ada: 36, bob: old } twice.
Expected: the literal rejected as a list would be, and put rejected for a String value on a Map<String, Integer>. Otherwise code that reads ages.get("bob") as an Integer? gets a String.
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