summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorburaq <buraq@epfl.ch>2005-06-24 17:06:36 +0000
committerburaq <buraq@epfl.ch>2005-06-24 17:06:36 +0000
commitebb096e96fdfb90967116dd9c11b08f39731ea64 (patch)
treec26a97f27aa99b2df34e3428e8842dfd5ab4464e /sources
parentc77239218d3612b33bcaa7d46aaa85f3e7400917 (diff)
downloadscala-ebb096e96fdfb90967116dd9c11b08f39731ea64.tar.gz
scala-ebb096e96fdfb90967116dd9c11b08f39731ea64.tar.bz2
scala-ebb096e96fdfb90967116dd9c11b08f39731ea64.zip
temporarily added an if that takes care of patt...
temporarily added an if that takes care of patterns
Diffstat (limited to 'sources')
-rwxr-xr-xsources/scala/tools/nsc/transform/UnCurry.scala9
1 files changed, 7 insertions, 2 deletions
diff --git a/sources/scala/tools/nsc/transform/UnCurry.scala b/sources/scala/tools/nsc/transform/UnCurry.scala
index 03de525857..db819a799f 100755
--- a/sources/scala/tools/nsc/transform/UnCurry.scala
+++ b/sources/scala/tools/nsc/transform/UnCurry.scala
@@ -90,8 +90,13 @@ abstract class UnCurry extends InfoTransform {
val args1 =
formals.last match {
case TypeRef(pre, sym, List(elempt)) if (sym == RepeatedParamClass) =>
- def mkSequence(args: List[Tree]) = atPos(pos)(
- ArrayValue(TypeTree(elempt), args) setType formals.last);
+ def mkSequence(args: List[Tree]) =
+ if(inPattern) /* buraq adds TEMPORARILY */
+ atPos(pos)(Sequence(args) setType formals.last); /* eventually */
+ else /* recognize ArrayValue*/
+ atPos(pos)(
+ ArrayValue(TypeTree(elempt), args) setType formals.last);
+
if (args.isEmpty) List(mkSequence(args))
else {
val suffix = args.last match {