diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index dcefef89fe..cace90f489 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -2315,7 +2315,7 @@ trait Typers { self: Analyzer => } if (tpt1.tpe.typeSymbol.isAbstractType || (tpt1.tpe.typeSymbol hasFlag ABSTRACT)) error(tree.pos, tpt1.tpe.typeSymbol + " is abstract; cannot be instantiated") - else if (tpt1.tpe.typeSymbol.thisSym != tpt1.tpe.typeSymbol && + else if (tpt1.tpe.typeSymbol.initialize.thisSym != tpt1.tpe.typeSymbol && !(tpt1.tpe <:< tpt1.tpe.typeOfThis) && !phase.erasedTypes) error(tree.pos, tpt1.tpe.typeSymbol + |