aboutsummaryrefslogtreecommitdiff
path: root/tests/pending/run
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pending/run')
-rw-r--r--tests/pending/run/t5629b.check10
-rw-r--r--tests/pending/run/t5629b.scala36
-rw-r--r--tests/pending/run/t889.check1
-rw-r--r--tests/pending/run/t889.scala9
4 files changed, 0 insertions, 56 deletions
diff --git a/tests/pending/run/t5629b.check b/tests/pending/run/t5629b.check
deleted file mode 100644
index e0f25f0b0..000000000
--- a/tests/pending/run/t5629b.check
+++ /dev/null
@@ -1,10 +0,0 @@
-=== pf(1):
-MySmartPF.apply entered...
-newPF.applyOrElse entered...
-default
-scala.MatchError: 1 (of class java.lang.Integer)
-=== pf(42):
-MySmartPF.apply entered...
-newPF.applyOrElse entered...
-ok
-=== done
diff --git a/tests/pending/run/t5629b.scala b/tests/pending/run/t5629b.scala
deleted file mode 100644
index 9cee18893..000000000
--- a/tests/pending/run/t5629b.scala
+++ /dev/null
@@ -1,36 +0,0 @@
-object Test extends dotty.runtime.LegacyApp {
-
- trait MyPF[@specialized(Int) -A] extends (A => Unit) {
- def isDefinedAt(x: A): Boolean
- def applyOrElse[A1 <: A](x: A1, default: A1 => Unit): Unit = {
- println("MyPF.applyOrElse entered...")
- if (isDefinedAt(x)) apply(x) else default(x)
- }
- }
-
- trait MySmartPF[@specialized(Int) -A] extends MyPF[A] {
- def apply(x: A): Unit = {
- println("MySmartPF.apply entered...")
- applyOrElse(x, { default: Any => throw new MatchError(default) })
- }
- }
-
- type T = Int
- //type T = Any
-
- def newPF(test: T): MyPF[T] = new MySmartPF[T] {
- def isDefinedAt(x: T): Boolean = x != test
- override def applyOrElse[A1 <: T](x: A1, default: A1 => Unit): Unit = {
- println("newPF.applyOrElse entered...")
- if (x != test) { println("ok"); () } else { println("default"); default(x) }
- }
- }
-
- val pf = newPF(1)
- println("=== pf(1):")
- try { pf(1) } catch { case x: Throwable => println(x) }
- println("=== pf(42):")
- pf(42)
- println("=== done")
-
-}
diff --git a/tests/pending/run/t889.check b/tests/pending/run/t889.check
deleted file mode 100644
index 67ca2bf46..000000000
--- a/tests/pending/run/t889.check
+++ /dev/null
@@ -1 +0,0 @@
-first: a, rest: List()
diff --git a/tests/pending/run/t889.scala b/tests/pending/run/t889.scala
deleted file mode 100644
index 8e5d82412..000000000
--- a/tests/pending/run/t889.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-object Test extends dotty.runtime.LegacyApp {
-
- val a = List("a")
-
- a match {
- case Seq("a", "b", rest : _*) => println("a, b, " + rest)
- case Seq(first, rest : _*) => println("first: " + first + ", rest: " + rest)
- }
-}