File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed
scaladoc/src/dotty/tools/scaladoc
scaladoc-js/src/searchbar/engine Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class InkuireJSSearchEngine {
22
22
d.prettifiedSignature.asInstanceOf [String ],
23
23
d.pageLocation.asInstanceOf [String ],
24
24
d.functionName.asInstanceOf [String ],
25
- " def " ,
25
+ d.entryType. asInstanceOf [ String ] ,
26
26
List .empty
27
27
)
28
28
}
Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ object Inkuire {
47
47
signature : Signature ,
48
48
name : String ,
49
49
packageName : String ,
50
- uri : String
50
+ uri : String ,
51
+ entryType : String
51
52
)
52
53
53
54
sealed trait TypeLike
@@ -266,7 +267,8 @@ object Inkuire {
266
267
(" signature" , serialize(e.signature)),
267
268
(" name" , serialize(e.name)),
268
269
(" packageName" , serialize(e.packageName)),
269
- (" uri" , serialize(e.uri))
270
+ (" uri" , serialize(e.uri)),
271
+ (" entryType" , serialize(e.entryType))
270
272
)
271
273
}
272
274
Original file line number Diff line number Diff line change @@ -187,11 +187,37 @@ trait ClassLikeSupport:
187
187
),
188
188
name = methodSymbol.name,
189
189
packageName = methodSymbol.dri.location,
190
- uri = methodSymbol.dri.externalLink.getOrElse(" " )
190
+ uri = methodSymbol.dri.externalLink.getOrElse(" " ),
191
+ entryType = " def"
191
192
)
192
193
Inkuire .db = Inkuire .db.copy(functions = Inkuire .db.functions :+ sgn)
193
194
}
194
195
196
+ classDef.symbol.declaredFields
197
+ .filter(viableSymbol)
198
+ .foreach {
199
+ case valSymbol : Symbol =>
200
+ val valdef = valSymbol.tree.asInstanceOf [ValDef ]
201
+ val receiver : Option [Inkuire .TypeLike ] =
202
+ Some (classType)
203
+ .filter(_ => ! isModule)
204
+ val sgn = Inkuire .ExternalSignature (
205
+ signature = Inkuire .Signature (
206
+ receiver = receiver,
207
+ arguments = Seq .empty,
208
+ result = valdef.tpt.asInkuire(variableNames),
209
+ context = Inkuire .SignatureContext (
210
+ vars = variableNames.toSet,
211
+ constraints = Map .empty // TODO [Inkuire] Type bounds
212
+ )
213
+ ),
214
+ name = valSymbol.name,
215
+ packageName = valSymbol.dri.location,
216
+ uri = valSymbol.dri.externalLink.getOrElse(" " ),
217
+ entryType = " val"
218
+ )
219
+ Inkuire .db = Inkuire .db.copy(functions = Inkuire .db.functions :+ sgn)
220
+ }
195
221
}
196
222
197
223
if signatureOnly then baseMember else baseMember.copy(
You can’t perform that action at this time.
0 commit comments