diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/disabled/pos-scala2/i1059.scala (renamed from tests/pos-scala2/i1059.scala) | 0 | ||||
-rw-r--r-- | tests/disabled/pos/t3480.scala (renamed from tests/pos/t3480.scala) | 0 | ||||
-rw-r--r-- | tests/neg/i1255.scala | 6 | ||||
-rw-r--r-- | tests/pos/t1168.scala | 2 | ||||
-rw-r--r-- | tests/run/t6637.scala | 3 |
5 files changed, 8 insertions, 3 deletions
diff --git a/tests/pos-scala2/i1059.scala b/tests/disabled/pos-scala2/i1059.scala index cd23e1916..cd23e1916 100644 --- a/tests/pos-scala2/i1059.scala +++ b/tests/disabled/pos-scala2/i1059.scala diff --git a/tests/pos/t3480.scala b/tests/disabled/pos/t3480.scala index ba2e1a4b8..ba2e1a4b8 100644 --- a/tests/pos/t3480.scala +++ b/tests/disabled/pos/t3480.scala diff --git a/tests/neg/i1255.scala b/tests/neg/i1255.scala new file mode 100644 index 000000000..3bb7e8f25 --- /dev/null +++ b/tests/neg/i1255.scala @@ -0,0 +1,6 @@ +object Test { + def foo(x: Option[Int]) = x match { + case Some(_: Double) => true // error + case None => true + } +} diff --git a/tests/pos/t1168.scala b/tests/pos/t1168.scala index f43436812..08f1b5cd9 100644 --- a/tests/pos/t1168.scala +++ b/tests/pos/t1168.scala @@ -1,6 +1,6 @@ object Test extends App { - trait SpecialException {} + trait SpecialException extends Throwable {} try { throw new Exception diff --git a/tests/run/t6637.scala b/tests/run/t6637.scala index 7f9c3cd61..052e7f5d6 100644 --- a/tests/run/t6637.scala +++ b/tests/run/t6637.scala @@ -1,7 +1,6 @@ - object Test extends dotty.runtime.LegacyApp { try { - class A ; class B ; List().head.isInstanceOf[A with B] + List().head } catch { case _ :java.util.NoSuchElementException => println("ok") } |