summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorDavid MacIver <david.maciver@gmail.com>2008-10-26 12:52:21 +0000
committerDavid MacIver <david.maciver@gmail.com>2008-10-26 12:52:21 +0000
commitced4ddfef6b26f5aa84960289bb08c4cb883d071 (patch)
treecafb660fe0acce6d8b141d618b03ae3cc863cb23 /src/compiler
parentbd61de26a34e6ca8f09b1467ec595d829bb6ded3 (diff)
downloadscala-ced4ddfef6b26f5aa84960289bb08c4cb883d071.tar.gz
scala-ced4ddfef6b26f5aa84960289bb08c4cb883d071.tar.bz2
scala-ced4ddfef6b26f5aa84960289bb08c4cb883d071.zip
Fix to #1450. Moved test from pending.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/matching/CodeFactory.scala4
-rw-r--r--src/compiler/scala/tools/nsc/symtab/StdNames.scala1
2 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/CodeFactory.scala b/src/compiler/scala/tools/nsc/matching/CodeFactory.scala
index ff8582edea..3d565b7eaa 100644
--- a/src/compiler/scala/tools/nsc/matching/CodeFactory.scala
+++ b/src/compiler/scala/tools/nsc/matching/CodeFactory.scala
@@ -48,7 +48,6 @@ trait CodeFactory {
/** returns A for T <: Sequence[ A ]
*/
final def getElemType_Sequence(tpe: Type): Type = {
- //System.err.println("getElemType_Sequence("+tpe.widen()+")")
val tpe1 = tpe.widen.baseType(definitions.SeqClass)
if (tpe1 == NoType)
@@ -66,8 +65,7 @@ trait CodeFactory {
/** for tree of sequence type, returns tree that drops first i elements */
final def seqDrop(sel:Tree, ix: Int) = if (ix == 0) sel else
- typed { Apply(Select(Select(sel, nme.toList), nme.drop),
- List(Literal(Constant(ix)))) }
+ typed { Select(Apply(Select(sel, nme.drop), List(Literal(Constant(ix)))), nme.toSeq) }
/** for tree of sequence type, returns tree that drops first i elements */
final def seqElement(sel:Tree, ix: Int) =
diff --git a/src/compiler/scala/tools/nsc/symtab/StdNames.scala b/src/compiler/scala/tools/nsc/symtab/StdNames.scala
index c230cb5ab0..f45f581d6c 100644
--- a/src/compiler/scala/tools/nsc/symtab/StdNames.scala
+++ b/src/compiler/scala/tools/nsc/symtab/StdNames.scala
@@ -354,6 +354,7 @@ trait StdNames {
val tag = newTermName("$tag")
val tail = newTermName("tail")
val toList = newTermName("toList")
+ val toSeq = newTermName("toSeq")
val toString_ = newTermName("toString")
val clone_ = newTermName("clone")
val that = newTermName("that")