aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/erl_pp_SUITE.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2015-11-17 14:09:59 +0100
committerHans Bolinder <[email protected]>2015-12-07 09:41:25 +0100
commitb8a5a201389c117aaa8ddfa387dcb11fb6f5ae4a (patch)
tree8186e2248f56ae30d8b24544d5f5a7b04cb080c2 /lib/stdlib/test/erl_pp_SUITE.erl
parent0ad8b47ce2ec578eab64896a3ba8af3f71ce2fd1 (diff)
downloadotp-b8a5a201389c117aaa8ddfa387dcb11fb6f5ae4a.tar.gz
otp-b8a5a201389c117aaa8ddfa387dcb11fb6f5ae4a.tar.bz2
otp-b8a5a201389c117aaa8ddfa387dcb11fb6f5ae4a.zip
stdlib: Correct pretty-printing of map types
Add parentheses around annotated type union elements in map pair types. The bug was introduced in Erlang/OTP 18.0.
Diffstat (limited to 'lib/stdlib/test/erl_pp_SUITE.erl')
-rw-r--r--lib/stdlib/test/erl_pp_SUITE.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stdlib/test/erl_pp_SUITE.erl b/lib/stdlib/test/erl_pp_SUITE.erl
index 389fd059f6..92e2764c65 100644
--- a/lib/stdlib/test/erl_pp_SUITE.erl
+++ b/lib/stdlib/test/erl_pp_SUITE.erl
@@ -960,6 +960,9 @@ maps_syntax(Config) when is_list(Config) ->
"-compile(export_all).\n"
"-type t1() :: map().\n"
"-type t2() :: #{ atom() => integer(), atom() => float() }.\n"
+ "-type u() :: #{a => (I :: integer()) | (A :: atom()),\n"
+ " (X :: atom()) | (Y :: atom()) =>\n"
+ " (I :: integer()) | (A :: atom())}.\n"
"-spec f1(t1()) -> 'true'.\n"
"f1(M) when is_map(M) -> true.\n"
"-spec f2(t2()) -> integer().\n"