File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ trait SymDenotations { this: Context =>
41
41
}
42
42
43
43
def stillValid (denot : SymDenotation ): Boolean =
44
- if (denot.is(ValidForever ) || denot.isRefinementClass) true
44
+ if (denot.is(ValidForever ) || denot.isRefinementClass || denot.isImport ) true
45
45
else {
46
46
val initial = denot.initial
47
47
val firstPhaseId = initial.validFor.firstPhaseId.max(ctx.typerPhase.id)
@@ -590,6 +590,9 @@ object SymDenotations {
590
590
originalName.isSetterName &&
591
591
(! isCompleted || info.firstParamTypes.nonEmpty) // to avoid being fooled by var x_= : Unit = ...
592
592
593
+ /** is this a symbol representing an import? */
594
+ final def isImport = name == nme.IMPORT
595
+
593
596
/** is this the constructor of a class? */
594
597
final def isClassConstructor = name == nme.CONSTRUCTOR
595
598
Original file line number Diff line number Diff line change @@ -553,7 +553,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
553
553
(sym.allOverriddenSymbols exists (_ is TypeParam ))
554
554
555
555
override def toText (sym : Symbol ): Text = {
556
- if (sym.name == nme. IMPORT ) {
556
+ if (sym.isImport ) {
557
557
def importString (tree : untpd.Tree ) = s " import ${tree.show}"
558
558
sym.infoOrCompleter match {
559
559
case info : Namer # Completer => return importString(info.original)
You can’t perform that action at this time.
0 commit comments