File tree 2 files changed +19
-1
lines changed
presentation-compiler/src/main/dotty/tools/pc
2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 1
1
package dotty .tools .pc
2
2
3
+ import scala .collection .mutable
3
4
import scala .util .control .NonFatal
4
5
5
6
import scala .meta .pc .PcSymbolKind
@@ -37,11 +38,25 @@ class SymbolInformationProvider(using Context):
37
38
if classSym.isClass
38
39
then classSym.asClass.parentSyms.map(SemanticdbSymbols .symbolName)
39
40
else Nil
41
+ val allParents =
42
+ val visited = mutable.Set [Symbol ]()
43
+ def collect (sym : Symbol ): Unit = {
44
+ visited += sym
45
+ if sym.isClass
46
+ then sym.asClass.parentSyms.foreach {
47
+ case parent if ! visited(parent) =>
48
+ collect(parent)
49
+ case _ =>
50
+ }
51
+ }
52
+ collect(classSym)
53
+ visited.toList.map(SemanticdbSymbols .symbolName)
40
54
val dealisedSymbol =
41
55
if sym.isAliasType then sym.info.deepDealias.typeSymbol else sym
42
56
val classOwner =
43
57
sym.ownersIterator.drop(1 ).find(s => s.isClass || s.is(Flags .Module ))
44
58
val overridden = sym.denot.allOverriddenSymbols.toList
59
+ val memberDefAnnots = sym.info.membersBasedOnFlags(Flags .Method , Flags .EmptyFlags ).flatMap(_.allSymbols).flatMap(_.denot.annotations)
45
60
46
61
val pcSymbolInformation =
47
62
PcSymbolInformation (
@@ -56,6 +71,9 @@ class SymbolInformationProvider(using Context):
56
71
properties =
57
72
if sym.is(Flags .Abstract ) then List (PcSymbolProperty .ABSTRACT )
58
73
else Nil ,
74
+ recursiveParents = allParents,
75
+ annotations = sym.denot.annotations.map(_.symbol.showFullName),
76
+ memberDefsAnnotations = memberDefAnnots.map(_.symbol.showFullName).toList
59
77
)
60
78
61
79
Some (pcSymbolInformation)
Original file line number Diff line number Diff line change @@ -1359,7 +1359,7 @@ object Build {
1359
1359
BuildInfoPlugin .buildInfoDefaultSettings
1360
1360
1361
1361
lazy val presentationCompilerSettings = {
1362
- val mtagsVersion = " 1.3.2 "
1362
+ val mtagsVersion = " 1.3.3 "
1363
1363
Seq (
1364
1364
libraryDependencies ++= Seq (
1365
1365
" org.lz4" % " lz4-java" % " 1.8.0" ,
You can’t perform that action at this time.
0 commit comments