File tree Expand file tree Collapse file tree 4 files changed +37
-0
lines changed
compiler/src/dotty/tools/dotc/semanticdb Expand file tree Collapse file tree 4 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ class ExtractSemanticDB extends Phase:
169169 tree match
170170 case tree : DefDef =>
171171 tree.paramss.foreach(_.foreach(param => registerSymbolSimple(param.symbol)))
172+ case tree : ValDef if tree.symbol.is(Given ) => traverse(tree.tpt)
172173 case _ =>
173174 if ! tree.symbol.isGlobal then
174175 localBodies(tree.symbol) = tree.rhs
Original file line number Diff line number Diff line change 1+ package angiven
2+
3+ trait Foo /* <-angiven::Foo#*/
4+
5+ /* <-angiven::AnonymousGiven$package.*/ def bar /* <-angiven::AnonymousGiven$package.bar().*/ (using Foo /* ->angiven::Foo#*/ ) = 42
Original file line number Diff line number Diff line change 1+ package angiven
2+
3+ trait Foo
4+
5+ def bar (using Foo ) = 42
Original file line number Diff line number Diff line change @@ -329,6 +329,32 @@ Occurrences:
329329[18:6..18:9): foo <- example/Anonymous#foo.
330330[18:16..18:19): Foo -> example/Anonymous#Foo#
331331
332+ expect/AnonymousGiven.scala
333+ ---------------------------
334+
335+ Summary:
336+ Schema => SemanticDB v4
337+ Uri => AnonymousGiven.scala
338+ Text => empty
339+ Language => Scala
340+ Symbols => 5 entries
341+ Occurrences => 6 entries
342+
343+ Symbols:
344+ angiven/AnonymousGiven$package. => final package object angiven
345+ angiven/AnonymousGiven$package.bar(). => method bar
346+ angiven/AnonymousGiven$package.bar().(x$1) => implicit param x$1
347+ angiven/Foo# => trait Foo
348+ angiven/Foo#`<init>`(). => primary ctor <init>
349+
350+ Occurrences:
351+ [0:8..0:15): angiven <- angiven/
352+ [2:0..2:0): <- angiven/Foo#`<init>`().
353+ [2:6..2:9): Foo <- angiven/Foo#
354+ [4:0..4:0): <- angiven/AnonymousGiven$package.
355+ [4:4..4:7): bar <- angiven/AnonymousGiven$package.bar().
356+ [4:14..4:17): Foo -> angiven/Foo#
357+
332358expect/Classes.scala
333359--------------------
334360
You can’t perform that action at this time.
0 commit comments