diff options
author | Björn Gustavsson <[email protected]> | 2019-08-16 13:19:00 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2019-08-16 13:19:00 +0200 |
commit | a536cb2201d7d0d35408799a0f126afd7064a1c3 (patch) | |
tree | 825135525b6243d18a8e3f8b8053fc44427c3ebb /lib/compiler/test/beam_except_SUITE.erl | |
parent | 062c4d68a6d18b399714c477d329093dec10aedf (diff) | |
parent | 479eaa7cf2eb0701af7aeb4a94da5cd13ec7de67 (diff) | |
download | otp-a536cb2201d7d0d35408799a0f126afd7064a1c3.tar.gz otp-a536cb2201d7d0d35408799a0f126afd7064a1c3.tar.bz2 otp-a536cb2201d7d0d35408799a0f126afd7064a1c3.zip |
Merge pull request #2349 from bjorng/bjorn/compiler/fix-beam_except/ERL-1026/OTP-15985
Fix an internal consistency check failure caused by beam_except
Diffstat (limited to 'lib/compiler/test/beam_except_SUITE.erl')
-rw-r--r-- | lib/compiler/test/beam_except_SUITE.erl | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/compiler/test/beam_except_SUITE.erl b/lib/compiler/test/beam_except_SUITE.erl index 67947dc292..f52239f2a8 100644 --- a/lib/compiler/test/beam_except_SUITE.erl +++ b/lib/compiler/test/beam_except_SUITE.erl @@ -72,11 +72,25 @@ bs_get_tail(Config) -> {function_clause, [{?MODULE,bs_get_tail_1,[<<>>,0,0,Config],_}|_]}} = (catch bs_get_tail_1(id(<<>>), 0, 0, Config)), + + ok = bs_get_tail_2(<<"W">>, <<"X">>, <<"Z">>), + ok = bs_get_tail_2(<<"M">>, <<"X">>, <<"Z">>), + {'EXIT', + {function_clause, + [{?MODULE,do_get_bs_tail_2,[<<"A">>,<<"B">>,[],<<"C">>],_}|_]}} = + (catch bs_get_tail_2(<<"A">>, <<"B">>, <<"C">>)), + ok. bs_get_tail_1(<<_:32, Rest/binary>>, Z1, Z2, F1) -> {Rest,Z1,Z2,F1}. +bs_get_tail_2(A, B, C) -> + do_get_bs_tail_2(A, B, [], C). + +do_get_bs_tail_2(<<"W">>, <<"X">>, _, <<"Z">>) -> ok; +do_get_bs_tail_2(<<"M">>, <<"X">>, _, <<"Z">>) -> ok. + coverage(_) -> File = {file,"fake.erl"}, ok = fc(a), |