@@ -68,7 +68,7 @@ compile(Line, Module, Block, Vars, #elixir_scope{context_modules=FileModules} =
6868 { Base , Export , Private , Def , Defmacro , Functions } = elixir_def :unwrap_stored_definitions (FileList , Module ),
6969
7070 { All , Forms0 } = functions_form (Line , File , Module , Base , Export , Def , Defmacro , Functions , C ),
71- Forms1 = specs_form (Line , Module , Private , Defmacro , Forms0 , C ),
71+ Forms1 = specs_form (Module , Private , Defmacro , Forms0 , C ),
7272 Forms2 = attributes_form (Line , File , Module , Forms1 ),
7373 Forms3 = typedocs_form (Module , Forms2 ),
7474
@@ -213,7 +213,7 @@ typedocs_form(Module, Current) ->
213213
214214% % Specs
215215
216- specs_form (Line , Module , Private , Defmacro , Forms , C ) ->
216+ specs_form (Module , Private , Defmacro , Forms , C ) ->
217217 Defmacrop = [Tuple || { Tuple , defmacrop , _ , _ , _ } <- Private ],
218218 case elixir_compiler :get_opt (internal , C ) of
219219 true -> Forms ;
@@ -225,16 +225,17 @@ specs_form(Line, Module, Private, Defmacro, Forms, C) ->
225225 'Elixir.Module' :delete_attribute (Module , spec ),
226226 'Elixir.Module' :delete_attribute (Module , callback ),
227227
228- Temp = specs_attributes (Line , spec , Forms , Specs ),
229- specs_attributes (Line , callback , Temp , Callbacks )
228+ Temp = specs_attributes (spec , Forms , Specs ),
229+ specs_attributes (callback , Temp , Callbacks )
230230 end .
231231
232- specs_attributes (Line , Type , Forms , Specs ) ->
232+ specs_attributes (Type , Forms , Specs ) ->
233233 Keys = lists :foldl (fun ({ Tuple , Value }, Acc ) ->
234- lists :keystore (Tuple , 1 , Acc , { Tuple , Value } )
234+ lists :keystore (Tuple , 1 , Acc , { Tuple , Value })
235235 end , [], Specs ),
236236 lists :foldl (fun ({ Tuple , _ }, Acc ) ->
237237 Values = [V || { K , V } <- Specs , K == Tuple ],
238+ { type , Line , _ , _ } = hd (Values ),
238239 [{ attribute , Line , Type , { Tuple , Values } }|Acc ]
239240 end , Forms , Keys ).
240241
0 commit comments