Skip to content

Commit f50b82f

Browse files
committed
Fix simplify_return function when passed the 'abstype'
1 parent 2492afd commit f50b82f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

autoload/erlang_complete.erl

+3-2
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,11 @@ simplify_return({typevar, [{name, Name}], _}) ->
113113
Name;
114114
simplify_return({type, _, [Type]}) ->
115115
simplify_return(Type);
116-
simplify_return({abstype, _, [Type]}) ->
116+
simplify_return({abstype, _, [Type | AbsTypes]}) ->
117117
{erlangName, Attrs, _} = Type,
118118
Name = proplists:get_value(name, Attrs),
119-
Name ++ "()";
119+
Elems = lists:map(fun(T) -> simplify_return(T) end, AbsTypes),
120+
Name ++ "(" ++ string:join(Elems, ", ") ++ ")";
120121
simplify_return({record, _, [Type]}) ->
121122
simplify_return(Type) ++ "()";
122123
simplify_return({nonempty_list, _, [Type]}) ->

0 commit comments

Comments
 (0)