diff options
author | Björn Gustavsson <[email protected]> | 2015-02-17 09:49:44 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-02-18 13:04:21 +0100 |
commit | b2eec25db0bca618853b163ea34c4f9f4ef7f3f1 (patch) | |
tree | c9de80ad9087052010562495265ae29c5826c364 | |
parent | 56300cb8f57c9ec3594cc00904b103bee9a4cc46 (diff) | |
download | otp-b2eec25db0bca618853b163ea34c4f9f4ef7f3f1.tar.gz otp-b2eec25db0bca618853b163ea34c4f9f4ef7f3f1.tar.bz2 otp-b2eec25db0bca618853b163ea34c4f9f4ef7f3f1.zip |
beam_utils: Correct test for has_map_fields in is_pure_test/1
The has_map_fields test was not recognized in is_pure_test/1,
because beam_a has rewritten the {list,_} part of instruction.
-rw-r--r-- | lib/compiler/src/beam_utils.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_utils.erl b/lib/compiler/src/beam_utils.erl index 26020e1d29..3249024854 100644 --- a/lib/compiler/src/beam_utils.erl +++ b/lib/compiler/src/beam_utils.erl @@ -187,7 +187,7 @@ is_pure_test({test,is_lt,_,[_,_]}) -> true; is_pure_test({test,is_nil,_,[_]}) -> true; is_pure_test({test,is_nonempty_list,_,[_]}) -> true; is_pure_test({test,test_arity,_,[_,_]}) -> true; -is_pure_test({test,has_map_fields,_,[_,{list,_}]}) -> true; +is_pure_test({test,has_map_fields,_,[_|_]}) -> true; is_pure_test({test,Op,_,Ops}) -> erl_internal:new_type_test(Op, length(Ops)). |