diff options
author | Björn Gustavsson <[email protected]> | 2019-05-22 13:01:10 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2019-05-22 13:01:10 +0200 |
commit | 500f4f6b01efc215aa46455e82b8addbbd25f4b1 (patch) | |
tree | 60ae7400edc182c97f4f33293e2f74146c01b793 /lib/compiler/src | |
parent | c8230dde231c3d7cc6807714eb46741006f792b8 (diff) | |
parent | 119e72d3e766089dc7347b75d0530b0c626cff93 (diff) | |
download | otp-500f4f6b01efc215aa46455e82b8addbbd25f4b1.tar.gz otp-500f4f6b01efc215aa46455e82b8addbbd25f4b1.tar.bz2 otp-500f4f6b01efc215aa46455e82b8addbbd25f4b1.zip |
Merge pull request #2236 from bjorng/bjorn/compiler/fix-fun-duplication
Fix compiler crash when funs were matched
OTP-15833
Diffstat (limited to 'lib/compiler/src')
-rw-r--r-- | lib/compiler/src/v3_core.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl index 3699c9d22e..007a0247f4 100644 --- a/lib/compiler/src/v3_core.erl +++ b/lib/compiler/src/v3_core.erl @@ -1811,7 +1811,8 @@ force_safe(Ce, St0) -> is_safe(#c_cons{}) -> true; is_safe(#c_tuple{}) -> true; -is_safe(#c_var{}) -> true; +is_safe(#c_var{name={_,_}}) -> false; %Fun. Not safe. +is_safe(#c_var{name=_}) -> true; %Ordinary variable. is_safe(#c_literal{}) -> true; is_safe(_) -> false. |