aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2019-01-15 16:31:36 +0100
committerJohn Högberg <[email protected]>2019-01-21 07:49:21 +0100
commitcb4f08d8e6ebed95a0cec282a01e8b6c7972a2d3 (patch)
tree075c9f2e4ac5f169cc1165bceca06acfa5e11983 /lib
parentcf334a67dbda6f51a09f58eebf856408463c11a5 (diff)
downloadotp-cb4f08d8e6ebed95a0cec282a01e8b6c7972a2d3.tar.gz
otp-cb4f08d8e6ebed95a0cec282a01e8b6c7972a2d3.tar.bz2
otp-cb4f08d8e6ebed95a0cec282a01e8b6c7972a2d3.zip
beam_validator: Handle aliased registers during type inference
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/src/beam_validator.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index 3d53054f69..4943538809 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -1346,14 +1346,14 @@ select_val_branches_1([], _, Vst) -> Vst.
infer_types(Src, Vst) ->
case get_def(Src, Vst) of
{bif,is_map,{f,_},[Map],_} ->
- fun({atom,true}, S) -> set_type_reg(map, Map, S);
+ fun({atom,true}, S) -> set_aliased_type(map, Map, S);
(_, S) -> S
end;
{bif,tuple_size,{f,_},[Tuple],_} ->
fun({integer,Arity}, S) ->
Type0 = get_term_type(Tuple, S),
Type = upgrade_tuple_type({tuple,Arity}, Type0),
- set_type(Type, Tuple, S);
+ set_aliased_type(Type, Tuple, S);
(_, S) -> S
end;
{bif,'=:=',{f,_},[ArityReg,{integer,_}=Val],_} when ArityReg =/= Src ->