summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2007-01-14 01:33:08 +0000
committerBurak Emir <emir@epfl.ch>2007-01-14 01:33:08 +0000
commitf3cf0544326e246cd6ecd1632ad43facc437e9d2 (patch)
tree2e4183b4a02512e188de0b8b0a6cff99a580d8c7 /src/compiler
parent003f7e2b70c4fd1945c0cc790aaaca542a529652 (diff)
downloadscala-f3cf0544326e246cd6ecd1632ad43facc437e9d2.tar.gz
scala-f3cf0544326e246cd6ecd1632ad43facc437e9d2.tar.bz2
scala-f3cf0544326e246cd6ecd1632ad43facc437e9d2.zip
lib
Seq.scala: fixed unapply method nsc Trees.scala: Transformer is homomorphism for UnApply ExplOuter: removed System.exit for debug (oops, this annoys Eclipse users) TransM: case UnApply for isRegularPattern GenICode: error msg gives compilation unit, too
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/ast/Trees.scala2
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala2
-rw-r--r--src/compiler/scala/tools/nsc/matching/TransMatcher.scala2
-rw-r--r--src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala1
4 files changed, 4 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/Trees.scala b/src/compiler/scala/tools/nsc/ast/Trees.scala
index 2ca8fc057d..8f21650b13 100644
--- a/src/compiler/scala/tools/nsc/ast/Trees.scala
+++ b/src/compiler/scala/tools/nsc/ast/Trees.scala
@@ -1113,7 +1113,7 @@ trait Trees requires Global {
case Bind(name, body) =>
copy.Bind(tree, name, transform(body))
case UnApply(fun, args) =>
- copy.UnApply(tree, fun, args)
+ copy.UnApply(tree, fun, transformTrees(args)) // bq: see test/.../unapplyContexts2.scala
case ArrayValue(elemtpt, trees) =>
copy.ArrayValue(tree, transform(elemtpt), transformTrees(trees))
case Function(vparams, body) =>
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
index e6c3c94b4d..b2208a89cc 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -787,7 +787,7 @@ abstract class GenICode extends SubComponent {
case This(qual) =>
assert(tree.symbol == ctx.clazz.symbol || tree.symbol.isModuleClass,
"Trying to access the this of another class: " +
- "tree.symbol = " + tree.symbol + ", ctx.clazz.symbol = " + ctx.clazz.symbol)
+ "tree.symbol = " + tree.symbol + ", ctx.clazz.symbol = " + ctx.clazz.symbol + " compilation unit:"+unit)
if (tree.symbol.isModuleClass && tree.symbol != ctx.clazz.symbol) {
if (settings.debug.value)
log("LOAD_MODULE from 'This': " + tree.symbol);
diff --git a/src/compiler/scala/tools/nsc/matching/TransMatcher.scala b/src/compiler/scala/tools/nsc/matching/TransMatcher.scala
index cdd4c5fee2..bf4ace47ea 100644
--- a/src/compiler/scala/tools/nsc/matching/TransMatcher.scala
+++ b/src/compiler/scala/tools/nsc/matching/TransMatcher.scala
@@ -129,6 +129,8 @@ with PatternMatchers */ {
case Literal(_) => false
case Select(_, _) => false
case Typed(_, _) => false
+ case UnApply(_,trees) =>
+ trees exists { isRegularPattern }
}
protected def isDefault(p: Tree): Boolean = p match {
diff --git a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
index 97c31bed53..e225c70a4f 100644
--- a/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
+++ b/src/compiler/scala/tools/nsc/transform/ExplicitOuter.scala
@@ -510,7 +510,6 @@ abstract class ExplicitOuter extends InfoTransform with TransMatcher with Patter
//treeBrowser.browse(Seq.single(unit).elements)
Console.println("[died while typechecking the translated pattern match:]")
Console.println(t_untyped)
- System.exit(-1)
null
}
case _ =>