Skip to content

Commit 14100f7

Browse files
committed
Tweak log printing of errors
1 parent 289bd35 commit 14100f7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/transform/init/Errors.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ object Errors {
5555
case unsafe: UnsafePromotion => unsafe.errors.flatMap(_.flatten)
5656
case _ => this :: Nil
5757
}
58+
59+
override def toString() = this.getClass.getName
5860
}
5961

6062
/** Access non-initialized field */

compiler/src/dotty/tools/dotc/transform/init/Semantic.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1387,9 +1387,10 @@ object Semantic {
13871387
extension (symbol: Symbol) def hasSource(using Context): Boolean =
13881388
!symbol.defTree.isEmpty
13891389

1390-
def resolve(cls: ClassSymbol, sym: Symbol)(using Context): Symbol =
1390+
def resolve(cls: ClassSymbol, sym: Symbol)(using Context): Symbol = log("resove " + cls + ", " + sym, printer, _.asInstanceOf[Symbol].show) {
13911391
if (sym.isEffectivelyFinal || sym.isConstructor) sym
13921392
else sym.matchingMember(cls.appliedRef)
1393+
}
13931394

13941395
def resolveSuper(cls: ClassSymbol, superType: Type, sym: Symbol)(using Context): Symbol = {
13951396
import annotation.tailrec

0 commit comments

Comments
 (0)