summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2008-01-24 16:31:14 +0000
committerMartin Odersky <odersky@gmail.com>2008-01-24 16:31:14 +0000
commitbb99cc66c9006735ebf29d8f30f253408f5bc027 (patch)
tree06cd988c9c8db707e06087fc2d600c0db763ed59
parent8d886ca8fbf6e55fc1ab360e460df0c54c9bd53b (diff)
downloadscala-bb99cc66c9006735ebf29d8f30f253408f5bc027.tar.gz
scala-bb99cc66c9006735ebf29d8f30f253408f5bc027.tar.bz2
scala-bb99cc66c9006735ebf29d8f30f253408f5bc027.zip
re-fix #404
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala15
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)