diff options
Diffstat (limited to 'tests/untried/pos')
-rw-r--r-- | tests/untried/pos/t1672.scala | 10 | ||||
-rw-r--r-- | tests/untried/pos/t4649.flags | 1 | ||||
-rw-r--r-- | tests/untried/pos/t4649.scala | 6 | ||||
-rw-r--r-- | tests/untried/pos/t6479.scala | 56 | ||||
-rw-r--r-- | tests/untried/pos/t6574.scala | 19 | ||||
-rw-r--r-- | tests/untried/pos/t6891.flags | 1 | ||||
-rw-r--r-- | tests/untried/pos/t6891.scala | 26 |
7 files changed, 0 insertions, 119 deletions
diff --git a/tests/untried/pos/t1672.scala b/tests/untried/pos/t1672.scala deleted file mode 100644 index 5ee6bb175..000000000 --- a/tests/untried/pos/t1672.scala +++ /dev/null @@ -1,10 +0,0 @@ -object Test { - @annotation.tailrec - def bar : Nothing = { - try { - throw new RuntimeException - } catch { - case _: Throwable => bar - } - } -} diff --git a/tests/untried/pos/t4649.flags b/tests/untried/pos/t4649.flags deleted file mode 100644 index e8fb65d50..000000000 --- a/tests/untried/pos/t4649.flags +++ /dev/null @@ -1 +0,0 @@ --Xfatal-warnings
\ No newline at end of file diff --git a/tests/untried/pos/t4649.scala b/tests/untried/pos/t4649.scala deleted file mode 100644 index 0d6caa8d7..000000000 --- a/tests/untried/pos/t4649.scala +++ /dev/null @@ -1,6 +0,0 @@ -object Test { - // @annotation.tailrec - def lazyFilter[E](s: Stream[E], p: E => Boolean): Stream[E] = s match { - case h #:: t => if (p(h)) h #:: lazyFilter(t, p) else lazyFilter(t, p) - } -} diff --git a/tests/untried/pos/t6479.scala b/tests/untried/pos/t6479.scala deleted file mode 100644 index e4a4ff601..000000000 --- a/tests/untried/pos/t6479.scala +++ /dev/null @@ -1,56 +0,0 @@ -object TailrecAfterTryCatch { - - @annotation.tailrec - final def good1(): Unit = { - 1 match { - case 2 => { - try { - // return - } catch { - case e: ClassNotFoundException => - } - good1() - } - } - } - - @annotation.tailrec - final def good2(): Unit = { - //1 match { - // case 2 => { - try { - return - } catch { - case e: ClassNotFoundException => - } - good2() - // } - //} - } - - @annotation.tailrec - final def good3(): Unit = { - val 1 = 2 - try { - return - } catch { - case e: ClassNotFoundException => - } - good3() - } - - @annotation.tailrec - final def bad(): Unit = { - 1 match { - case 2 => { - try { - return - } catch { - case e: ClassNotFoundException => - } - bad() - } - } - } - -} diff --git a/tests/untried/pos/t6574.scala b/tests/untried/pos/t6574.scala deleted file mode 100644 index 6bb0042c6..000000000 --- a/tests/untried/pos/t6574.scala +++ /dev/null @@ -1,19 +0,0 @@ -class Bad[X, Y](val v: Int) extends AnyVal { - def vv = v - @annotation.tailrec final def foo[Z](a: Int)(b: String): Unit = { - this.foo[Z](a)(b) - } - - @annotation.tailrec final def differentReceiver {: Unit = - {(); new Bad[X, Y](0)}.differentReceiver - } - - @annotation.tailrec final def dependent[Z](a: Int)(b: String): b.type = { - this.dependent[Z](a)(b) - } -} - -class HK[M[_]](val v: Int) extends AnyVal { - def hk[N[_]]: Unit = if (false) hk[M] else () -} - diff --git a/tests/untried/pos/t6891.flags b/tests/untried/pos/t6891.flags deleted file mode 100644 index fe048006a..000000000 --- a/tests/untried/pos/t6891.flags +++ /dev/null @@ -1 +0,0 @@ --Ycheck:extmethods -Xfatal-warnings
\ No newline at end of file diff --git a/tests/untried/pos/t6891.scala b/tests/untried/pos/t6891.scala deleted file mode 100644 index bed2d0d77..000000000 --- a/tests/untried/pos/t6891.scala +++ /dev/null @@ -1,26 +0,0 @@ -object O { - implicit class Foo[A](val value: String) extends AnyVal { - def bippy() = { - @annotation.tailrec def loop(x: A): Unit = loop(x) - () - } - - def boppy() = { - @annotation.tailrec def loop(x: value.type): Unit = loop(x) - () - } - - def beppy[C](c: => C) = { - () => c - @annotation.tailrec def loop(x: value.type): Unit = loop(x) - () => c - () - } - } - // uncaught exception during compilation: Types$TypeError("type mismatch; - // found : A(in method bippy$extension) - // required: A(in class Foo)") @ scala.tools.nsc.typechecker.Contexts$Context.issueCommon(Contexts.scala:396) - // error: scala.reflect.internal.Types$TypeError: type mismatch; - // found : A(in method bippy$extension) - // required: A(in class Foo) -} |