summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBurak Emir <emir@epfl.ch>2008-04-07 01:37:29 +0000
committerBurak Emir <emir@epfl.ch>2008-04-07 01:37:29 +0000
commitfbd2b0caac60c33408c0dd1906855617c4e188fb (patch)
treefa1a248f16f7e62fc363348c8a235e6d224985f8 /src
parentc04fa9cd2214689620cacfc6c9ddbf1634942a95 (diff)
downloadscala-fbd2b0caac60c33408c0dd1906855617c4e188fb.tar.gz
scala-fbd2b0caac60c33408c0dd1906855617c4e188fb.tar.bz2
scala-fbd2b0caac60c33408c0dd1906855617c4e188fb.zip
fixed #522
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/matching/ParallelMatching.scala12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
index 5b6e565e04..9204b6f1db 100644
--- a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
+++ b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
@@ -396,8 +396,9 @@ trait ParallelMatching {
}
}
val ures = newVarCapture(ua.pos, app.tpe)
- val n = args.length
- val uacall = typedValDef(ures, Apply(fn, mkIdent(scrutinee) :: appargs.tail))
+ val arg0 = mkIdent(scrutinee)
+ val rhs = Apply(fn, arg0 :: appargs.tail) setType ures.tpe
+ val uacall = typedValDef(ures, rhs)
val nrowsOther = column.tail.zip(rest.row.tail) flatMap {
case (pat, Row(ps, subst, g, bx)) =>
@@ -405,8 +406,11 @@ trait ParallelMatching {
case sameUnapplyCall(_) => Nil
case _ => List(Row(pat::ps, subst, g, bx))
}}
- val nrepFail = if (nrowsOther.isEmpty) None else Some(rep.make(scrutinee::rest.temp, nrowsOther))
- n match {
+ val nrepFail = if (nrowsOther.isEmpty)
+ None
+ else
+ Some(rep.make(scrutinee::rest.temp, nrowsOther))
+ args.length match {
case 0 => // special case for unapply(), app.tpe is boolean
val ntemps = scrutinee :: rest.temp
val nrows = column.zip(rest.row) map {