@@ -34,12 +34,11 @@ class ExtractSemanticDB extends Phase {
34
34
// Check not needed since it does not transform trees
35
35
override def isCheckable : Boolean = false
36
36
37
- override def run (implicit ctx : Context ): Unit = {
37
+ override def run (implicit ctx : Context ): Unit =
38
38
val unit = ctx.compilationUnit
39
39
val extract = Extractor ()
40
40
extract.traverse(unit.tpdTree)
41
41
ExtractSemanticDB .write(unit.source, extract.occurrences.toList)
42
- }
43
42
44
43
/** Extractor of symbol occurrences from trees */
45
44
class Extractor extends TreeTraverser {
@@ -97,7 +96,7 @@ class ExtractSemanticDB extends Phase {
97
96
addName(sym.name)
98
97
if sym.is(Package ) then b.append('/' )
99
98
else if sym.isType then b.append('#' )
100
- else if sym.isRealMethod then
99
+ else if sym.is( Method ) && ( ! sym.is( Accessor ) || sym.is( Mutable )) then
101
100
b.append('(' ); addOverloadIdx(sym); b.append(" )." )
102
101
else b.append('.' )
103
102
@@ -116,14 +115,15 @@ class ExtractSemanticDB extends Phase {
116
115
idx
117
116
locals.getOrElseUpdate(sym, computeLocalIdx())
118
117
119
- if sym.isRoot then
120
- b.append(" _root_" )
121
- else if sym.isEmptyPackage then
122
- b.append(" _empty_" )
123
- else if isGlobal(sym) then
124
- addOwner(sym.owner); addDescriptor(sym)
125
- else
126
- b.append(" local" ).append(localIdx(sym))
118
+ if sym.exists then
119
+ if sym.isRoot then
120
+ b.append(" _root_" )
121
+ else if sym.isEmptyPackage then
122
+ b.append(" _empty_" )
123
+ else if isGlobal(sym) then
124
+ addOwner(sym.owner); addDescriptor(sym)
125
+ else
126
+ b.append(" local" ).append(localIdx(sym))
127
127
end addSymName
128
128
129
129
/** The semanticdb name of the given symbol */
0 commit comments