Skip to content

Commit 98cd179

Browse files
committed
Better default toString for LazyType
LazyType inherits the toString of Function2 which is just "<function2>" and therefore not very helpful. By contrast, the exact class of a completer can be very useful when debugging.
1 parent 4050dd2 commit 98cd179

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2174,6 +2174,8 @@ object SymDenotations {
21742174
def withDecls(decls: Scope): this.type = { myDecls = decls; this }
21752175
def withSourceModule(sourceModuleFn: Context => Symbol): this.type = { mySourceModuleFn = sourceModuleFn; this }
21762176
def withModuleClass(moduleClassFn: Context => Symbol): this.type = { myModuleClassFn = moduleClassFn; this }
2177+
2178+
override def toString: String = getClass.toString
21772179
}
21782180

21792181
/** A subtrait of LazyTypes where completerTypeParams yields a List[TypeSymbol], which

0 commit comments

Comments
 (0)