From 7d2d0b334184cced1f7efc0ffd71218aba1556d5 Mon Sep 17 00:00:00 2001 From: Ausmarton Zarino Fernandes Date: Sun, 5 Nov 2023 08:26:13 +0000 Subject: [PATCH] Remove deprecation warnings from existing tests --- compiler/test-resources/repl/i13208.scala | 7 +------ sbt-test/compilerReporter/i14576/Test.scala | 1 - sbt-test/compilerReporter/i14576/build.sbt | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/compiler/test-resources/repl/i13208.scala b/compiler/test-resources/repl/i13208.scala index 61ace43c732d..890116b6a247 100644 --- a/compiler/test-resources/repl/i13208.scala +++ b/compiler/test-resources/repl/i13208.scala @@ -1,8 +1,3 @@ //> using options -source:future -deprecation scala> type M[X] = X match { case Int => String case _ => Int } -scala> type N[X] = X match { case List[_] => Int } -1 warning found --- Deprecation Warning: -------------------------------------------------------- -1 | type N[X] = X match { case List[_] => Int } - | ^ - | `_` is deprecated for wildcard arguments of types: use `?` instead +scala> type N[X] = X match { case List[_] => Int } \ No newline at end of file diff --git a/sbt-test/compilerReporter/i14576/Test.scala b/sbt-test/compilerReporter/i14576/Test.scala index d94a49145f81..c6bc59ad636d 100644 --- a/sbt-test/compilerReporter/i14576/Test.scala +++ b/sbt-test/compilerReporter/i14576/Test.scala @@ -13,5 +13,4 @@ object Test: // private[this] and = _ are deprecated under -source:future private[this] var x: AnyRef = _ - // under -source:future, `_` is deprecated for wildcard arguments of types: use `?` instead val xs: List[_] = Nil diff --git a/sbt-test/compilerReporter/i14576/build.sbt b/sbt-test/compilerReporter/i14576/build.sbt index 9831c23c103e..f04d51a1b909 100644 --- a/sbt-test/compilerReporter/i14576/build.sbt +++ b/sbt-test/compilerReporter/i14576/build.sbt @@ -24,7 +24,7 @@ lazy val root = (project in file(".")) }, assertDeprecationSummary := { assert { - FakePrintWriter.messages.exists(_.contains("there were 3 deprecation warnings; re-run with -deprecation for details")) + FakePrintWriter.messages.exists(_.contains("there were 2 deprecation warnings; re-run with -deprecation for details")) } }, assertNoDeprecationSummary := {