Elixir and Erlang/OTP versions
Elixir 1.20.0-rc.4 (89e0106) (compiled with Erlang/OTP 28)
Operating system
MacOS
Current behavior
Issue with how map_get is computed when there are negations. Repro:
base = open_map([{domain_key(:atom), term()}])
bad = open_map(a: if_set(negation(integer())))
map = negation(union(negation(base), bad))
assert equal?(map, open_map(a: integer()))
{:ok, type} = map_get(map, atom())
assert equal?(type, term())
# currently returns integer()
{:ok, type} = map_get(map, atom([:a]))
assert equal?(type, term())
# currently errors
Expected behavior
Since map is equivalent to open_map(a: integer()), lookup by atom() should return term(), and lookup by :a should return integer().
Elixir and Erlang/OTP versions
Elixir 1.20.0-rc.4 (89e0106) (compiled with Erlang/OTP 28)
Operating system
MacOS
Current behavior
Issue with how
map_getis computed when there are negations. Repro:Expected behavior
Since map is equivalent to
open_map(a: integer()), lookup byatom()should returnterm(), and lookup by:ashould returninteger().