summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-01-28 05:46:06 +0000
committerPaul Phillips <paulp@improving.org>2010-01-28 05:46:06 +0000
commitf6c69106d3baa59479e839727acc03ae4035519d (patch)
treeaf854700d4d9d2e0e0f330a08be2ca77c3dfe9ef /src
parent953fecc029a25c1c0cdd1ce847294bc6f7db8e33 (diff)
downloadscala-f6c69106d3baa59479e839727acc03ae4035519d.tar.gz
scala-f6c69106d3baa59479e839727acc03ae4035519d.tar.bz2
scala-f6c69106d3baa59479e839727acc03ae4035519d.zip
One of those "$.05 for the bolt, $50,000 for kn...
One of those "$.05 for the bolt, $50,000 for knowing where to put it" commits. Closes #425, #816, #2310, #2691. All credit for this patch goes to me for having the genius to know when new eyes were needed (although if you're feeling generous some could also go to walter korman for the actual debugging and code writing part.)
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/matching/ParallelMatching.scala12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
index dda679e96e..79812474ee 100644
--- a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
+++ b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
@@ -700,18 +700,12 @@ trait ParallelMatching extends ast.TreeDSL
referenceCount += 1
if (isLabellable) {
- // val mtype = MethodType(freeVars, bodyTpe)
- val mtype = MethodType(args, bodyTpe)
+ val mtype = MethodType(freeVars, bodyTpe)
_labelSym = owner.newLabel(body.pos, name) setInfo mtype
TRACE("Creating index %d: mtype = %s".format(bx, mtype))
- if (freeVars.size != args.size)
- TRACE("We will be hosed! freeVars = %s, args = %s, vdefs = %s".format(freeVars, args, vdefs))
-
- // Labelled expression - the symbols in the array (must be Idents!)
- // are those the label takes as argument
- _label = typer typedLabelDef LabelDef(_labelSym, args, body setType bodyTpe)
- TRACE("[New label] def %s%s: %s = %s".format(name, pp(args), bodyTpe, body))
+ _label = typer typedLabelDef LabelDef(_labelSym, freeVars, body setType bodyTpe)
+ TRACE("[New label] def %s%s: %s = %s".format(name, pp(freeVars), bodyTpe, body))
}
ifLabellable(vdefs, squeezedBlock(vdefs, label))