diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index 0b9063474e62..95b5362d77c0 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -216,8 +216,6 @@ class CompilationTests { @Test def checkInitGlobal: Unit = { implicit val testGroup: TestGroup = TestGroup("checkInitGlobal") val options = defaultOptions.and("-Ysafe-init-global", "-Xfatal-warnings") - compileFilesInDir("tests/init-global/neg", options).checkExpectedErrors() - compileFilesInDir("tests/init-global/pos", options).checkCompile() compileFilesInDir("tests/init-global/neg", options, FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyBlacklisted)).checkExpectedErrors() compileFilesInDir("tests/init-global/warn", defaultOptions.and("-Ysafe-init-global"), FileFilter.exclude(TestSources.negInitGlobalScala2LibraryTastyBlacklisted)).checkWarnings() compileFilesInDir("tests/init-global/pos", options, FileFilter.exclude(TestSources.posInitGlobalScala2LibraryTastyBlacklisted)).checkCompile() diff --git a/tests/neg-scalajs/enumeration-warnings.check b/tests/neg-scalajs/enumeration-warnings.check index 5d791be5928a..b356a150daa5 100644 --- a/tests/neg-scalajs/enumeration-warnings.check +++ b/tests/neg-scalajs/enumeration-warnings.check @@ -1,61 +1,60 @@ --- Warning: tests/neg-scalajs/enumeration-warnings.scala:6:4 ----------------------------------------------------------- -6 | Value // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:6:4 ------------------------------------------------------------- +6 | Value // error | ^^^^^ | Could not transform call to scala.Enumeration.Value. | The resulting program is unlikely to function properly as this operation requires reflection. --- Warning: tests/neg-scalajs/enumeration-warnings.scala:10:9 ---------------------------------------------------------- -10 | Value(4) // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:10:9 ------------------------------------------------------------ +10 | Value(4) // error | ^^^^^^^^ | Could not transform call to scala.Enumeration.Value. | The resulting program is unlikely to function properly as this operation requires reflection. --- Warning: tests/neg-scalajs/enumeration-warnings.scala:15:15 --------------------------------------------------------- -15 | val a = Value(null) // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:15:15 ----------------------------------------------------------- +15 | val a = Value(null) // error | ^^^^^^^^^^^ | Passing null as name to scala.Enumeration.Value requires reflection at run-time. | The resulting program is unlikely to function properly. --- Warning: tests/neg-scalajs/enumeration-warnings.scala:16:15 --------------------------------------------------------- -16 | val b = Value(10, null) // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:16:15 ----------------------------------------------------------- +16 | val b = Value(10, null) // error | ^^^^^^^^^^^^^^^ | Passing null as name to scala.Enumeration.Value requires reflection at run-time. | The resulting program is unlikely to function properly. --- Warning: tests/neg-scalajs/enumeration-warnings.scala:20:10 --------------------------------------------------------- -20 | val a = new Val // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:20:10 ----------------------------------------------------------- +20 | val a = new Val // error | ^^^^^^^ | Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time. | The resulting program is unlikely to function properly. --- Warning: tests/neg-scalajs/enumeration-warnings.scala:21:10 --------------------------------------------------------- -21 | val b = new Val(10) // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:21:10 ----------------------------------------------------------- +21 | val b = new Val(10) // error | ^^^^^^^^^^^ | Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time. | The resulting program is unlikely to function properly. --- Warning: tests/neg-scalajs/enumeration-warnings.scala:25:10 --------------------------------------------------------- -25 | val a = new Val(null) // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:25:10 ----------------------------------------------------------- +25 | val a = new Val(null) // error | ^^^^^^^^^^^^^ | Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time. | The resulting program is unlikely to function properly. --- Warning: tests/neg-scalajs/enumeration-warnings.scala:26:10 --------------------------------------------------------- -26 | val b = new Val(10, null) // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:26:10 ----------------------------------------------------------- +26 | val b = new Val(10, null) // error | ^^^^^^^^^^^^^^^^^ | Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time. | The resulting program is unlikely to function properly. --- Warning: tests/neg-scalajs/enumeration-warnings.scala:30:31 --------------------------------------------------------- -30 | protected class Val1 extends Val // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:30:31 ----------------------------------------------------------- +30 | protected class Val1 extends Val // error | ^^^ | Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time. | The resulting program is unlikely to function properly. --- Warning: tests/neg-scalajs/enumeration-warnings.scala:31:31 --------------------------------------------------------- -31 | protected class Val2 extends Val(1) // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:31:31 ----------------------------------------------------------- +31 | protected class Val2 extends Val(1) // error | ^^^^^^ | Calls to the non-string constructors of scala.Enumeration.Val require reflection at run-time. | The resulting program is unlikely to function properly. --- Warning: tests/neg-scalajs/enumeration-warnings.scala:35:31 --------------------------------------------------------- -35 | protected class Val1 extends Val(null) // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:35:31 ----------------------------------------------------------- +35 | protected class Val1 extends Val(null) // error | ^^^^^^^^^ | Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time. | The resulting program is unlikely to function properly. --- Warning: tests/neg-scalajs/enumeration-warnings.scala:36:31 --------------------------------------------------------- -36 | protected class Val2 extends Val(1, null) // warn +-- Error: tests/neg-scalajs/enumeration-warnings.scala:36:31 ----------------------------------------------------------- +36 | protected class Val2 extends Val(1, null) // error | ^^^^^^^^^^^^ | Passing null as name to a constructor of scala.Enumeration.Val requires reflection at run-time. | The resulting program is unlikely to function properly. -No warnings can be incurred under -Werror. diff --git a/tests/neg-scalajs/enumeration-warnings.scala b/tests/neg-scalajs/enumeration-warnings.scala index 10536fef4ba6..b48ffc9500e3 100644 --- a/tests/neg-scalajs/enumeration-warnings.scala +++ b/tests/neg-scalajs/enumeration-warnings.scala @@ -3,37 +3,35 @@ class UnableToTransformValue extends Enumeration { val a = { println("oh, oh!") - Value // warn + Value // error } val b = { println("oh, oh!") - Value(4) // warn + Value(4) // error } } class ValueWithNullName extends Enumeration { - val a = Value(null) // warn - val b = Value(10, null) // warn + val a = Value(null) // error + val b = Value(10, null) // error } class NewValWithNoName extends Enumeration { - val a = new Val // warn - val b = new Val(10) // warn + val a = new Val // error + val b = new Val(10) // error } class NewValWithNullName extends Enumeration { - val a = new Val(null) // warn - val b = new Val(10, null) // warn + val a = new Val(null) // error + val b = new Val(10, null) // error } class ExtendsValWithNoName extends Enumeration { - protected class Val1 extends Val // warn - protected class Val2 extends Val(1) // warn + protected class Val1 extends Val // error + protected class Val2 extends Val(1) // error } class ExtendsValWithNullName extends Enumeration { - protected class Val1 extends Val(null) // warn - protected class Val2 extends Val(1, null) // warn + protected class Val1 extends Val(null) // error + protected class Val2 extends Val(1, null) // error } - -// nopos-error: No warnings can be incurred under -Werror. diff --git a/tests/patmat/i14407.dupe.check b/tests/patmat/i14407.dupe.check index e6f742314d98..b0605bcd95e5 100644 --- a/tests/patmat/i14407.dupe.check +++ b/tests/patmat/i14407.dupe.check @@ -1,2 +1 @@ 6: Match case Unreachable -0: No Kind diff --git a/tests/run/getclass.check b/tests/run/getclass.check index f5f412ab2edc..ea73f6127c8f 100644 --- a/tests/run/getclass.check +++ b/tests/run/getclass.check @@ -22,5 +22,5 @@ class [D class [Lscala.collection.immutable.List; Functions: -class Test$$$Lambda/ -class Test$$$Lambda/ +class Test$$$Lambda$ +class Test$$$Lambda$