summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/matching/CodeFactory.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/scala/tools/nsc/matching/CodeFactory.scala')
-rw-r--r--src/compiler/scala/tools/nsc/matching/CodeFactory.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/matching/CodeFactory.scala b/src/compiler/scala/tools/nsc/matching/CodeFactory.scala
index ee5741dfa1..d2facaf2a9 100644
--- a/src/compiler/scala/tools/nsc/matching/CodeFactory.scala
+++ b/src/compiler/scala/tools/nsc/matching/CodeFactory.scala
@@ -132,12 +132,12 @@ 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
- Apply(Select(Select(sel, nme.toList), nme.drop),
- List(Literal(Constant(ix))))
+ typed { Apply(Select(Select(sel, nme.toList), nme.drop),
+ List(Literal(Constant(ix)))) }
/** for tree of sequence type, returns tree that drops first i elements */
- final def seqElement(sel:Tree, ix: Int) = if (ix == 0) sel else
- Apply(Select(sel, sel.tpe.member(nme.apply)), List(Literal(Constant(ix))))
+ final def seqElement(sel:Tree, ix: Int) =
+ typed { Apply(Select(sel, sel.tpe.member(nme.apply)), List(Literal(Constant(ix)))) }
/** for tree of sequence type, returns boolean tree that has length i */
final def seqHasLength(sel: Tree, ntpe: Type, i: Int) =