aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2019-06-04 14:09:38 +0200
committerHans Bolinder <[email protected]>2019-06-04 14:13:25 +0200
commit6b8b77173b426cecadd94c04c2c6d904569936a7 (patch)
tree481d9d113f054bc10acfbc999672a346f346431a /lib/dialyzer/src/dialyzer.erl
parentabbe8d424676a473bcebdf3b97996ac7a5a70f16 (diff)
downloadotp-6b8b77173b426cecadd94c04c2c6d904569936a7.tar.gz
otp-6b8b77173b426cecadd94c04c2c6d904569936a7.tar.bz2
otp-6b8b77173b426cecadd94c04c2c6d904569936a7.zip
dialyzer: Correct indentation of field warnings
See also https://bugs.erlang.org/browse/ERL-953.
Diffstat (limited to 'lib/dialyzer/src/dialyzer.erl')
-rw-r--r--lib/dialyzer/src/dialyzer.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl
index cfe5fa9b3f..d4fe064edd 100644
--- a/lib/dialyzer/src/dialyzer.erl
+++ b/lib/dialyzer/src/dialyzer.erl
@@ -642,11 +642,11 @@ c(Cerl, _I) ->
field_diffs(Src, false) ->
Src;
field_diffs(Src, true) ->
- Fields = string:split(Src, " and "),
+ Fields = string:split(Src, " and ", all),
lists:join(" and ", [field_diff(Field) || Field <- Fields]).
field_diff(Field) ->
- [F | Ts] = string:split(Field, "::"),
+ [F | Ts] = string:split(Field, "::", all),
F ++ " ::" ++ t(lists:flatten(lists:join("::", Ts)), true).
rec_type("record "++Src, I) ->
@@ -658,7 +658,7 @@ ps("pattern "++Src, I) ->
ps("variable "++_=Src, _I) ->
Src;
ps("record field"++Rest, I) ->
- [S, TypeStr] = string:split(Rest, "of type "),
+ [S, TypeStr] = string:split(Rest, "of type ", all),
"record field" ++ S ++ "of type " ++ t(TypeStr, I).
%% Scan and parse a type or a literal, and pretty-print it using erl_pp.