Skip to content

Commit a458730

Browse files
committed
Tweak isReferencedSymbolically
The exception previously made for Scala2 innner classes causes the benchmark library project to fail with in the tree type map FullParameterization when called from LinkScala2Impl. It's not necessary to make the special case there because the Scalq2Unpickler will create anyway symbolic references to such inner classes.
1 parent 07e3677 commit a458730

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,7 @@ object Symbols {
445445

446446
final def isReferencedSymbolically(implicit ctx: Context) = {
447447
val d = lastDenot
448-
d != null && (
449-
(d is NonMember)
450-
|| d.isClass && d.is(Scala2x) && !d.owner.is(Package)
451-
|| d.isTerm && ctx.phase.symbolicRefs
452-
)
448+
d != null && (d.is(NonMember) || d.isTerm && ctx.phase.symbolicRefs)
453449
}
454450

455451
/** The symbol's signature if it is completed or a method, NotAMethod otherwise. */

compiler/src/dotty/tools/dotc/core/unpickleScala2/Scala2Unpickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ class Scala2Unpickler(bytes: Array[Byte], classRoot: ClassDenotation, moduleClas
734734
}
735735
val tycon =
736736
if (sym.isClass && sym.is(Scala2x) && !sym.owner.is(Package))
737-
// used fixed sym for Scala 2 inner classes, because they might be shadowed
737+
// use fixed sym for Scala 2 inner classes, because they might be shadowed
738738
TypeRef(pre, sym.asType)
739739
else if (isLocal(sym) || pre == NoPrefix) {
740740
val pre1 = if ((pre eq NoPrefix) && (sym is TypeParam)) sym.owner.thisType else pre

0 commit comments

Comments
 (0)