diff options
author | Nicolas Stucki <nicolas.stucki@gmail.com> | 2017-03-01 10:11:49 +0100 |
---|---|---|
committer | Nicolas Stucki <nicolas.stucki@gmail.com> | 2017-03-01 13:03:44 +0100 |
commit | be5720c18ca6768c7e72d4258677952848db2bb4 (patch) | |
tree | a781b4f8b2772de09db54352d2d50602a1a0a4a6 /compiler/src/strawman | |
parent | 1a490393d766039332bfccb8b85f264f22c9e9cc (diff) | |
download | dotty-be5720c18ca6768c7e72d4258677952848db2bb4.tar.gz dotty-be5720c18ca6768c7e72d4258677952848db2bb4.tar.bz2 dotty-be5720c18ca6768c7e72d4258677952848db2bb4.zip |
Add @tailrec to avoid regressions.
Diffstat (limited to 'compiler/src/strawman')
-rw-r--r-- | compiler/src/strawman/collections/CollectionStrawMan6.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/strawman/collections/CollectionStrawMan6.scala b/compiler/src/strawman/collections/CollectionStrawMan6.scala index 50de63488..c2b87cb0b 100644 --- a/compiler/src/strawman/collections/CollectionStrawMan6.scala +++ b/compiler/src/strawman/collections/CollectionStrawMan6.scala @@ -244,7 +244,7 @@ object CollectionStrawMan6 extends LowPriority { * collection type. */ override def drop(n: Int): C[A @uncheckedVariance] = { // sound bcs of VarianceNote - def loop(n: Int, s: Iterable[A]): C[A] = + @tailrec def loop(n: Int, s: Iterable[A]): C[A] = if (n <= 0) s.asInstanceOf[C[A]] // implicit contract to guarantee success of asInstanceOf: // (1) coll is of type C[A] |