aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/receive_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-12-02 07:33:18 +0100
committerBjörn Gustavsson <[email protected]>2017-12-04 11:36:30 +0100
commitec1ef628c6582bd2666031105c11ecdbd0b67211 (patch)
treebe7dab12a06ea99b8a71a6fbdc076c64511206e2 /lib/compiler/test/receive_SUITE.erl
parent2151b54d4d55291703ff95c4e7dfed23fc2b07c5 (diff)
downloadotp-ec1ef628c6582bd2666031105c11ecdbd0b67211.tar.gz
otp-ec1ef628c6582bd2666031105c11ecdbd0b67211.tar.bz2
otp-ec1ef628c6582bd2666031105c11ecdbd0b67211.zip
Fix number of values for 'after infinity' clause
We used to not care about the number of values returned from the 'after infinity' clause in a receive (because it could never be executed). It is time to start caring because this will cause problem when we will soon start to do some more aggressive optimizizations.
Diffstat (limited to 'lib/compiler/test/receive_SUITE.erl')
-rw-r--r--lib/compiler/test/receive_SUITE.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/compiler/test/receive_SUITE.erl b/lib/compiler/test/receive_SUITE.erl
index 8304672558..3001bb421b 100644
--- a/lib/compiler/test/receive_SUITE.erl
+++ b/lib/compiler/test/receive_SUITE.erl
@@ -265,6 +265,10 @@ export(Config) when is_list(Config) ->
self() ! {result,Ref,42},
42 = export_1(Ref),
{error,timeout} = export_1(Ref),
+
+ self() ! {result,Ref},
+ {ok,Ref} = export_2(),
+
ok.
export_1(Reference) ->
@@ -281,6 +285,10 @@ export_1(Reference) ->
id({build,self()}),
Result.
+export_2() ->
+ receive {result,Result} -> ok end,
+ {ok,Result}.
+
wait(Config) when is_list(Config) ->
self() ! <<42>>,
<<42>> = wait_1(r, 1, 2),