aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/indent_SUITE_data/src/rec/rec_use.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2019-05-07 08:25:56 +0200
committerHans Bolinder <[email protected]>2019-05-07 08:25:56 +0200
commit1a2259e01e8f8e000a1d8f93a9446c996c148325 (patch)
tree57c71e5fb661d26074b5faf0902fc9625323586e /lib/dialyzer/test/indent_SUITE_data/src/rec/rec_use.erl
parentfb9cd9534b94fe8c24bc5412205dd97577894b59 (diff)
parentc2cd09c3d6807d2e93d117d9c6b47a706a50c763 (diff)
downloadotp-1a2259e01e8f8e000a1d8f93a9446c996c148325.tar.gz
otp-1a2259e01e8f8e000a1d8f93a9446c996c148325.tar.bz2
otp-1a2259e01e8f8e000a1d8f93a9446c996c148325.zip
Merge branch 'hasse/dialyzer/prettier_warnings/OTP-15135'
* hasse/dialyzer/prettier_warnings/OTP-15135: dialyzer: Remove quotes around operators dialyzer: Add test cases with indentation dialyzer: Add an --no_indentation option dialyzer: Add parentheses around annotated union elements dialyzer: Fix dialyzer_dataflow:format_args_1()
Diffstat (limited to 'lib/dialyzer/test/indent_SUITE_data/src/rec/rec_use.erl')
-rw-r--r--lib/dialyzer/test/indent_SUITE_data/src/rec/rec_use.erl30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/dialyzer/test/indent_SUITE_data/src/rec/rec_use.erl b/lib/dialyzer/test/indent_SUITE_data/src/rec/rec_use.erl
new file mode 100644
index 0000000000..358e9f918c
--- /dev/null
+++ b/lib/dialyzer/test/indent_SUITE_data/src/rec/rec_use.erl
@@ -0,0 +1,30 @@
+-module(rec_use).
+
+-export([ok1/0, ok2/0, wrong1/0, wrong2/0, wrong3/0, wrong4/0]).
+
+ok1() ->
+ rec_adt:set_a(rec_adt:new(), foo).
+
+ok2() ->
+ R1 = rec_adt:new(),
+ B1 = rec_adt:get_b(R1),
+ R2 = rec_adt:set_b(R1, 42),
+ B2 = rec_adt:get_b(R2),
+ B1 =:= B2.
+
+wrong1() ->
+ case rec_adt:new() of
+ {rec, _, 42} -> weird1;
+ R when tuple_size(R) =:= 3 -> weird2
+ end.
+
+wrong2() ->
+ R = list_to_tuple([rec, a, 42]),
+ rec_adt:get_a(R).
+
+wrong3() ->
+ R = rec_adt:new(),
+ R =:= {rec, gazonk, 42}.
+
+wrong4() ->
+ tuple_size(rec_adt:new()).