Existing issue
Elixir and Erlang/OTP versions
Erlang/OTP 28 [erts-16.4.0.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Interactive Elixir (1.21.0-dev)
Operating system
any
Current behavior
Let's create equal types t and t2 by identity t2 = cover \ (cover \ t) with cover = t u knife
Repro:
t = closed_map([a: term()])
knife = open_map([c: none()])
cover = opt_union(t, knife)
t2 = opt_difference(cover, opt_difference(cover, t))
equal?(t, t2) # true
map_fetch_key(t, :a) # {false, :term}, correct
map_fetch_key(t2, :a) # :badkey, wrong
t representation
%{map: {-97320740, :closed, [a: :term]}}
t2 representation
%{
map: {2486087065, {-97320740, :closed, [a: :term]}, :bdd_top,
{105403943, :open, [c: %{}]}, :bdd_bot}
}
Related to #15491
Expected behavior
Result should be the same regardless of representation
Existing issue
Elixir and Erlang/OTP versions
Erlang/OTP 28 [erts-16.4.0.1] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit]
Interactive Elixir (1.21.0-dev)
Operating system
any
Current behavior
Let's create equal types
tandt2by identityt2 = cover \ (cover \ t)withcover = t u knifeRepro:
trepresentationt2representationRelated to #15491
Expected behavior
Result should be the same regardless of representation