Skip to content

Commit c0bd621

Browse files
committed
Fix #9525: use untyped tree to avoid double vision of symbols
1 parent 3b3ef88 commit c0bd621

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,10 @@ object JavaParsers {
367367
// assumed true unless we see public/private/protected
368368
var isPackageAccess = true
369369
var annots = new ListBuffer[Tree]
370-
def addAnnot(sym: ClassSymbol) =
370+
def addAnnot(tpt: Tree) =
371371
annots += atSpan(in.offset) {
372372
in.nextToken()
373-
New(TypeTree(sym.typeRef))
373+
New(tpt)
374374
}
375375

376376
while (true)
@@ -404,11 +404,11 @@ object JavaParsers {
404404
flags |= Flags.DefaultMethod
405405
in.nextToken()
406406
case NATIVE =>
407-
addAnnot(NativeAnnot)
407+
addAnnot(scalaDot(jtpnme.NATIVEkw))
408408
case TRANSIENT =>
409-
addAnnot(TransientAnnot)
409+
addAnnot(scalaDot(jtpnme.TRANSIENTkw))
410410
case VOLATILE =>
411-
addAnnot(VolatileAnnot)
411+
addAnnot(scalaDot(jtpnme.VOLATILEkw))
412412
case SYNCHRONIZED | STRICTFP =>
413413
in.nextToken()
414414
case _ =>

0 commit comments

Comments
 (0)