diff options
author | Björn Gustavsson <[email protected]> | 2014-01-20 10:22:14 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2014-01-20 10:22:14 +0100 |
commit | 7ba68e1dc45981a82ccec84d157699606d664431 (patch) | |
tree | bc9ce3249e7e47f614368a2a7044480af9748daf /erts/emulator/test | |
parent | e19b19ceeabff388fb53df46298a5c81f171a8bc (diff) | |
parent | 8c39400c7fb03f3dd7d9dbfb01c43e5e91d7086c (diff) | |
download | otp-7ba68e1dc45981a82ccec84d157699606d664431.tar.gz otp-7ba68e1dc45981a82ccec84d157699606d664431.tar.bz2 otp-7ba68e1dc45981a82ccec84d157699606d664431.zip |
Merge branch 'bjorn/fix-line-number-in-bs-exception/OTP-11572'
* bjorn/fix-line-number-in-bs-exception/OTP-11572:
compiler: Correct line number in exception from binary construction
Diffstat (limited to 'erts/emulator/test')
-rw-r--r-- | erts/emulator/test/exception_SUITE.erl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/erts/emulator/test/exception_SUITE.erl b/erts/emulator/test/exception_SUITE.erl index 109cec25cb..09a7a87a9a 100644 --- a/erts/emulator/test/exception_SUITE.erl +++ b/erts/emulator/test/exception_SUITE.erl @@ -589,6 +589,13 @@ line_numbers(Config) when is_list(Config) -> [{file,ModFile},{line,_}]}|_]}} = (catch build_binary2(8, bad_binary)), + <<"abc",357:16>> = build_binary3(<<"abc">>), + {'EXIT',{badarg,[{?MODULE,build_binary3,1, + [{file,"bit_syntax.erl"},{line,72511}]}, + {?MODULE,line_numbers,1, + [{file,ModFile},{line,_}]}|_]}} = + (catch build_binary3(no_binary)), + {'EXIT',{function_clause, [{?MODULE,do_call_abs,[y,y], [{file,"gc_bif.erl"},{line,18}]}, @@ -691,6 +698,10 @@ build_binary2(Size, Bin) -> %Line 72505 id(0), %Line 72506 <<7:Size,Bin/binary>>. %Line 72507 +build_binary3(Bin) -> %Line 72509 + id(0), %Line 72510 + <<Bin/binary,357:16>>. %Line 72511 + -file("gc_bif.erl", 17). do_call_abs(x, Arg) -> %Line 18 abs(Arg). %Line 19 |