diff options
author | Björn Gustavsson <[email protected]> | 2018-08-09 14:02:07 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-08-09 14:02:07 +0200 |
commit | 60eefb225ac90dadd6afaf116a1ca572e53aa6fd (patch) | |
tree | cc87bc835b8ffd99a4699f43feba6b375652bb77 /lib/compiler/test/core_fold_SUITE.erl | |
parent | 2c19a6010e9576e1979216863b5f63ebe302bf69 (diff) | |
parent | 4dcc640791674ee7d28fb2e29a064175ceb46f2a (diff) | |
download | otp-60eefb225ac90dadd6afaf116a1ca572e53aa6fd.tar.gz otp-60eefb225ac90dadd6afaf116a1ca572e53aa6fd.tar.bz2 otp-60eefb225ac90dadd6afaf116a1ca572e53aa6fd.zip |
Merge branch 'maint'
* maint:
Fix side-effect optimization when compiling from Core Erlang
Conflicts:
lib/compiler/src/sys_core_fold.erl
Diffstat (limited to 'lib/compiler/test/core_fold_SUITE.erl')
-rw-r--r-- | lib/compiler/test/core_fold_SUITE.erl | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/lib/compiler/test/core_fold_SUITE.erl b/lib/compiler/test/core_fold_SUITE.erl index aa357dbc9c..30d145582a 100644 --- a/lib/compiler/test/core_fold_SUITE.erl +++ b/lib/compiler/test/core_fold_SUITE.erl @@ -28,7 +28,7 @@ mixed_matching_clauses/1,unnecessary_building/1, no_no_file/1,configuration/1,supplies/1, redundant_stack_frame/1,export_from_case/1, - empty_values/1]). + empty_values/1,cover_letrec_effect/1]). -export([foo/0,foo/1,foo/2,foo/3]). @@ -48,7 +48,7 @@ groups() -> mixed_matching_clauses,unnecessary_building, no_no_file,configuration,supplies, redundant_stack_frame,export_from_case, - empty_values]}]. + empty_values,cover_letrec_effect]}]. init_per_suite(Config) -> @@ -615,5 +615,25 @@ empty_values(_Config) -> do_empty_values() when (#{})#{} -> c. +cover_letrec_effect(_Config) -> + self() ! {tag,42}, + _ = try + try + ignore + after + receive + {tag,Int}=Term -> + Res = #{k => {Term,<<Int:16>>}}, + self() ! Res + end + end + after + ok + end, + receive + Any -> + #{k := {{tag,42},<<42:16>>}} = Any + end, + ok. id(I) -> I. |