diff --git a/compiler/src/dotty/tools/dotc/core/Decorators.scala b/compiler/src/dotty/tools/dotc/core/Decorators.scala index 6b68b4ddfc42..9f55e29c0f59 100644 --- a/compiler/src/dotty/tools/dotc/core/Decorators.scala +++ b/compiler/src/dotty/tools/dotc/core/Decorators.scala @@ -287,7 +287,7 @@ object Decorators { case _ => String.valueOf(x).nn /** Returns the simple class name of `x`. */ - def className: String = getClass.getSimpleName.nn + def className: String = x.getClass.getSimpleName.nn extension [T](x: T) def assertingErrorsReported(using Context): T = {