diff options
Diffstat (limited to 'lib/compiler/src')
-rw-r--r-- | lib/compiler/src/beam_ssa_type.erl | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/compiler/src/beam_ssa_type.erl b/lib/compiler/src/beam_ssa_type.erl index 4ea3781783..ede57875e2 100644 --- a/lib/compiler/src/beam_ssa_type.erl +++ b/lib/compiler/src/beam_ssa_type.erl @@ -1218,10 +1218,8 @@ t_tuple_size(#t_tuple{size=Size,exact=true}) -> t_tuple_size(_) -> none. -is_singleton_type(#t_atom{elements=[_]}) -> true; -is_singleton_type(#t_integer{elements={V,V}}) -> true; -is_singleton_type(nil) -> true; -is_singleton_type(_) -> false. +is_singleton_type(Type) -> + get_literal_from_type(Type) =/= none. %% join(Type1, Type2) -> Type %% Return the "join" of Type1 and Type2. The join is a more general |