diff options
author | Burak Emir <emir@epfl.ch> | 2007-07-06 13:15:07 +0000 |
---|---|---|
committer | Burak Emir <emir@epfl.ch> | 2007-07-06 13:15:07 +0000 |
commit | ad89e1d2ffa6860b771bb7753b5cac93f1b24fa4 (patch) | |
tree | 405f5085591fa5ccb5ed5b695aea118bd450f955 | |
parent | a69444835511b950d044db2631e34087ac2e3b96 (diff) | |
download | scala-ad89e1d2ffa6860b771bb7753b5cac93f1b24fa4.tar.gz scala-ad89e1d2ffa6860b771bb7753b5cac93f1b24fa4.tar.bz2 scala-ad89e1d2ffa6860b771bb7753b5cac93f1b24fa4.zip |
fixed bug #1033
-rw-r--r-- | src/compiler/scala/tools/nsc/matching/ParallelMatching.scala | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala index e44f06b484..5a4fe958f5 100644 --- a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala +++ b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala @@ -338,8 +338,9 @@ trait ParallelMatching { //Console.println("patternType <:< (current)pat.tpe = "+(patternType <:< pat.tpe)) //Console.println("(current)pat.tpe =:= patternType = "+(pat.tpe <:< patternType)) - sr = pat match { - + sr = strip(pat)._2 match { + case _: Bind => + throw new FatalError("internal error, no bind allowed here ") case a:Alternative => if(settings_debug) { Console.println("this may not happen, alternatives should be preprocessed away") @@ -407,18 +408,26 @@ trait ParallelMatching { } else Nil // (***) var subtests = subsumed +//var moreSpecificIndices:Option[List[Int]] = None + //Console.println("subtests BEFORE "+subtests) if(moreSpecific.exists { x => x != EmptyTree }) { + //moreSpecificIndices = Some(Nil) ntemps = casted::ntemps // (***) - subtests = moreSpecific.zip(subsumed) map { case (mspat, (j,pats)) => (j,mspat::pats) } + subtests = moreSpecific.zip(subsumed) map { + case (mspat, (j,pats)) => + //moreSpecificIndices = Some(j::moreSpecificIndices) + (j,mspat::pats) + } //Console.println("MOS "+subtests) } ntemps = ntemps ::: rest.temp val ntriples = subtests map { case (j,pats) => - val (vs,_) = strip(column(j)) + val (vs,thePat) = strip(column(j)) val (opats,osubst,og,ob) = rest.row(j) - val subst1 = vs map { v => (v,casted) } + val subst1 = //if(!moreSpecificIndices.isEmpty && moreSpecificIndices.contains(j)) Nil /*morespecific?*/ else + vs map { v => (v,casted) } //Console.println("j = "+j) //Console.println("pats:"+pats) //Console.println("opats:"+pats) |