summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2007-07-02 12:20:00 +0000
committerBurak Emir <emir@epfl.ch>2007-07-02 12:20:00 +0000
commitb0cee5943fd5d3ca077e000eafee4bde476c33d8 (patch)
treecdc2aed9bc81f80fe26b4006c50ec3fc60da0a61 /src/compiler
parent81a4d20bf38e5348e5b1b2faa0fcedafa458aca3 (diff)
downloadscala-b0cee5943fd5d3ca077e000eafee4bde476c33d8.tar.gz
scala-b0cee5943fd5d3ca077e000eafee4bde476c33d8.tar.bz2
scala-b0cee5943fd5d3ca077e000eafee4bde476c33d8.zip
fixed pattern matching, variable binding problem
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/matching/ParallelMatching.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
index cbebd46486..67e66d6649 100644
--- a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
+++ b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
@@ -189,7 +189,7 @@ trait ParallelMatching {
val nrowsOther = column.tail.zip(rest.row.tail) flatMap { case (pat,(ps,subst,g,b)) => strip(pat)._2 match {
case UnApply(Apply(fn1,_),args) if fn.symbol==fn1.symbol => Nil
- case p => List((p::ps, subst, g, b))
+ case p => List((pat::ps, subst, g, b))
}}
val nrepFail = if(nrowsOther.isEmpty) None else Some(Rep(scrutinee::rest.temp, nrowsOther))
//Console.println("active = "+column.head+" / nrepFail = "+nrepFail)
@@ -201,7 +201,7 @@ trait ParallelMatching {
rootvdefs = (pvars map bindToScrutinee) ::: rootvdefs
(EmptyTree::ps, subst, g, b)
case (_, p) =>
- ( p ::ps, subst, g, b)
+ ( pat ::ps, subst, g, b)
}}
(uacall, rootvdefs, Rep(ntemps, nrows), nrepFail)
@@ -214,7 +214,7 @@ trait ParallelMatching {
rootvdefs = (pvars map bindToScrutinee) ::: rootvdefs
(args(0) :: EmptyTree :: ps, subst, g, b)
case (_, p) =>
- (EmptyTree :: p ::ps, subst, g, b)
+ (EmptyTree :: pat ::ps, subst, g, b)
}}
(uacall, rootvdefs:::List( typer.typed { ValDef(vsym, Select(Ident(ures), nme.get) )}), Rep(ntemps, nrows), nrepFail)