diff options
author | Björn Gustavsson <[email protected]> | 2016-05-10 15:10:31 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-05-13 10:52:25 +0200 |
commit | f36d67e637e2a3346384902a8499c8317a1a5ecc (patch) | |
tree | 5f0cd2bb4c6ad00ae074d61dbbce54361509c886 /lib/compiler/src | |
parent | 467c4e5d198e0c4b9262c8e150a572050071ad41 (diff) | |
download | otp-f36d67e637e2a3346384902a8499c8317a1a5ecc.tar.gz otp-f36d67e637e2a3346384902a8499c8317a1a5ecc.tar.bz2 otp-f36d67e637e2a3346384902a8499c8317a1a5ecc.zip |
beam_utils: Correct translation of BIFs to tests
Two lines were never covered, because '[]' was used instead of 'nil'.
Diffstat (limited to 'lib/compiler/src')
-rw-r--r-- | lib/compiler/src/beam_utils.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_utils.erl b/lib/compiler/src/beam_utils.erl index 37f89dd677..d187a180de 100644 --- a/lib/compiler/src/beam_utils.erl +++ b/lib/compiler/src/beam_utils.erl @@ -164,10 +164,10 @@ bif_to_test('=<', [A,B], Fail) -> {test,is_ge,Fail,[B,A]}; bif_to_test('>', [A,B], Fail) -> {test,is_lt,Fail,[B,A]}; bif_to_test('<', [_,_]=Ops, Fail) -> {test,is_lt,Fail,Ops}; bif_to_test('>=', [_,_]=Ops, Fail) -> {test,is_ge,Fail,Ops}; -bif_to_test('==', [A,[]], Fail) -> {test,is_nil,Fail,[A]}; +bif_to_test('==', [A,nil], Fail) -> {test,is_nil,Fail,[A]}; bif_to_test('==', [_,_]=Ops, Fail) -> {test,is_eq,Fail,Ops}; bif_to_test('/=', [_,_]=Ops, Fail) -> {test,is_ne,Fail,Ops}; -bif_to_test('=:=', [A,[]], Fail) -> {test,is_nil,Fail,[A]}; +bif_to_test('=:=', [A,nil], Fail) -> {test,is_nil,Fail,[A]}; bif_to_test('=:=', [_,_]=Ops, Fail) -> {test,is_eq_exact,Fail,Ops}; bif_to_test('=/=', [_,_]=Ops, Fail) -> {test,is_ne_exact,Fail,Ops}; bif_to_test(is_record, [_,_,_]=Ops, Fail) -> {test,is_record,Fail,Ops}. |