aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2013-01-22 17:57:54 +0100
committerStavros Aronis <[email protected]>2013-01-22 17:57:54 +0100
commit6126143eda4fc9cea7a2928de1b11cfddec0e2bb (patch)
tree8bede65211c2f737c81228c2f8f5314069957aca /lib/hipe
parent9b01d9553434256b93b4899caf042d857f6ef068 (diff)
downloadotp-6126143eda4fc9cea7a2928de1b11cfddec0e2bb.tar.gz
otp-6126143eda4fc9cea7a2928de1b11cfddec0e2bb.tar.bz2
otp-6126143eda4fc9cea7a2928de1b11cfddec0e2bb.zip
Properly support functions with arbitrary arity in type specs.
Diffstat (limited to 'lib/hipe')
-rw-r--r--lib/hipe/cerl/erl_types.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index f5be8fb08f..ea1e7b1292 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -3566,7 +3566,7 @@ t_from_form({type, _L, function, []}, _TypeNames, _InOpaque, _RecDict,
t_from_form({type, _L, 'fun', []}, _TypeNames, _InOpaque, _RecDict,
_VarDict) ->
{t_fun(), []};
-t_from_form({type, _L, 'fun', [{type, _, any, []}, Range]}, TypeNames,
+t_from_form({type, _L, 'fun', [{type, _, any}, Range]}, TypeNames,
InOpaque, RecDict, VarDict) ->
{T, R} = t_from_form(Range, TypeNames, InOpaque, RecDict, VarDict),
{t_fun(T), R};
@@ -3909,7 +3909,7 @@ t_form_to_string({type, _L, binary, [Base, Unit]} = Type) ->
_ -> io_lib:format("Badly formed bitstr type ~w", [Type])
end;
t_form_to_string({type, _L, 'fun', []}) -> "fun()";
-t_form_to_string({type, _L, 'fun', [{type, _, any, []}, Range]}) ->
+t_form_to_string({type, _L, 'fun', [{type, _, any}, Range]}) ->
"fun(...) -> " ++ t_form_to_string(Range);
t_form_to_string({type, _L, 'fun', [{type, _, product, Domain}, Range]}) ->
"fun((" ++ string:join(t_form_to_string_list(Domain), ",") ++ ") -> "