File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
lib/elixir/lib/module/types Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -3363,10 +3363,10 @@ defmodule Module.Types.Descr do
33633363 true
33643364
33653365 # The keys is only in the negative map, and the positive map is closed
3366- # in that case, this field is not_set(), and its difference with the negative map type is empty iff
3367- # the negative type is optional.
3366+ # in that case, this field is not_set(), and its difference with the
3367+ # negative map type is empty iff the negative type is optional.
33683368 tag == :closed ->
3369- is_optional_static ( neg_type ) or map_line_empty? ( tag , fields , negs )
3369+ is_optional_static ( neg_type )
33703370
33713371 # There may be value in common
33723372 tag == :open ->
@@ -3391,6 +3391,9 @@ defmodule Module.Types.Descr do
33913391 neg_tag == :open ->
33923392 true
33933393
3394+ neg_tag == :closed and not is_optional_static ( type ) ->
3395+ false
3396+
33943397 true ->
33953398 # an absent key in a open negative map can be ignored
33963399 diff = difference ( type , neg_atom_default )
You can’t perform that action at this time.
0 commit comments