From a478609e1b61fd8b3fd4032a7cf081f88fb3cf30 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 22 Jan 2008 14:35:24 +0000 Subject: fixed #342 --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 + -- cgit v1.2.3