diff options
Diffstat (limited to 'erts/emulator/test/bs_bincomp_SUITE.erl')
-rw-r--r-- | erts/emulator/test/bs_bincomp_SUITE.erl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/erts/emulator/test/bs_bincomp_SUITE.erl b/erts/emulator/test/bs_bincomp_SUITE.erl index c481e93e41..2dcebc2ef9 100644 --- a/erts/emulator/test/bs_bincomp_SUITE.erl +++ b/erts/emulator/test/bs_bincomp_SUITE.erl @@ -112,7 +112,14 @@ mixed(Config) when is_list(Config) -> [(X+Y) || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, <<Y:3>> <= <<1:3,2:3>>], [2,3,3,4,4,5,5,6] = [(X+Y) || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, Y <- [1,2]], - ok. + + %% OTP-16899: Nested binary comprehensions would fail to load. + <<0,1,0,2,0,3,99>> = mixed_nested([1,2,3]), + + ok. + +mixed_nested(L) -> + << << << << E:16 >> || E <- L >> || true >>/binary, 99:(id(8))>>. %% OTP-8179: Call tracing on binary comprehensions would cause a crash. tracing(Config) when is_list(Config) -> @@ -148,3 +155,8 @@ tracer(Parent, N) -> tracer(Parent, N+1) end end. + +%%% Common utilities. + +id(I) -> + I. |