diff options
author | Hans Bolinder <[email protected]> | 2019-04-14 11:24:47 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2019-05-07 08:25:03 +0200 |
commit | c2cd09c3d6807d2e93d117d9c6b47a706a50c763 (patch) | |
tree | 0f662080c53689b7123350b831647cc9a86e0416 | |
parent | 77cbe3b6ced0ca42cf3ec5c8ca0333d9418a0372 (diff) | |
download | otp-c2cd09c3d6807d2e93d117d9c6b47a706a50c763.tar.gz otp-c2cd09c3d6807d2e93d117d9c6b47a706a50c763.tar.bz2 otp-c2cd09c3d6807d2e93d117d9c6b47a706a50c763.zip |
dialyzer: Remove quotes around operators
-rw-r--r-- | lib/dialyzer/src/dialyzer.erl | 6 | ||||
-rw-r--r-- | lib/dialyzer/test/opaque_SUITE_data/results/simple | 2 | ||||
-rw-r--r-- | lib/dialyzer/test/options1_SUITE_data/results/compiler | 4 | ||||
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/results/guard_warnings | 74 |
4 files changed, 43 insertions, 43 deletions
diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl index d114980a91..cfe5fa9b3f 100644 --- a/lib/dialyzer/src/dialyzer.erl +++ b/lib/dialyzer/src/dialyzer.erl @@ -347,9 +347,9 @@ message_to_string({neg_guard_fail, [Arg1, Infix, Arg2]}, I) -> io_lib:format("Guard test not(~ts ~s ~ts) can never succeed\n", [a(Arg1, I), Infix, a(Arg2, I)]); % a/2 rather than c/2 message_to_string({guard_fail, [Guard, Args]}, I) -> - io_lib:format("Guard test ~w~ts can never succeed\n", [Guard, a(Args, I)]); + io_lib:format("Guard test ~s~ts can never succeed\n", [Guard, a(Args, I)]); message_to_string({neg_guard_fail, [Guard, Args]}, I) -> - io_lib:format("Guard test not(~w~ts) can never succeed\n", + io_lib:format("Guard test not(~s~ts) can never succeed\n", [Guard, a(Args, I)]); message_to_string({guard_fail_pat, [Pat, Type]}, I) -> io_lib:format("Clause guard cannot succeed. The ~ts was matched" @@ -702,7 +702,7 @@ indentation(I) -> pp_type(Type) -> Form = {attribute, erl_anno:new(0), type, {t, Type, []}}, - TypeDef = erl_pp:form(Form), + TypeDef = erl_pp:form(Form, [{quote_singleton_atom_types, true}]), {match, [S]} = re:run(TypeDef, <<"::\\s*(.*)\\.\\n*">>, [{capture, all_but_first, list}, dotall]), S. diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/simple b/lib/dialyzer/test/opaque_SUITE_data/results/simple index 0e1bb934e9..5d13b56970 100644 --- a/lib/dialyzer/test/opaque_SUITE_data/results/simple +++ b/lib/dialyzer/test/opaque_SUITE_data/results/simple @@ -51,7 +51,7 @@ simple1_api.erl:294: The call erlang:is_function(T::simple1_api:o1(),A::simple1_ simple1_api.erl:300: The type test is_function(T::simple1_adt:o1(),A::simple1_api:i1()) breaks the opacity of the term T::simple1_adt:o1() simple1_api.erl:306: Guard test B::simple1_api:b2() =:= 'true' can never succeed simple1_api.erl:315: Guard test A::simple1_api:b1() =:= 'false' can never succeed -simple1_api.erl:319: Guard test not('and'('true','true')) can never succeed +simple1_api.erl:319: Guard test not(and('true','true')) can never succeed simple1_api.erl:337: Clause guard cannot succeed. simple1_api.erl:342: Guard test B::simple1_adt:b2() =:= 'true' contains an opaque term as 1st argument simple1_api.erl:347: Guard test A::simple1_adt:b1() =:= 'true' contains an opaque term as 1st argument diff --git a/lib/dialyzer/test/options1_SUITE_data/results/compiler b/lib/dialyzer/test/options1_SUITE_data/results/compiler index e1dc038800..121163d7ca 100644 --- a/lib/dialyzer/test/options1_SUITE_data/results/compiler +++ b/lib/dialyzer/test/options1_SUITE_data/results/compiler @@ -6,8 +6,8 @@ beam_disasm.erl:537: The variable X can never match since previous clauses compl beam_type.erl:284: The pattern <'pi', 0> can never match the type <_,1 | 2> beam_validator.erl:396: Matching of pattern {'vst', 'none', _} tagged with a record name violates the declared type of #vst{current::#st{ct::[]}} beam_validator.erl:690: The pattern <'term', OldT> can never match the type <{'tuple',[any(),...]},_> -beam_validator.erl:693: Guard test 'or'('false','false') can never succeed -beam_validator.erl:700: Guard test 'or'('false','false') can never succeed +beam_validator.erl:693: Guard test or('false','false') can never succeed +beam_validator.erl:700: Guard test or('false','false') can never succeed beam_validator.erl:702: The pattern <'number', OldT = {Type, _}> can never match the type <{'tuple',[any(),...]},_> beam_validator.erl:705: The pattern <'bool', {'atom', A}> can never match the type <{'tuple',[any(),...]},_> beam_validator.erl:707: The pattern <{'atom', A}, 'bool'> can never match the type <{'tuple',[any(),...]},_> diff --git a/lib/dialyzer/test/small_SUITE_data/results/guard_warnings b/lib/dialyzer/test/small_SUITE_data/results/guard_warnings index 819119596f..14b7a9052c 100644 --- a/lib/dialyzer/test/small_SUITE_data/results/guard_warnings +++ b/lib/dialyzer/test/small_SUITE_data/results/guard_warnings @@ -1,6 +1,6 @@ guard_warnings.erl:100: Function test45/0 has no local return -guard_warnings.erl:100: Guard test 'not'('true') can never succeed +guard_warnings.erl:100: Guard test not('true') can never succeed guard_warnings.erl:102: Function test46/1 has no local return guard_warnings.erl:102: Guard test X::'true' =:= 'false' can never succeed guard_warnings.erl:104: Function test47/1 has no local return @@ -14,79 +14,79 @@ guard_warnings.erl:12: Guard test X::'true' =:= 'false' can never succeed guard_warnings.erl:14: Function test2/1 has no local return guard_warnings.erl:14: Guard test X::'false' =:= 'true' can never succeed guard_warnings.erl:16: Function test3/1 has no local return -guard_warnings.erl:16: Guard test 'not'(X::'true') can never succeed +guard_warnings.erl:16: Guard test not(X::'true') can never succeed guard_warnings.erl:18: Function test4/1 has no local return -guard_warnings.erl:18: Guard test 'and'('true',X::none()) can never succeed +guard_warnings.erl:18: Guard test and('true',X::none()) can never succeed guard_warnings.erl:20: Function test5/1 has no local return -guard_warnings.erl:20: Guard test 'not'(X::'true') can never succeed +guard_warnings.erl:20: Guard test not(X::'true') can never succeed guard_warnings.erl:22: Function test6/1 has no local return -guard_warnings.erl:22: Guard test 'and'('true',X::none()) can never succeed +guard_warnings.erl:22: Guard test and('true',X::none()) can never succeed guard_warnings.erl:24: Function test7_w/1 has no local return guard_warnings.erl:26: Function test8_w/1 has no local return guard_warnings.erl:28: Function test9/1 has no local return -guard_warnings.erl:28: Guard test not('not'(X::'false')) can never succeed +guard_warnings.erl:28: Guard test not(not(X::'false')) can never succeed guard_warnings.erl:30: Function test10/1 has no local return -guard_warnings.erl:30: Guard test not('or'('false',X::none())) can never succeed +guard_warnings.erl:30: Guard test not(or('false',X::none())) can never succeed guard_warnings.erl:32: Function test11/1 has no local return -guard_warnings.erl:32: Guard test not('not'(X::'false')) can never succeed +guard_warnings.erl:32: Guard test not(not(X::'false')) can never succeed guard_warnings.erl:34: Function test12/1 has no local return -guard_warnings.erl:34: Guard test not('or'('false',X::none())) can never succeed +guard_warnings.erl:34: Guard test not(or('false',X::none())) can never succeed guard_warnings.erl:36: Function test13/1 has no local return -guard_warnings.erl:36: Guard test 'and'('true','false') can never succeed +guard_warnings.erl:36: Guard test and('true','false') can never succeed guard_warnings.erl:38: Function test14/1 has no local return -guard_warnings.erl:38: Guard test 'and'('false',any()) can never succeed +guard_warnings.erl:38: Guard test and('false',any()) can never succeed guard_warnings.erl:40: Function test15/1 has no local return -guard_warnings.erl:40: Guard test 'and'(X::'true','false') can never succeed +guard_warnings.erl:40: Guard test and(X::'true','false') can never succeed guard_warnings.erl:42: Function test16/1 has no local return -guard_warnings.erl:42: Guard test 'and'('false',X::any()) can never succeed +guard_warnings.erl:42: Guard test and('false',X::any()) can never succeed guard_warnings.erl:44: Function test17/1 has no local return -guard_warnings.erl:44: Guard test 'and'(X::'true','false') can never succeed +guard_warnings.erl:44: Guard test and(X::'true','false') can never succeed guard_warnings.erl:46: Function test18/1 has no local return -guard_warnings.erl:46: Guard test 'and'('false',X::any()) can never succeed +guard_warnings.erl:46: Guard test and('false',X::any()) can never succeed guard_warnings.erl:48: Function test19/1 has no local return -guard_warnings.erl:48: Guard test not('or'('true',any())) can never succeed +guard_warnings.erl:48: Guard test not(or('true',any())) can never succeed guard_warnings.erl:50: Function test20/1 has no local return -guard_warnings.erl:50: Guard test not('or'('false','true')) can never succeed +guard_warnings.erl:50: Guard test not(or('false','true')) can never succeed guard_warnings.erl:52: Function test21/1 has no local return -guard_warnings.erl:52: Guard test not('or'('true',X::any())) can never succeed +guard_warnings.erl:52: Guard test not(or('true',X::any())) can never succeed guard_warnings.erl:54: Function test22/1 has no local return -guard_warnings.erl:54: Guard test not('or'(X::'false','true')) can never succeed +guard_warnings.erl:54: Guard test not(or(X::'false','true')) can never succeed guard_warnings.erl:56: Function test23/1 has no local return -guard_warnings.erl:56: Guard test not('or'('true',X::any())) can never succeed +guard_warnings.erl:56: Guard test not(or('true',X::any())) can never succeed guard_warnings.erl:58: Function test24/1 has no local return -guard_warnings.erl:58: Guard test not('or'(X::'false','true')) can never succeed +guard_warnings.erl:58: Guard test not(or(X::'false','true')) can never succeed guard_warnings.erl:60: Function test25/1 has no local return -guard_warnings.erl:60: Guard test 'and'('false',any()) can never succeed +guard_warnings.erl:60: Guard test and('false',any()) can never succeed guard_warnings.erl:62: Function test26/1 has no local return -guard_warnings.erl:62: Guard test 'and'('true','false') can never succeed +guard_warnings.erl:62: Guard test and('true','false') can never succeed guard_warnings.erl:64: Function test27/1 has no local return -guard_warnings.erl:64: Guard test 'and'('false',X::any()) can never succeed +guard_warnings.erl:64: Guard test and('false',X::any()) can never succeed guard_warnings.erl:66: Function test28/1 has no local return -guard_warnings.erl:66: Guard test 'and'(X::'true','false') can never succeed +guard_warnings.erl:66: Guard test and(X::'true','false') can never succeed guard_warnings.erl:68: Function test29/1 has no local return -guard_warnings.erl:68: Guard test 'and'('false',X::any()) can never succeed +guard_warnings.erl:68: Guard test and('false',X::any()) can never succeed guard_warnings.erl:70: Function test30/1 has no local return -guard_warnings.erl:70: Guard test 'and'(X::'true','false') can never succeed +guard_warnings.erl:70: Guard test and(X::'true','false') can never succeed guard_warnings.erl:72: Function test31/0 has no local return -guard_warnings.erl:72: Guard test 'and'('false','false') can never succeed +guard_warnings.erl:72: Guard test and('false','false') can never succeed guard_warnings.erl:74: Function test32/0 has no local return -guard_warnings.erl:74: Guard test 'and'('false','false') can never succeed +guard_warnings.erl:74: Guard test and('false','false') can never succeed guard_warnings.erl:76: Function test33/0 has no local return -guard_warnings.erl:76: Guard test not('and'('true','true')) can never succeed +guard_warnings.erl:76: Guard test not(and('true','true')) can never succeed guard_warnings.erl:78: Function test34/0 has no local return -guard_warnings.erl:78: Guard test 'and'('false','false') can never succeed +guard_warnings.erl:78: Guard test and('false','false') can never succeed guard_warnings.erl:80: Function test35/0 has no local return -guard_warnings.erl:80: Guard test not('and'('true','true')) can never succeed +guard_warnings.erl:80: Guard test not(and('true','true')) can never succeed guard_warnings.erl:82: Function test36/0 has no local return -guard_warnings.erl:82: Guard test 'or'('false','false') can never succeed +guard_warnings.erl:82: Guard test or('false','false') can never succeed guard_warnings.erl:84: Function test37/0 has no local return -guard_warnings.erl:84: Guard test 'or'('false','false') can never succeed +guard_warnings.erl:84: Guard test or('false','false') can never succeed guard_warnings.erl:86: Function test38/0 has no local return -guard_warnings.erl:86: Guard test 'or'('false','false') can never succeed +guard_warnings.erl:86: Guard test or('false','false') can never succeed guard_warnings.erl:88: Function test39/0 has no local return -guard_warnings.erl:88: Guard test 'or'('false','false') can never succeed +guard_warnings.erl:88: Guard test or('false','false') can never succeed guard_warnings.erl:90: Function test40/0 has no local return -guard_warnings.erl:90: Guard test 'or'('false','false') can never succeed +guard_warnings.erl:90: Guard test or('false','false') can never succeed guard_warnings.erl:92: Function test41/0 has no local return guard_warnings.erl:92: Guard test 'true' =:= 'false' can never succeed guard_warnings.erl:94: Function test42/0 has no local return |