From d5f0ed310e475718492e34778d6b2a7b50f67669 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 17 Dec 2009 18:16:47 +0000 Subject: Another fix for the build problem with r20203. --- src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index eea0835144..707c91e6ad 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -771,11 +771,14 @@ self: Analyzer => else if (sym.isTypeParameterOrSkolem) EmptyTree // a manifest should have been found by normal searchImplicit else { - val era = erasure.erasure(tp1) - val base = tp1.baseType(era.typeSymbol) + // the following is tricky! We want to find the parameterized version of + // what will become the erasure of the upper bound. + var era = erasure.erasure(tp1) + if (era.typeSymbol.typeParams.nonEmpty) + era = tp1.baseType(era.typeSymbol) manifestFactoryCall( "abstractType", tp, - findSubManifest(pre) :: Literal(sym.name.toString) :: gen.mkClassOf(base) :: (args map findSubManifest): _*) + findSubManifest(pre) :: Literal(sym.name.toString) :: gen.mkClassOf(era) :: (args map findSubManifest): _*) } } else { EmptyTree // a manifest should have been found by normal searchImplicit -- cgit v1.2.3