aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorMichal Muskala <[email protected]>2017-04-21 18:38:10 +0200
committerMichal Muskala <[email protected]>2017-04-22 10:00:05 +0200
commitc3e1aebf3319eaa4c617560f29bf81a697473d07 (patch)
tree00531939bedc48f8a086f16582fa8c3c18086120 /lib/compiler/test
parent52744948f4bbe85dee428cefdf9d205665a57b18 (diff)
downloadotp-c3e1aebf3319eaa4c617560f29bf81a697473d07.tar.gz
otp-c3e1aebf3319eaa4c617560f29bf81a697473d07.tar.bz2
otp-c3e1aebf3319eaa4c617560f29bf81a697473d07.zip
Make beam_validator track type formation for binary operations
Fixes https://bugs.erlang.org/browse/ERL-406 - a bug introduced in 0377592dc2238f561291be854d2ce859dd9a5fb1
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/beam_type_SUITE.erl11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/compiler/test/beam_type_SUITE.erl b/lib/compiler/test/beam_type_SUITE.erl
index 7ca544a537..c11883d5ff 100644
--- a/lib/compiler/test/beam_type_SUITE.erl
+++ b/lib/compiler/test/beam_type_SUITE.erl
@@ -22,7 +22,7 @@
-export([all/0,suite/0,groups/0,init_per_suite/1,end_per_suite/1,
init_per_group/2,end_per_group/2,
integers/1,coverage/1,booleans/1,setelement/1,cons/1,
- tuple/1,record_float/1]).
+ tuple/1,record_float/1,binary_float/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -38,7 +38,8 @@ groups() ->
setelement,
cons,
tuple,
- record_float
+ record_float,
+ binary_float
]}].
init_per_suite(Config) ->
@@ -143,6 +144,12 @@ record_float(R, N0) ->
N
end.
+binary_float(_Config) ->
+ <<-1/float>> = binary_negate_float(<<1/float>>),
+ ok.
+
+binary_negate_float(<<Float/float>>) ->
+ <<-Float/float>>.
id(I) ->
I.