aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-07-30 10:14:16 +0200
committerBjörn Gustavsson <[email protected]>2019-07-30 10:24:39 +0200
commitbce995b034452abe200edc2381bc313ff12a0f2f (patch)
tree2948077a4984c2ed00c5707f6575bb04856fd826 /lib/compiler/src
parent478488a2e75e8e73b8dfc7b6f22fd1f0bfbc04eb (diff)
downloadotp-bce995b034452abe200edc2381bc313ff12a0f2f.tar.gz
otp-bce995b034452abe200edc2381bc313ff12a0f2f.tar.bz2
otp-bce995b034452abe200edc2381bc313ff12a0f2f.zip
Eliminate a crash in the type optimizer pass
https://bugs.erlang.org/browse/ERL-1013
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/beam_ssa_type.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_ssa_type.erl b/lib/compiler/src/beam_ssa_type.erl
index 68920e7dd3..3c06c83e2e 100644
--- a/lib/compiler/src/beam_ssa_type.erl
+++ b/lib/compiler/src/beam_ssa_type.erl
@@ -160,6 +160,10 @@ opt_finish_1([Arg | Args], [TypeMap | TypeMaps], ParamInfo0) ->
case join(maps:values(TypeMap)) of
any ->
opt_finish_1(Args, TypeMaps, ParamInfo0);
+ none ->
+ %% This function will never be called. Pretend that we don't
+ %% know the type for this argument.
+ opt_finish_1(Args, TypeMaps, ParamInfo0);
JoinedType ->
JoinedType = verified_type(JoinedType),
ParamInfo = ParamInfo0#{ Arg => validator_anno(JoinedType) },