diff options
author | Hans Bolinder <[email protected]> | 2019-03-22 11:58:58 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2019-04-29 12:00:31 +0200 |
commit | 19e8e534cc26d890378265907ff0a56c101f2625 (patch) | |
tree | 38d9db9e23d5bcbac5a502aef1c0fc806d355fa9 /lib/dialyzer/src | |
parent | 87e748eda909272ab4c2178fdfe83bb74eef898b (diff) | |
download | otp-19e8e534cc26d890378265907ff0a56c101f2625.tar.gz otp-19e8e534cc26d890378265907ff0a56c101f2625.tar.bz2 otp-19e8e534cc26d890378265907ff0a56c101f2625.zip |
dialyzer: Fix dialyzer_dataflow:format_args_1()
Diffstat (limited to 'lib/dialyzer/src')
-rw-r--r-- | lib/dialyzer/src/dialyzer_dataflow.erl | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl index f7aa167f5c..55c77814f8 100644 --- a/lib/dialyzer/src/dialyzer_dataflow.erl +++ b/lib/dialyzer/src/dialyzer_dataflow.erl @@ -3644,14 +3644,15 @@ format_args(ArgList0, TypeList, State) -> "(" ++ format_args_1(ArgList, TypeList, State) ++ ")". format_args_1([Arg], [Type], State) -> - format_arg(Arg) ++ format_type(Type, State); + format_arg_1(Arg, Type, State); format_args_1([Arg|Args], [Type|Types], State) -> - String = - case cerl:is_literal(Arg) of - true -> format_cerl(Arg); - false -> format_arg(Arg) ++ format_type(Type, State) - end, - String ++ "," ++ format_args_1(Args, Types, State). + format_arg_1(Arg, Type, State) ++ "," ++ format_args_1(Args, Types, State). + +format_arg_1(Arg, Type, State) -> + case cerl:is_literal(Arg) of + true -> format_cerl(Arg); + false -> format_arg(Arg) ++ format_type(Type, State) + end. format_arg(Arg) -> Default = "", |