summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2005-06-17 15:43:20 +0000
committerburaq <buraq@epfl.ch>2005-06-17 15:43:20 +0000
commita9b4163417d4f7e4dda571ac7f2ce6db7c8c63a0 (patch)
tree70d92fe9b3b797fc02fe49c2de7ecc906eb7829c /sources
parentd8f34726bc5147f67ccb1f9f1377d4f503c556ae (diff)
downloadscala-a9b4163417d4f7e4dda571ac7f2ce6db7c8c63a0.tar.gz
scala-a9b4163417d4f7e4dda571ac7f2ce6db7c8c63a0.tar.bz2
scala-a9b4163417d4f7e4dda571ac7f2ce6db7c8c63a0.zip
well, last bugfix will crash when trying to dup...
well, last bugfix will crash when trying to duplicate righthandsides...
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/tools/nsc/matching/RightTracers.scala2
-rwxr-xr-xsources/scala/tools/nsc/symtab/classfile/Pickler.scala34
-rw-r--r--sources/scala/tools/scalac/transformer/TransMatch.scala13
3 files changed, 30 insertions, 19 deletions
diff --git a/sources/scala/tools/nsc/matching/RightTracers.scala b/sources/scala/tools/nsc/matching/RightTracers.scala
index cc3285d282..bb391ad34d 100644
--- a/sources/scala/tools/nsc/matching/RightTracers.scala
+++ b/sources/scala/tools/nsc/matching/RightTracers.scala
@@ -78,8 +78,6 @@ abstract class RightTracerInScala extends Autom2Scala {
traverse( subtree );
- case Select(_,_) => ;
-
// congruence cases
case Apply(fun, args) => args foreach {traverse};
case Sequence(trees) => trees foreach {traverse};
diff --git a/sources/scala/tools/nsc/symtab/classfile/Pickler.scala b/sources/scala/tools/nsc/symtab/classfile/Pickler.scala
index c31d7ec2bf..217c7521f6 100755
--- a/sources/scala/tools/nsc/symtab/classfile/Pickler.scala
+++ b/sources/scala/tools/nsc/symtab/classfile/Pickler.scala
@@ -21,22 +21,26 @@ abstract class Pickler extends SubComponent {
class PicklePhase(prev: Phase) extends StdPhase(prev) {
def name = "pickler";
def apply(unit: CompilationUnit): unit = {
- def pickle(tree: Tree): unit = tree match {
- case PackageDef(_, stats) => stats foreach pickle;
- case ClassDef(_, _, _, _, _) | ModuleDef(_, _, _) =>
- val sym = tree.symbol;
- val pickle = new Pickle(sym.name.toTermName, sym.owner);
- def add(sym: Symbol) = {
- if (!sym.isExternal && !symData.contains(sym)) {
- if (settings.debug.value) log("pickling " + sym);
- pickle.putSymbol(sym);
- symData(sym) = pickle;
- }
+ def pickle(tree: Tree): unit = {
+
+ def add(sym: Symbol, pickle: Pickle) = {
+ if (!sym.isExternal && !symData.contains(sym)) {
+ if (settings.debug.value) log("pickling " + sym);
+ pickle.putSymbol(sym);
+ symData(sym) = pickle;
}
- add(sym);
- add(sym.linkedSym);
- pickle.finish
- case _ =>
+ }
+
+ tree match {
+ case PackageDef(_, stats) => stats foreach pickle;
+ case ClassDef(_, _, _, _, _) | ModuleDef(_, _, _) =>
+ val sym = tree.symbol;
+ val pickle = new Pickle(sym.name.toTermName, sym.owner);
+ add(sym, pickle);
+ add(sym.linkedSym, pickle);
+ pickle.finish
+ case _ =>
+ }
}
pickle(unit.body);
}
diff --git a/sources/scala/tools/scalac/transformer/TransMatch.scala b/sources/scala/tools/scalac/transformer/TransMatch.scala
index 9cb31d25c2..2c67ed2a0a 100644
--- a/sources/scala/tools/scalac/transformer/TransMatch.scala
+++ b/sources/scala/tools/scalac/transformer/TransMatch.scala
@@ -172,9 +172,18 @@ class TransMatch( global:scalac_Global )
//Console.println("in TreeCloner: type (post) = "+symbol.getType());
//System.out.println("done TreeCloner: Bind"+symbol);
return symbol;
+
+ case _ : ClassDef =>
+
+ throw new ApplicationError("sorry, cannot compile this correctly in this scala version. Move your classes, fundefs etc out of the pattern body, please, and wait for nsc.");
+ case _ : DefDef =>
+ throw new ApplicationError("sorry, cannot compile this correctly in this scala version. Move your classes, fundefs etc out of the pattern body, please, and wait for nsc.");
+ // tree.symbol();
+
+ case Ident(_) if tree.symbol() == global.definitions.PATTERN_WILDCARD =>
+ tree.symbol()
+
case _ =>
- //if(tree.definesSymbol())
- // tree.symbol();
super.getSymbolFor(tree);
}