diff --git a/tests/neg-deep-subtype/i4297.scala b/tests/neg-deep-subtype/i4297.scala deleted file mode 100644 index 9112de9de79b..000000000000 --- a/tests/neg-deep-subtype/i4297.scala +++ /dev/null @@ -1,13 +0,0 @@ -//> using options -Xfatal-warnings - -class Test { - def test[X <: Option[Int]](x: X) = x.isInstanceOf[Some[Int]] - def test1[Y <: Int, X <: Option[Y]](x: X) = x.isInstanceOf[Some[Int]] - def test2(x: Any) = x.isInstanceOf[Function1[Nothing, _]] - def test3a(x: Any) = x.isInstanceOf[Function1[Any, _]] // error - def test3b(x: Any) = x.isInstanceOf[Function1[Int, _]] // error - def test4[Y <: Int, X <: Function1[Y, Unit]](x: X) = x.isInstanceOf[Function1[Int, _]] // error - def test5[Y <: Int, X <: Function1[Y, Unit]](x: X) = x.isInstanceOf[Function1[Int, Unit]] // error - def test6[Y <: Int, X <: Function1[Y, Unit]](x: X) = x.isInstanceOf[Function1[Int, Any]] // error - def test7[Y <: Int, X <: Function1[Y, Unit]](x: X) = x.isInstanceOf[Function1[_, Unit]] -} diff --git a/tests/neg-macros/i9570.check b/tests/neg-macros/i9570.check new file mode 100644 index 000000000000..1e546c8cc485 --- /dev/null +++ b/tests/neg-macros/i9570.check @@ -0,0 +1,4 @@ +-- Error: tests/neg-macros/i9570.scala:15:21 --------------------------------------------------------------------------- +15 | case '{HCons(_,$t)} => // error + | ^ + | Use of `_` for lambda in quoted pattern. Use explicit lambda instead or use `$_` to match any term. diff --git a/tests/neg-macros/i9570.scala b/tests/neg-macros/i9570.scala index 9242fd2e9bbd..0ac78285355c 100644 --- a/tests/neg-macros/i9570.scala +++ b/tests/neg-macros/i9570.scala @@ -12,7 +12,7 @@ object Macros { private def sizeImpl(e: Expr[HList], n:Int)(using qctx:Quotes): Expr[Int] = { import quotes.reflect.* e match { - case '{HCons(_,$t)} => // error if run with fatal warinings in BootstrappedOnlyCompilationTests + case '{HCons(_,$t)} => // error sizeImpl(t,n+1) case '{HNil} => Expr(n) } diff --git a/tests/neg-macros/macro-deprecation.check b/tests/neg-macros/macro-deprecation.check new file mode 100644 index 000000000000..eaea18315e92 --- /dev/null +++ b/tests/neg-macros/macro-deprecation.check @@ -0,0 +1,4 @@ +-- Error: tests/neg-macros/macro-deprecation.scala:5:18 ---------------------------------------------------------------- +5 |inline def f = ${ impl } // error + | ^^^^ + | method impl is deprecated diff --git a/tests/neg-macros/macro-deprecation.scala b/tests/neg-macros/macro-deprecation.scala index ad1cdda001bb..ffa146ef361c 100644 --- a/tests/neg-macros/macro-deprecation.scala +++ b/tests/neg-macros/macro-deprecation.scala @@ -3,4 +3,4 @@ import scala.quoted.* inline def f = ${ impl } // error -@deprecated def impl(using Quotes) = '{1} +@deprecated def impl(using Quotes) = '{1} \ No newline at end of file