aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/indent_SUITE_data/src/guard_update.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2019-04-17 13:20:56 +0200
committerHans Bolinder <[email protected]>2019-05-07 08:25:03 +0200
commit77cbe3b6ced0ca42cf3ec5c8ca0333d9418a0372 (patch)
tree5e5e5f8785e10647ac62fb026134925ad64b053f /lib/dialyzer/test/indent_SUITE_data/src/guard_update.erl
parentb0a7495c44ebf6741714948bdf5c0cb9593ec953 (diff)
downloadotp-77cbe3b6ced0ca42cf3ec5c8ca0333d9418a0372.tar.gz
otp-77cbe3b6ced0ca42cf3ec5c8ca0333d9418a0372.tar.bz2
otp-77cbe3b6ced0ca42cf3ec5c8ca0333d9418a0372.zip
dialyzer: Add test cases with indentation
A smallish selection of already existing tests, run with the indentation option.
Diffstat (limited to 'lib/dialyzer/test/indent_SUITE_data/src/guard_update.erl')
-rw-r--r--lib/dialyzer/test/indent_SUITE_data/src/guard_update.erl18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/dialyzer/test/indent_SUITE_data/src/guard_update.erl b/lib/dialyzer/test/indent_SUITE_data/src/guard_update.erl
new file mode 100644
index 0000000000..19d0089401
--- /dev/null
+++ b/lib/dialyzer/test/indent_SUITE_data/src/guard_update.erl
@@ -0,0 +1,18 @@
+-module(guard_update).
+
+-export([t/0, t2/0]).
+
+t() ->
+ f(#{a=>2}). %% Illegal
+
+f(M)
+ when M#{b := 7} =/= q
+ -> ok.
+
+t2() ->
+ f2(#{a=>2}). %% Legal!
+
+f2(M)
+ when M#{b := 7} =/= q;
+ M =/= p
+ -> ok.