diff options
author | Björn Gustavsson <[email protected]> | 2019-08-15 06:38:38 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-08-15 06:51:22 +0200 |
commit | 479eaa7cf2eb0701af7aeb4a94da5cd13ec7de67 (patch) | |
tree | f39ca8c29dfcf34978aaee859ba86e0be92f0aac /lib/compiler/test/beam_except_SUITE.erl | |
parent | 29852da8ef813ece12137e6477abed838c4d56c6 (diff) | |
download | otp-479eaa7cf2eb0701af7aeb4a94da5cd13ec7de67.tar.gz otp-479eaa7cf2eb0701af7aeb4a94da5cd13ec7de67.tar.bz2 otp-479eaa7cf2eb0701af7aeb4a94da5cd13ec7de67.zip |
Fix an internal consistency check failure caused by beam_except
https://bugs.erlang.org/browse/ERL-1026
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), |