@@ -74,7 +74,7 @@ defmodule ExDoc.Language.Erlang do
7474 callback_data ( name , arity , anno , signature , metadata , module_data )
7575
7676 kind == :type ->
77- type_data ( name , arity , anno , signature , metadata , module_data )
77+ type_data ( name , arity , signature , metadata , module_data )
7878
7979 true ->
8080 false
@@ -141,15 +141,9 @@ defmodule ExDoc.Language.Erlang do
141141 }
142142 end
143143
144- defp type_data ( name , arity , anno , signature , metadata , module_data ) do
145- { specs , file , line , type } =
146- case Source . fetch_type! ( module_data , name , arity ) do
147- % { attr: attr , source_file: file , source_line: line , type: type } ->
148- { [ attr ] , file , line , type }
149-
150- nil ->
151- { [ ] , nil , Source . anno_line ( anno ) , :type }
152- end
144+ defp type_data ( name , arity , signature , metadata , module_data ) do
145+ % { attr: attr , source_file: file , source_line: line , type: type } =
146+ Source . fetch_type! ( module_data , name , arity )
153147
154148 % {
155149 id_key: "t:" ,
@@ -159,7 +153,7 @@ defmodule ExDoc.Language.Erlang do
159153 signature: signature ,
160154 source_file: file ,
161155 source_line: line ,
162- specs: specs ,
156+ specs: [ attr ] ,
163157 type: type
164158 }
165159 end
0 commit comments