We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7765fea commit f541e71Copy full SHA for f541e71
lib/elixir/test/elixir/module/types/descr_test.exs
@@ -135,6 +135,18 @@ defmodule Module.Types.DescrTest do
135
# Test union of open map and map with domain key
136
assert union(open_map(), open_map([{domain_key(:integer), atom()}]))
137
|> equal?(open_map())
138
+
139
+ # Ensure no duplicate, no matter the order
140
+ assert union(
141
+ open_map(a: integer()),
142
+ open_map(a: number(), b: binary())
143
+ )
144
+ |> union(open_map(a: integer())) ==
145
+ union(
146
+ open_map(a: number(), b: binary()),
147
+ open_map(a: integer())
148
149
+ |> union(open_map(a: integer()))
150
end
151
152
test "list" do
0 commit comments