From bb99cc66c9006735ebf29d8f30f253408f5bc027 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 24 Jan 2008 16:31:14 +0000 Subject: re-fix #404 --- src/compiler/scala/tools/nsc/transform/UnCurry.scala | 2 +- src/compiler/scala/tools/nsc/typechecker/Infer.scala | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index e70002d35b..5ffb6fed71 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -391,7 +391,7 @@ abstract class UnCurry extends InfoTransform with TypingTransformers { t } - /** A try needs to be lifted anyway for MSIL if it contains + /** A try or synchronized needs to be lifted anyway for MSIL if it contains * return statements. These are disallowed in the CLR. By lifting * such returns will be converted to throws. */ diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index eb56efe633..3fc3e30585 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -341,14 +341,21 @@ trait Infer { // are converted to existentials C[T] forSome { type T }. // We can't do this on class loading because it would result // in infinite cycles. - if (sym1.isTerm) { /* + def cook(sym: Symbol) { + val tpe1 = rawToExistential(sym.tpe) + if (tpe1 ne sym.tpe) { + if (settings.debug.value) println("cooked: "+sym+":"+sym.tpe) + sym.setInfo(tpe1) + } + } + if (sym1.isTerm) { if (sym1 hasFlag JAVA) - sym1.setInfo(rawToExistential(sym1.info)) + cook(sym1) else if (sym1 hasFlag OVERLOADED) for (sym2 <- sym1.alternatives) if (sym2 hasFlag JAVA) - sym2.setInfo(rawToExistential(sym2.info)) - */} + cook(sym2) + } //Console.println("check acc " + sym1 + ":" + sym1.tpe + " from " + pre);//DEBUG var owntype = try{ pre.memberType(sym1) -- cgit v1.2.3