diff --git a/compiler/test/dotc/pos-test-pickling.blacklist b/compiler/test/dotc/pos-test-pickling.blacklist index 6404444be87f..5fe467d02f55 100644 --- a/compiler/test/dotc/pos-test-pickling.blacklist +++ b/compiler/test/dotc/pos-test-pickling.blacklist @@ -23,6 +23,10 @@ t5031_2.scala i16997.scala i7414.scala i17588.scala +i9804.scala +i13433.scala +i16649-irrefutable.scala +strict-pattern-bindings-3.0-migration.scala # Tree is huge and blows stack for printing Text i7034.scala diff --git a/compiler/test/dotty/tools/dotc/CompilationTests.scala b/compiler/test/dotty/tools/dotc/CompilationTests.scala index a807f1a4daab..0d07504c4df8 100644 --- a/compiler/test/dotty/tools/dotc/CompilationTests.scala +++ b/compiler/test/dotty/tools/dotc/CompilationTests.scala @@ -30,22 +30,16 @@ class CompilationTests { @Test def pos: Unit = { implicit val testGroup: TestGroup = TestGroup("compilePos") var tests = List( - compileFile("tests/pos/nullarify.scala", defaultOptions.and("-Ycheck:nullarify")), - compileFile("tests/pos-special/utf8encoded.scala", explicitUTF8), - compileFile("tests/pos-special/utf16encoded.scala", explicitUTF16), + compileFilesInDir("tests/pos", defaultOptions.and("-Ysafe-init")), + compileFilesInDir("tests/pos-deep-subtype", allowDeepSubtypes), compileFilesInDir("tests/pos-special/sourcepath/outer", defaultOptions.and("-sourcepath", "tests/pos-special/sourcepath")), compileFile("tests/pos-special/sourcepath/outer/nested/Test4.scala", defaultOptions.and("-sourcepath", "tests/pos-special/sourcepath")), - compileFilesInDir("tests/pos-special/fatal-warnings", defaultOptions.and("-Xfatal-warnings", "-deprecation", "-feature")), - compileFilesInDir("tests/pos-special/spec-t5545", defaultOptions), - compileFilesInDir("tests/pos-special/strawman-collections", allowDeepSubtypes), - compileFilesInDir("tests/pos-special/isInstanceOf", allowDeepSubtypes.and("-Xfatal-warnings")), - compileFilesInDir("tests/new", defaultOptions.and("-source", "3.2")), // just to see whether 3.2 works - compileFilesInDir("tests/pos-scala2", scala2CompatMode), + compileFilesInDir("tests/pos-scala2", defaultOptions.and("-source", "3.0-migration")), compileFilesInDir("tests/pos-custom-args/captures", defaultOptions.and("-language:experimental.captureChecking")), - compileFilesInDir("tests/pos", defaultOptions.and("-Ysafe-init")), + compileFile("tests/pos-special/utf8encoded.scala", defaultOptions.and("-encoding", "UTF8")), + compileFile("tests/pos-special/utf16encoded.scala", defaultOptions.and("-encoding", "UTF16")), // Run tests for legacy lazy vals compileFilesInDir("tests/pos", defaultOptions.and("-Ysafe-init", "-Ylegacy-lazy-vals", "-Ycheck-constraint-deps"), FileFilter.include(TestSources.posLazyValsAllowlist)), - compileFilesInDir("tests/pos-deep-subtype", allowDeepSubtypes), compileDir("tests/pos-special/java-param-names", defaultOptions.withJavacOnlyOptions("-parameters")), compileDir("tests/pos-special/stdlib", defaultOptions), ) @@ -60,7 +54,7 @@ class CompilationTests { implicit val testGroup: TestGroup = TestGroup("rewrites") aggregateTests( - compileFile("tests/rewrites/rewrites.scala", scala2CompatMode.and("-rewrite", "-indent")), + compileFile("tests/rewrites/rewrites.scala", defaultOptions.and("-source", "3.0-migration").and("-rewrite", "-indent")), compileFile("tests/rewrites/rewrites3x.scala", defaultOptions.and("-rewrite", "-source", "future-migration")), compileFile("tests/rewrites/rewrites3x-fatal-warnings.scala", defaultOptions.and("-rewrite", "-source", "future-migration", "-Xfatal-warnings")), compileFile("tests/rewrites/filtering-fors.scala", defaultOptions.and("-rewrite", "-source", "3.2-migration")), @@ -121,27 +115,14 @@ class CompilationTests { implicit val testGroup: TestGroup = TestGroup("compileNeg") aggregateTests( compileFilesInDir("tests/neg", defaultOptions), - compileFilesInDir("tests/neg-tailcall", defaultOptions), - compileFilesInDir("tests/neg-strict", defaultOptions.and("-source", "future", "-deprecation", "-Xfatal-warnings")), - compileFilesInDir("tests/neg-custom-args/allow-double-bindings", allowDoubleBindings), - compileFilesInDir("tests/neg-custom-args/allow-deep-subtypes", allowDeepSubtypes), + compileFilesInDir("tests/neg-deep-subtype", allowDeepSubtypes), compileFilesInDir("tests/neg-custom-args/captures", defaultOptions.and("-language:experimental.captureChecking")), - compileFile("tests/neg-custom-args/i1650.scala", allowDeepSubtypes), - compileFile("tests/neg-custom-args/i3882.scala", allowDeepSubtypes), - compileFile("tests/neg-custom-args/i4372.scala", allowDeepSubtypes), - compileFile("tests/neg-custom-args/i1754.scala", allowDeepSubtypes), - compileFile("tests/neg-custom-args/i12650.scala", allowDeepSubtypes), - compileFile("tests/neg-custom-args/interop-polytypes.scala", allowDeepSubtypes.and("-Yexplicit-nulls")), - compileFile("tests/neg-custom-args/conditionalWarnings.scala", allowDeepSubtypes.and("-deprecation").and("-Xfatal-warnings")), - compileFilesInDir("tests/neg-custom-args/isInstanceOf", allowDeepSubtypes and "-Xfatal-warnings"), - compileFile("tests/neg-custom-args/i3627.scala", allowDeepSubtypes), compileFile("tests/neg-custom-args/sourcepath/outer/nested/Test1.scala", defaultOptions.and("-sourcepath", "tests/neg-custom-args/sourcepath")), compileDir("tests/neg-custom-args/sourcepath2/hi", defaultOptions.and("-sourcepath", "tests/neg-custom-args/sourcepath2", "-Xfatal-warnings")), compileList("duplicate source", List( "tests/neg-custom-args/toplevel-samesource/S.scala", "tests/neg-custom-args/toplevel-samesource/nested/S.scala"), defaultOptions), - compileFile("tests/neg-custom-args/i6300.scala", allowDeepSubtypes), compileFile("tests/neg/i7575.scala", defaultOptions.withoutLanguageFeatures.and("-language:_")), ).checkExpectedErrors() } @@ -156,12 +137,9 @@ class CompilationTests { @Test def runAll: Unit = { implicit val testGroup: TestGroup = TestGroup("runAll") aggregateTests( - compileFile("tests/run-custom-args/typeclass-derivation1.scala", defaultOptions.without(yCheckOptions*)), - compileFile("tests/run-custom-args/tuple-cons.scala", allowDeepSubtypes), - compileFile("tests/run-custom-args/i5256.scala", allowDeepSubtypes), - compileFilesInDir("tests/run-custom-args/captures", allowDeepSubtypes.and("-language:experimental.captureChecking")), - compileFilesInDir("tests/run-deep-subtype", allowDeepSubtypes), compileFilesInDir("tests/run", defaultOptions.and("-Ysafe-init")), + compileFilesInDir("tests/run-deep-subtype", allowDeepSubtypes), + compileFilesInDir("tests/run-custom-args/captures", allowDeepSubtypes.and("-language:experimental.captureChecking")), // Run tests for legacy lazy vals. compileFilesInDir("tests/run", defaultOptions.and("-Ysafe-init", "-Ylegacy-lazy-vals", "-Ycheck-constraint-deps"), FileFilter.include(TestSources.runLazyValsAllowlist)), ).checkRuns() @@ -179,7 +157,6 @@ class CompilationTests { @Test def pickling: Unit = { implicit val testGroup: TestGroup = TestGroup("testPickling") aggregateTests( - compileFilesInDir("tests/new", picklingOptions), compileFilesInDir("tests/pos", picklingOptions, FileFilter.exclude(TestSources.posTestPicklingBlacklisted)), compileFilesInDir("tests/run", picklingOptions, FileFilter.exclude(TestSources.runTestPicklingBlacklisted)) ).checkCompile() @@ -189,8 +166,7 @@ class CompilationTests { def recheck: Unit = given TestGroup = TestGroup("recheck") aggregateTests( - compileFilesInDir("tests/new", recheckOptions), - compileFilesInDir("tests/run", recheckOptions, FileFilter.exclude(TestSources.runTestRecheckExcluded)) + compileFilesInDir("tests/run", defaultOptions.and("-Yrecheck-test"), FileFilter.exclude(TestSources.runTestRecheckExcluded)) //Disabled to save some time. //compileFilesInDir("tests/pos", recheckOptions, FileFilter.exclude(TestSources.posTestRecheckExcluded)), ).checkCompile() @@ -199,22 +175,22 @@ class CompilationTests { @Test def explicitNullsNeg: Unit = { implicit val testGroup: TestGroup = TestGroup("explicitNullsNeg") aggregateTests( - compileFilesInDir("tests/explicit-nulls/neg", explicitNullsOptions), - compileFilesInDir("tests/explicit-nulls/unsafe-common", explicitNullsOptions), + compileFilesInDir("tests/explicit-nulls/neg", defaultOptions and "-Yexplicit-nulls"), + compileFilesInDir("tests/explicit-nulls/unsafe-common", defaultOptions and "-Yexplicit-nulls"), ) }.checkExpectedErrors() @Test def explicitNullsPos: Unit = { implicit val testGroup: TestGroup = TestGroup("explicitNullsPos") aggregateTests( - compileFilesInDir("tests/explicit-nulls/pos", explicitNullsOptions), - compileFilesInDir("tests/explicit-nulls/unsafe-common", explicitNullsOptions and "-language:unsafeNulls"), + compileFilesInDir("tests/explicit-nulls/pos", defaultOptions and "-Yexplicit-nulls"), + compileFilesInDir("tests/explicit-nulls/unsafe-common", defaultOptions and "-Yexplicit-nulls" and "-language:unsafeNulls"), ) }.checkCompile() @Test def explicitNullsRun: Unit = { implicit val testGroup: TestGroup = TestGroup("explicitNullsRun") - compileFilesInDir("tests/explicit-nulls/run", explicitNullsOptions) + compileFilesInDir("tests/explicit-nulls/run", defaultOptions and "-Yexplicit-nulls") }.checkRuns() // initialization tests diff --git a/compiler/test/dotty/tools/vulpix/TestConfiguration.scala b/compiler/test/dotty/tools/vulpix/TestConfiguration.scala index 5d2992b50a09..21094799d8a9 100644 --- a/compiler/test/dotty/tools/vulpix/TestConfiguration.scala +++ b/compiler/test/dotty/tools/vulpix/TestConfiguration.scala @@ -84,13 +84,6 @@ object TestConfiguration { ) val picklingWithCompilerOptions = picklingOptions.withClasspath(withCompilerClasspath).withRunClasspath(withCompilerClasspath) - val recheckOptions = defaultOptions.and("-Yrecheck-test") - val scala2CompatMode = defaultOptions.and("-source", "3.0-migration") - val explicitUTF8 = defaultOptions and ("-encoding", "UTF8") - val explicitUTF16 = defaultOptions and ("-encoding", "UTF16") - - /** Enables explicit nulls */ - val explicitNullsOptions = defaultOptions and "-Yexplicit-nulls" /** Default target of the generated class files */ private def defaultTarget: String = { diff --git a/tests/neg-custom-args/isInstanceOf/1828.scala b/tests/neg-deep-subtype/1828.scala similarity index 85% rename from tests/neg-custom-args/isInstanceOf/1828.scala rename to tests/neg-deep-subtype/1828.scala index aeb83f1a1070..ae228a83e898 100644 --- a/tests/neg-custom-args/isInstanceOf/1828.scala +++ b/tests/neg-deep-subtype/1828.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class Test { def remove[S](a: S | Int, f: Int => S):S = a match { case a: S => a // error diff --git a/tests/neg-custom-args/isInstanceOf/3324b.scala b/tests/neg-deep-subtype/3324b.scala similarity index 88% rename from tests/neg-custom-args/isInstanceOf/3324b.scala rename to tests/neg-deep-subtype/3324b.scala index 8b60bff4d9da..df0cc5432eff 100644 --- a/tests/neg-custom-args/isInstanceOf/3324b.scala +++ b/tests/neg-deep-subtype/3324b.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class C[T] { val x: Any = ??? if (x.isInstanceOf[List[String]]) // error: unchecked diff --git a/tests/neg-custom-args/isInstanceOf/3324f.scala b/tests/neg-deep-subtype/3324f.scala similarity index 79% rename from tests/neg-custom-args/isInstanceOf/3324f.scala rename to tests/neg-deep-subtype/3324f.scala index 431c2710e47b..445da5cb25a0 100644 --- a/tests/neg-custom-args/isInstanceOf/3324f.scala +++ b/tests/neg-deep-subtype/3324f.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + trait C[T] class D[T] diff --git a/tests/neg-custom-args/isInstanceOf/3324g.scala b/tests/neg-deep-subtype/3324g.scala similarity index 90% rename from tests/neg-custom-args/isInstanceOf/3324g.scala rename to tests/neg-deep-subtype/3324g.scala index 5c37929eb464..a5b842e4e450 100644 --- a/tests/neg-custom-args/isInstanceOf/3324g.scala +++ b/tests/neg-deep-subtype/3324g.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class Test { trait A[+T] class B[T] extends A[T] diff --git a/tests/neg-custom-args/isInstanceOf/4075.scala.ignore b/tests/neg-deep-subtype/4075.scala.ignore similarity index 92% rename from tests/neg-custom-args/isInstanceOf/4075.scala.ignore rename to tests/neg-deep-subtype/4075.scala.ignore index 4fcbaf0331fe..4d87fdce1c81 100644 --- a/tests/neg-custom-args/isInstanceOf/4075.scala.ignore +++ b/tests/neg-deep-subtype/4075.scala.ignore @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + object Test { trait Foo case class One[+T](fst: T) diff --git a/tests/neg-custom-args/isInstanceOf/JavaSeqLiteral.scala b/tests/neg-deep-subtype/JavaSeqLiteral.scala similarity index 93% rename from tests/neg-custom-args/isInstanceOf/JavaSeqLiteral.scala rename to tests/neg-deep-subtype/JavaSeqLiteral.scala index 19f15dc0957a..6003731ae657 100644 --- a/tests/neg-custom-args/isInstanceOf/JavaSeqLiteral.scala +++ b/tests/neg-deep-subtype/JavaSeqLiteral.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + object Test1 { trait Tree[-T] diff --git a/tests/neg-custom-args/conditionalWarnings.scala b/tests/neg-deep-subtype/conditionalWarnings.scala similarity index 86% rename from tests/neg-custom-args/conditionalWarnings.scala rename to tests/neg-deep-subtype/conditionalWarnings.scala index a85e3c8af427..c4757cbb7546 100644 --- a/tests/neg-custom-args/conditionalWarnings.scala +++ b/tests/neg-deep-subtype/conditionalWarnings.scala @@ -1,5 +1,5 @@ +//> using options -deprecation -Xfatal-warnings -// run with -deprecation -Xfatal-warnings object Test { @deprecated def foo = ??? diff --git a/tests/neg-custom-args/isInstanceOf/enum-approx2.scala b/tests/neg-deep-subtype/enum-approx2.scala similarity index 88% rename from tests/neg-custom-args/isInstanceOf/enum-approx2.scala rename to tests/neg-deep-subtype/enum-approx2.scala index c7c8a6c4e1fb..bf114d9c8569 100644 --- a/tests/neg-custom-args/isInstanceOf/enum-approx2.scala +++ b/tests/neg-deep-subtype/enum-approx2.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + sealed trait Exp[T] case class Fun[A, B](f: Exp[A => B]) extends Exp[A => B] diff --git a/tests/neg-custom-args/isInstanceOf/gadt.scala b/tests/neg-deep-subtype/gadt.scala similarity index 83% rename from tests/neg-custom-args/isInstanceOf/gadt.scala rename to tests/neg-deep-subtype/gadt.scala index 940555e160e7..661c04fef373 100644 --- a/tests/neg-custom-args/isInstanceOf/gadt.scala +++ b/tests/neg-deep-subtype/gadt.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class Test { trait A[+T] class B[T] extends A[T] diff --git a/tests/neg-custom-args/isInstanceOf/html.scala b/tests/neg-deep-subtype/html.scala similarity index 93% rename from tests/neg-custom-args/isInstanceOf/html.scala rename to tests/neg-deep-subtype/html.scala index 52afde2a289b..f17cfb661505 100644 --- a/tests/neg-custom-args/isInstanceOf/html.scala +++ b/tests/neg-deep-subtype/html.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + object HTML: type AttrArg = AppliedAttr | Seq[AppliedAttr] opaque type AppliedAttr = String diff --git a/tests/neg-custom-args/allow-deep-subtypes/i11064.scala b/tests/neg-deep-subtype/i11064.scala similarity index 100% rename from tests/neg-custom-args/allow-deep-subtypes/i11064.scala rename to tests/neg-deep-subtype/i11064.scala diff --git a/tests/neg-custom-args/isInstanceOf/i11178.scala b/tests/neg-deep-subtype/i11178.scala similarity index 94% rename from tests/neg-custom-args/isInstanceOf/i11178.scala rename to tests/neg-deep-subtype/i11178.scala index 47e8b4c3acab..2ac4f9e07262 100644 --- a/tests/neg-custom-args/isInstanceOf/i11178.scala +++ b/tests/neg-deep-subtype/i11178.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + trait Box[+T] case class Foo[+S](s: S) extends Box[S] diff --git a/tests/neg-custom-args/allow-double-bindings/i1240.scala b/tests/neg-deep-subtype/i1240.scala similarity index 100% rename from tests/neg-custom-args/allow-double-bindings/i1240.scala rename to tests/neg-deep-subtype/i1240.scala diff --git a/tests/neg-custom-args/i12650.scala b/tests/neg-deep-subtype/i12650.scala similarity index 100% rename from tests/neg-custom-args/i12650.scala rename to tests/neg-deep-subtype/i12650.scala diff --git a/tests/neg-custom-args/i1650.scala b/tests/neg-deep-subtype/i1650.scala similarity index 100% rename from tests/neg-custom-args/i1650.scala rename to tests/neg-deep-subtype/i1650.scala diff --git a/tests/neg-custom-args/isInstanceOf/i17435.scala b/tests/neg-deep-subtype/i17435.scala similarity index 95% rename from tests/neg-custom-args/isInstanceOf/i17435.scala rename to tests/neg-deep-subtype/i17435.scala index 3fb624e57f7e..aec165a18f56 100644 --- a/tests/neg-custom-args/isInstanceOf/i17435.scala +++ b/tests/neg-deep-subtype/i17435.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + import scala.collection.mutable object Test: diff --git a/tests/neg-custom-args/i1754.scala b/tests/neg-deep-subtype/i1754.scala similarity index 100% rename from tests/neg-custom-args/i1754.scala rename to tests/neg-deep-subtype/i1754.scala diff --git a/tests/neg-custom-args/allow-double-bindings/i2002.scala b/tests/neg-deep-subtype/i2002.scala similarity index 100% rename from tests/neg-custom-args/allow-double-bindings/i2002.scala rename to tests/neg-deep-subtype/i2002.scala diff --git a/tests/neg-custom-args/isInstanceOf/i3324.scala b/tests/neg-deep-subtype/i3324.scala similarity index 70% rename from tests/neg-custom-args/isInstanceOf/i3324.scala rename to tests/neg-deep-subtype/i3324.scala index 9fac958e8f3c..9b1060836430 100644 --- a/tests/neg-custom-args/isInstanceOf/i3324.scala +++ b/tests/neg-deep-subtype/i3324.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class Foo { def foo(x: Any): Boolean = x.isInstanceOf[List[String]] // error diff --git a/tests/neg-custom-args/i3627.scala b/tests/neg-deep-subtype/i3627.scala similarity index 100% rename from tests/neg-custom-args/i3627.scala rename to tests/neg-deep-subtype/i3627.scala diff --git a/tests/neg-custom-args/i3882.scala b/tests/neg-deep-subtype/i3882.scala similarity index 100% rename from tests/neg-custom-args/i3882.scala rename to tests/neg-deep-subtype/i3882.scala diff --git a/tests/neg-custom-args/isInstanceOf/i4297.scala b/tests/neg-deep-subtype/i4297.scala similarity index 95% rename from tests/neg-custom-args/isInstanceOf/i4297.scala rename to tests/neg-deep-subtype/i4297.scala index 139123d15973..9112de9de79b 100644 --- a/tests/neg-custom-args/isInstanceOf/i4297.scala +++ b/tests/neg-deep-subtype/i4297.scala @@ -1,3 +1,5 @@ +//> 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]] diff --git a/tests/neg-custom-args/i4372.scala b/tests/neg-deep-subtype/i4372.scala similarity index 100% rename from tests/neg-custom-args/i4372.scala rename to tests/neg-deep-subtype/i4372.scala diff --git a/tests/neg-custom-args/isInstanceOf/i5495.scala b/tests/neg-deep-subtype/i5495.scala similarity index 82% rename from tests/neg-custom-args/isInstanceOf/i5495.scala rename to tests/neg-deep-subtype/i5495.scala index ad396f1ff6c8..7d50c9761c30 100644 --- a/tests/neg-custom-args/isInstanceOf/i5495.scala +++ b/tests/neg-deep-subtype/i5495.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class A class B diff --git a/tests/neg-custom-args/isInstanceOf/i5826.scala b/tests/neg-deep-subtype/i5826.scala similarity index 96% rename from tests/neg-custom-args/isInstanceOf/i5826.scala rename to tests/neg-deep-subtype/i5826.scala index c63bf3ab4aef..2f6bfb9f8127 100644 --- a/tests/neg-custom-args/isInstanceOf/i5826.scala +++ b/tests/neg-deep-subtype/i5826.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class Foo { def test[A]: (List[Int] | A) => Int = { case ls: List[Int] => ls.head // error, A = List[String] diff --git a/tests/neg-custom-args/isInstanceOf/i5826b.scala b/tests/neg-deep-subtype/i5826b.scala similarity index 85% rename from tests/neg-custom-args/isInstanceOf/i5826b.scala rename to tests/neg-deep-subtype/i5826b.scala index 025eb39c4f88..2ee8ac2b092a 100644 --- a/tests/neg-custom-args/isInstanceOf/i5826b.scala +++ b/tests/neg-deep-subtype/i5826b.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class Foo { def test1[A]: List[Int] | A => Int = { case ls: List[_] => ls.head // error diff --git a/tests/neg-custom-args/allow-deep-subtypes/i5877.scala b/tests/neg-deep-subtype/i5877.scala similarity index 100% rename from tests/neg-custom-args/allow-deep-subtypes/i5877.scala rename to tests/neg-deep-subtype/i5877.scala diff --git a/tests/neg-custom-args/i6300.scala b/tests/neg-deep-subtype/i6300.scala similarity index 100% rename from tests/neg-custom-args/i6300.scala rename to tests/neg-deep-subtype/i6300.scala diff --git a/tests/neg-custom-args/allow-deep-subtypes/i8464a.scala b/tests/neg-deep-subtype/i8464a.scala similarity index 100% rename from tests/neg-custom-args/allow-deep-subtypes/i8464a.scala rename to tests/neg-deep-subtype/i8464a.scala diff --git a/tests/neg-custom-args/isInstanceOf/i8932.scala b/tests/neg-deep-subtype/i8932.scala similarity index 88% rename from tests/neg-custom-args/isInstanceOf/i8932.scala rename to tests/neg-deep-subtype/i8932.scala index 84d2f7d4990a..dc2ae3358410 100644 --- a/tests/neg-custom-args/isInstanceOf/i8932.scala +++ b/tests/neg-deep-subtype/i8932.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + sealed trait Foo[+A] case class Bar[A]() extends Foo[A] diff --git a/tests/neg-custom-args/allow-deep-subtypes/i9325.scala b/tests/neg-deep-subtype/i9325.scala similarity index 100% rename from tests/neg-custom-args/allow-deep-subtypes/i9325.scala rename to tests/neg-deep-subtype/i9325.scala diff --git a/tests/neg-custom-args/interop-polytypes.scala b/tests/neg-deep-subtype/interop-polytypes.scala similarity index 89% rename from tests/neg-custom-args/interop-polytypes.scala rename to tests/neg-deep-subtype/interop-polytypes.scala index 5718e0fc564d..90922b63f7d0 100644 --- a/tests/neg-custom-args/interop-polytypes.scala +++ b/tests/neg-deep-subtype/interop-polytypes.scala @@ -1,3 +1,5 @@ +//> using options -Yexplicit-nulls + class Foo { import java.util.ArrayList // Test that return values in PolyTypes are marked as nullable. diff --git a/tests/neg-custom-args/allow-deep-subtypes/matchtype-loop2.scala b/tests/neg-deep-subtype/matchtype-loop2.scala similarity index 100% rename from tests/neg-custom-args/allow-deep-subtypes/matchtype-loop2.scala rename to tests/neg-deep-subtype/matchtype-loop2.scala diff --git a/tests/neg-custom-args/isInstanceOf/or-type-trees.scala b/tests/neg-deep-subtype/or-type-trees.scala similarity index 96% rename from tests/neg-custom-args/isInstanceOf/or-type-trees.scala rename to tests/neg-deep-subtype/or-type-trees.scala index b393578acdc7..ad86bf20e2a3 100644 --- a/tests/neg-custom-args/isInstanceOf/or-type-trees.scala +++ b/tests/neg-deep-subtype/or-type-trees.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + object Test1 { trait Tree trait Context diff --git a/tests/neg-custom-args/allow-double-bindings/overloadsOnAbstractTypes.scala b/tests/neg-deep-subtype/overloadsOnAbstractTypes.scala similarity index 100% rename from tests/neg-custom-args/allow-double-bindings/overloadsOnAbstractTypes.scala rename to tests/neg-deep-subtype/overloadsOnAbstractTypes.scala diff --git a/tests/neg-custom-args/isInstanceOf/patmat-applied.scala b/tests/neg-deep-subtype/patmat-applied.scala similarity index 84% rename from tests/neg-custom-args/isInstanceOf/patmat-applied.scala rename to tests/neg-deep-subtype/patmat-applied.scala index eaf3c240aaa1..9123f3ab2ed6 100644 --- a/tests/neg-custom-args/isInstanceOf/patmat-applied.scala +++ b/tests/neg-deep-subtype/patmat-applied.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class A[-T] class B[T] extends A[T] diff --git a/tests/neg-custom-args/isInstanceOf/refined-types.scala b/tests/neg-deep-subtype/refined-types.scala similarity index 97% rename from tests/neg-custom-args/isInstanceOf/refined-types.scala rename to tests/neg-deep-subtype/refined-types.scala index dfcc3e343099..5f5cc5a45f04 100644 --- a/tests/neg-custom-args/isInstanceOf/refined-types.scala +++ b/tests/neg-deep-subtype/refined-types.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class A class B extends A type AA = A { type T = Int } diff --git a/tests/neg-custom-args/isInstanceOf/t2755.scala b/tests/neg-deep-subtype/t2755.scala similarity index 98% rename from tests/neg-custom-args/isInstanceOf/t2755.scala rename to tests/neg-deep-subtype/t2755.scala index 9073e9253098..a8d888f3a821 100644 --- a/tests/neg-custom-args/isInstanceOf/t2755.scala +++ b/tests/neg-deep-subtype/t2755.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + // Test cases: the only place we can cut and paste without crying // ourself to sleep. object Test { diff --git a/tests/neg-custom-args/allow-double-bindings/test-typers.scala b/tests/neg-deep-subtype/test-typers.scala similarity index 100% rename from tests/neg-custom-args/allow-double-bindings/test-typers.scala rename to tests/neg-deep-subtype/test-typers.scala diff --git a/tests/neg-custom-args/isInstanceOf/type-lambda.scala b/tests/neg-deep-subtype/type-lambda.scala similarity index 88% rename from tests/neg-custom-args/isInstanceOf/type-lambda.scala rename to tests/neg-deep-subtype/type-lambda.scala index d17b3a026f4c..4c4627fe1cf3 100644 --- a/tests/neg-custom-args/isInstanceOf/type-lambda.scala +++ b/tests/neg-deep-subtype/type-lambda.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + trait A[T] trait B[T] extends A[T] diff --git a/tests/neg-strict/deprecated-override.scala b/tests/neg/deprecated-override.scala similarity index 75% rename from tests/neg-strict/deprecated-override.scala rename to tests/neg/deprecated-override.scala index 998fa244ca8c..b532416c7126 100644 --- a/tests/neg-strict/deprecated-override.scala +++ b/tests/neg/deprecated-override.scala @@ -1,3 +1,5 @@ +//> using options -source future -deprecation -Xfatal-warnings + trait A: def f: Int diff --git a/tests/neg-strict/i1050.scala b/tests/neg/i1050.scala similarity index 98% rename from tests/neg-strict/i1050.scala rename to tests/neg/i1050.scala index 6962dd44f826..2489cbde49c9 100644 --- a/tests/neg-strict/i1050.scala +++ b/tests/neg/i1050.scala @@ -1,3 +1,5 @@ +//> using options -source future -deprecation -Xfatal-warnings + // i1050 checks failing at posttyper trait A { type L <: Nothing } trait B { type L >: Any} diff --git a/tests/neg-strict/i11225.scala b/tests/neg/i11225b.scala similarity index 76% rename from tests/neg-strict/i11225.scala rename to tests/neg/i11225b.scala index 2a7e3ec57561..a9dd1d3d2227 100644 --- a/tests/neg-strict/i11225.scala +++ b/tests/neg/i11225b.scala @@ -1,3 +1,5 @@ +//> using options -source future -deprecation -Xfatal-warnings + import compiletime.uninitialized class Memo[A](x: => A): diff --git a/tests/neg-strict/i15479.scala b/tests/neg/i15479.scala similarity index 81% rename from tests/neg-strict/i15479.scala rename to tests/neg/i15479.scala index 3f8bdcba9a1f..d4f306a12368 100644 --- a/tests/neg-strict/i15479.scala +++ b/tests/neg/i15479.scala @@ -1,3 +1,5 @@ +//> using options -source future -deprecation -Xfatal-warnings + package deptest { @deprecated("Not used any more", since="7") object DeprecatedThing { diff --git a/tests/neg-strict/i16092.scala b/tests/neg/i16092.scala similarity index 90% rename from tests/neg-strict/i16092.scala rename to tests/neg/i16092.scala index b86c034c815b..c1327d3f6f70 100644 --- a/tests/neg-strict/i16092.scala +++ b/tests/neg/i16092.scala @@ -1,3 +1,5 @@ +//> using options -source future -deprecation -Xfatal-warnings + trait X { type T def process(t: T): Unit diff --git a/tests/neg-strict/i5854.scala b/tests/neg/i5854.scala similarity index 89% rename from tests/neg-strict/i5854.scala rename to tests/neg/i5854.scala index e8c68105bbae..61c7c2d833e7 100644 --- a/tests/neg-strict/i5854.scala +++ b/tests/neg/i5854.scala @@ -1,3 +1,5 @@ +//> using options -source future -deprecation -Xfatal-warnings + object bar { trait Sub { type M diff --git a/tests/neg-strict/nullless.scala b/tests/neg/nullless.scala similarity index 93% rename from tests/neg-strict/nullless.scala rename to tests/neg/nullless.scala index 7545d840db83..20f9af841e14 100644 --- a/tests/neg-strict/nullless.scala +++ b/tests/neg/nullless.scala @@ -1,3 +1,5 @@ +//> using options -source future -deprecation -Xfatal-warnings + object nullless { trait LowerBound[T] { type M >: T; diff --git a/tests/neg-tailcall/t1672b.scala b/tests/neg/t1672b.scala similarity index 100% rename from tests/neg-tailcall/t1672b.scala rename to tests/neg/t1672b.scala diff --git a/tests/neg-tailcall/t3275.scala b/tests/neg/t3275.scala similarity index 100% rename from tests/neg-tailcall/t3275.scala rename to tests/neg/t3275.scala diff --git a/tests/neg-tailcall/t6574.scala b/tests/neg/t6574.scala similarity index 100% rename from tests/neg-tailcall/t6574.scala rename to tests/neg/t6574.scala diff --git a/tests/neg-tailcall/tailrec-2.scala b/tests/neg/tailrec-2.scala similarity index 100% rename from tests/neg-tailcall/tailrec-2.scala rename to tests/neg/tailrec-2.scala diff --git a/tests/neg-tailcall/tailrec-3.scala b/tests/neg/tailrec-3.scala similarity index 100% rename from tests/neg-tailcall/tailrec-3.scala rename to tests/neg/tailrec-3.scala diff --git a/tests/neg-tailcall/tailrec-and-or.scala b/tests/neg/tailrec-and-or.scala similarity index 100% rename from tests/neg-tailcall/tailrec-and-or.scala rename to tests/neg/tailrec-and-or.scala diff --git a/tests/neg-tailcall/tailrec.scala b/tests/neg/tailrec.scala similarity index 100% rename from tests/neg-tailcall/tailrec.scala rename to tests/neg/tailrec.scala diff --git a/tests/neg-tailcall/while-loops.scala b/tests/neg/while-loops.scala similarity index 100% rename from tests/neg-tailcall/while-loops.scala rename to tests/neg/while-loops.scala diff --git a/tests/new/test.scala b/tests/new/test.scala deleted file mode 100644 index 8aa8f42ac787..000000000000 --- a/tests/new/test.scala +++ /dev/null @@ -1,2 +0,0 @@ -object Test: - def test = 0 diff --git a/tests/pos-special/isInstanceOf/3324c.scala b/tests/pos-deep-subtype/3324c.scala similarity index 82% rename from tests/pos-special/isInstanceOf/3324c.scala rename to tests/pos-deep-subtype/3324c.scala index ad38af34e265..aefa25eaafc2 100644 --- a/tests/pos-special/isInstanceOf/3324c.scala +++ b/tests/pos-deep-subtype/3324c.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + sealed trait A[T] class B[T] extends A[T] diff --git a/tests/pos-special/isInstanceOf/3324d.scala b/tests/pos-deep-subtype/3324d.scala similarity index 78% rename from tests/pos-special/isInstanceOf/3324d.scala rename to tests/pos-deep-subtype/3324d.scala index d39ebe80c465..9372f33c3d10 100644 --- a/tests/pos-special/isInstanceOf/3324d.scala +++ b/tests/pos-deep-subtype/3324d.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class Test { val x: Any = ??? diff --git a/tests/pos-special/isInstanceOf/3324e.scala b/tests/pos-deep-subtype/3324e.scala similarity index 83% rename from tests/pos-special/isInstanceOf/3324e.scala rename to tests/pos-deep-subtype/3324e.scala index b31c809eaaf7..58ba0152ed21 100644 --- a/tests/pos-special/isInstanceOf/3324e.scala +++ b/tests/pos-deep-subtype/3324e.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class C[T] { val x: T = ??? x.isInstanceOf[T] diff --git a/tests/pos-special/isInstanceOf/3324h.scala b/tests/pos-deep-subtype/3324h.scala similarity index 86% rename from tests/pos-special/isInstanceOf/3324h.scala rename to tests/pos-deep-subtype/3324h.scala index 0e718218a6ef..bff25ee3c888 100644 --- a/tests/pos-special/isInstanceOf/3324h.scala +++ b/tests/pos-deep-subtype/3324h.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + object Test { trait Marker def foo[T](x: T) = x match { diff --git a/tests/pos-special/strawman-collections/CollectionStrawMan1.scala b/tests/pos-deep-subtype/CollectionStrawMan1.scala similarity index 100% rename from tests/pos-special/strawman-collections/CollectionStrawMan1.scala rename to tests/pos-deep-subtype/CollectionStrawMan1.scala diff --git a/tests/pos-special/strawman-collections/CollectionStrawMan4.scala b/tests/pos-deep-subtype/CollectionStrawMan4.scala similarity index 100% rename from tests/pos-special/strawman-collections/CollectionStrawMan4.scala rename to tests/pos-deep-subtype/CollectionStrawMan4.scala diff --git a/tests/pos-special/strawman-collections/CollectionStrawMan5.scala b/tests/pos-deep-subtype/CollectionStrawMan5.scala similarity index 100% rename from tests/pos-special/strawman-collections/CollectionStrawMan5.scala rename to tests/pos-deep-subtype/CollectionStrawMan5.scala diff --git a/tests/pos-special/strawman-collections/CollectionStrawMan6.scala b/tests/pos-deep-subtype/CollectionStrawMan6.scala similarity index 100% rename from tests/pos-special/strawman-collections/CollectionStrawMan6.scala rename to tests/pos-deep-subtype/CollectionStrawMan6.scala diff --git a/tests/pos-special/isInstanceOf/Result.scala b/tests/pos-deep-subtype/Result.scala similarity index 85% rename from tests/pos-special/isInstanceOf/Result.scala rename to tests/pos-deep-subtype/Result.scala index c8a403735219..df42e54f3138 100644 --- a/tests/pos-special/isInstanceOf/Result.scala +++ b/tests/pos-deep-subtype/Result.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + object p { // test parametric case classes, which synthesis `canEqual` and `equals` diff --git a/tests/pos-special/isInstanceOf/classTag.scala b/tests/pos-deep-subtype/classTag.scala similarity index 83% rename from tests/pos-special/isInstanceOf/classTag.scala rename to tests/pos-deep-subtype/classTag.scala index fc8be4526958..b084f7f7e59c 100644 --- a/tests/pos-special/isInstanceOf/classTag.scala +++ b/tests/pos-deep-subtype/classTag.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + import scala.reflect.ClassTag object IsInstanceOfClassTag { diff --git a/tests/pos-special/isInstanceOf/gadt.scala b/tests/pos-deep-subtype/gadt.scala similarity index 96% rename from tests/pos-special/isInstanceOf/gadt.scala rename to tests/pos-deep-subtype/gadt.scala index 6f661ce152c3..18fbe6e10986 100644 --- a/tests/pos-special/isInstanceOf/gadt.scala +++ b/tests/pos-deep-subtype/gadt.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + sealed trait Exp[T] case class Num(n: Int) extends Exp[Int] case class Plus(e1: Exp[Int], e2: Exp[Int]) extends Exp[Int] diff --git a/tests/pos-special/isInstanceOf/i16899.scala b/tests/pos-deep-subtype/i16899.scala similarity index 76% rename from tests/pos-special/isInstanceOf/i16899.scala rename to tests/pos-deep-subtype/i16899.scala index 650e1e5c7b23..e5acac1f927e 100644 --- a/tests/pos-special/isInstanceOf/i16899.scala +++ b/tests/pos-deep-subtype/i16899.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + sealed trait Unset def foo(v: Unset|Option[Int]): Unit = v match diff --git a/tests/pos-special/isInstanceOf/i9736.scala b/tests/pos-deep-subtype/i9736.scala similarity index 76% rename from tests/pos-special/isInstanceOf/i9736.scala rename to tests/pos-deep-subtype/i9736.scala index 7266764c723d..6ef1c42c981e 100644 --- a/tests/pos-special/isInstanceOf/i9736.scala +++ b/tests/pos-deep-subtype/i9736.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + class Test { type MyCombo = Int | Unit val z: MyCombo = 10 diff --git a/tests/pos-special/isInstanceOf/i9782.scala b/tests/pos-deep-subtype/i9782.scala similarity index 88% rename from tests/pos-special/isInstanceOf/i9782.scala rename to tests/pos-deep-subtype/i9782.scala index e277951769bf..02c69a35b752 100644 --- a/tests/pos-special/isInstanceOf/i9782.scala +++ b/tests/pos-deep-subtype/i9782.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings + trait Txn[T <: Txn[T]] trait Elem[T <: Txn[T]] diff --git a/tests/pos-special/fatal-warnings/Dynamic.scala b/tests/pos-special/fatal-warnings/Dynamic.scala deleted file mode 100644 index 3a404ea07e13..000000000000 --- a/tests/pos-special/fatal-warnings/Dynamic.scala +++ /dev/null @@ -1,3 +0,0 @@ -package scala - -trait Dynamic extends Any diff --git a/tests/pos-special/fatal-warnings/i2673.scala b/tests/pos-special/fatal-warnings/i2673.scala deleted file mode 100644 index 9721f81da217..000000000000 --- a/tests/pos-special/fatal-warnings/i2673.scala +++ /dev/null @@ -1,6 +0,0 @@ -package Foos - -object Outer { - class X - object x -} diff --git a/tests/pos-special/fatal-warnings/i4185.scala b/tests/pos-special/fatal-warnings/i4185.scala deleted file mode 100644 index 10db2d672eea..000000000000 --- a/tests/pos-special/fatal-warnings/i4185.scala +++ /dev/null @@ -1,4 +0,0 @@ -object ord { - class Ord - object Ord -} diff --git a/tests/pos-special/fatal-warnings/stats-in-empty-pkg.scala b/tests/pos-special/fatal-warnings/stats-in-empty-pkg.scala deleted file mode 100644 index e5ea0b7566f8..000000000000 --- a/tests/pos-special/fatal-warnings/stats-in-empty-pkg.scala +++ /dev/null @@ -1,4 +0,0 @@ -def foo = 23 -val bar = foo -var baz = bar -type Qux = Int diff --git a/tests/pos/Dynamic.scala b/tests/pos/Dynamic.scala new file mode 100644 index 000000000000..9f3a83468fc1 --- /dev/null +++ b/tests/pos/Dynamic.scala @@ -0,0 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + +package scala + +trait Dynamic extends Any diff --git a/tests/pos-special/fatal-warnings/annot-constant/Annot_1.java b/tests/pos/annot-constant/Annot_1.java similarity index 100% rename from tests/pos-special/fatal-warnings/annot-constant/Annot_1.java rename to tests/pos/annot-constant/Annot_1.java diff --git a/tests/pos-special/fatal-warnings/annot-constant/Constants_1.java b/tests/pos/annot-constant/Constants_1.java similarity index 100% rename from tests/pos-special/fatal-warnings/annot-constant/Constants_1.java rename to tests/pos/annot-constant/Constants_1.java diff --git a/tests/pos-special/fatal-warnings/annot-constant/Test_2.scala b/tests/pos/annot-constant/Test_2.scala similarity index 76% rename from tests/pos-special/fatal-warnings/annot-constant/Test_2.scala rename to tests/pos/annot-constant/Test_2.scala index 13f603514ab4..420b33195a45 100644 --- a/tests/pos-special/fatal-warnings/annot-constant/Test_2.scala +++ b/tests/pos/annot-constant/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + package pkg object U { diff --git a/tests/pos-special/fatal-warnings/i10247.scala b/tests/pos/i10247.scala similarity index 87% rename from tests/pos-special/fatal-warnings/i10247.scala rename to tests/pos/i10247.scala index 4ac5d719dbdc..4268e309a4ae 100644 --- a/tests/pos-special/fatal-warnings/i10247.scala +++ b/tests/pos/i10247.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + // check that deprecation warnings of Red are not caught in its enclosing scope enum Color(rgb: Int) { diff --git a/tests/pos-special/fatal-warnings/i10259.scala b/tests/pos/i10259.scala similarity index 74% rename from tests/pos-special/fatal-warnings/i10259.scala rename to tests/pos/i10259.scala index 5b4c628cd126..101a3d869a04 100644 --- a/tests/pos-special/fatal-warnings/i10259.scala +++ b/tests/pos/i10259.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + trait S[T] extends (T => T): def apply(x: T) = ??? extension (x: T) def show: String diff --git a/tests/pos-special/fatal-warnings/i11729.scala b/tests/pos/i11729.scala similarity index 82% rename from tests/pos-special/fatal-warnings/i11729.scala rename to tests/pos/i11729.scala index 7ba41d081e3b..e97b285ac6a2 100644 --- a/tests/pos-special/fatal-warnings/i11729.scala +++ b/tests/pos/i11729.scala @@ -1,9 +1,11 @@ +//> using options -Xfatal-warnings -deprecation -feature + type Return[X] = X match case List[t] => List[t] case Any => List[X] object Return: - def apply[A](a:A):Return[A] = a match + def apply[A](a:A):Return[A] = a match case a: List[t] => a case a: Any => List(a) diff --git a/tests/pos-special/fatal-warnings/i13433.scala b/tests/pos/i13433.scala similarity index 94% rename from tests/pos-special/fatal-warnings/i13433.scala rename to tests/pos/i13433.scala index 47a4a520e63a..c38199e3b917 100644 --- a/tests/pos-special/fatal-warnings/i13433.scala +++ b/tests/pos/i13433.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + import scala.reflect.TypeTest type Matcher[A] = A match { case String => String } diff --git a/tests/pos-special/fatal-warnings/i13433b.scala b/tests/pos/i13433b.scala similarity index 91% rename from tests/pos-special/fatal-warnings/i13433b.scala rename to tests/pos/i13433b.scala index 5e3625166fc0..e8316f92e330 100644 --- a/tests/pos-special/fatal-warnings/i13433b.scala +++ b/tests/pos/i13433b.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + import scala.reflect.ClassTag type Matcher[A] = A match { case String => String } diff --git a/tests/pos-special/fatal-warnings/i14637.scala b/tests/pos/i14637.scala similarity index 70% rename from tests/pos-special/fatal-warnings/i14637.scala rename to tests/pos/i14637.scala index 9499c2fca2f9..5ae3b5e7a881 100644 --- a/tests/pos-special/fatal-warnings/i14637.scala +++ b/tests/pos/i14637.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + class C object Givens: diff --git a/tests/pos-special/fatal-warnings/i16649-irrefutable.scala b/tests/pos/i16649-irrefutable.scala similarity index 73% rename from tests/pos-special/fatal-warnings/i16649-irrefutable.scala rename to tests/pos/i16649-irrefutable.scala index b9aa6d2acf52..7a5a98733922 100644 --- a/tests/pos-special/fatal-warnings/i16649-irrefutable.scala +++ b/tests/pos/i16649-irrefutable.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + import quoted.* def foo(using Quotes)(x: Expr[Int]) = diff --git a/tests/pos-special/fatal-warnings/i17314.scala b/tests/pos/i17314.scala similarity index 91% rename from tests/pos-special/fatal-warnings/i17314.scala rename to tests/pos/i17314.scala index 215b13f671d5..2d0c409ced10 100644 --- a/tests/pos-special/fatal-warnings/i17314.scala +++ b/tests/pos/i17314.scala @@ -1,4 +1,4 @@ -//> using options "-Wunused:all" +//> using options -Xfatal-warnings -Wunused:all -deprecation -feature import java.net.URI diff --git a/tests/pos-special/fatal-warnings/i17314a.scala b/tests/pos/i17314a.scala similarity index 70% rename from tests/pos-special/fatal-warnings/i17314a.scala rename to tests/pos/i17314a.scala index 6a6712855850..4bce56d8bbed 100644 --- a/tests/pos-special/fatal-warnings/i17314a.scala +++ b/tests/pos/i17314a.scala @@ -1,4 +1,4 @@ -//> using options -Wunused:all +//> using options -Xfatal-warnings -Wunused:all -deprecation -feature package foo: class Foo[T] diff --git a/tests/pos-special/fatal-warnings/i17631.scala b/tests/pos/i17631.scala similarity index 90% rename from tests/pos-special/fatal-warnings/i17631.scala rename to tests/pos/i17631.scala index 6afa45923681..7b8a064493df 100644 --- a/tests/pos-special/fatal-warnings/i17631.scala +++ b/tests/pos/i17631.scala @@ -1,4 +1,4 @@ -//> using options -Wunused:all +//> using options -Xfatal-warnings -Wunused:all -deprecation -feature object foo { type Bar diff --git a/tests/pos/i2673.scala b/tests/pos/i2673.scala new file mode 100644 index 000000000000..cb426cd6be0f --- /dev/null +++ b/tests/pos/i2673.scala @@ -0,0 +1,8 @@ +//> using options -Xfatal-warnings -deprecation -feature + +package Foos + +object Outer { + class X + object x +} diff --git a/tests/pos-special/fatal-warnings/i3323.scala b/tests/pos/i3323.scala similarity index 66% rename from tests/pos-special/fatal-warnings/i3323.scala rename to tests/pos/i3323.scala index 220cbd68041b..94d072d4a2fc 100644 --- a/tests/pos-special/fatal-warnings/i3323.scala +++ b/tests/pos/i3323.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + class Foo { def foo[A](lss: List[List[A]]): Unit = { lss match { diff --git a/tests/pos-special/fatal-warnings/i3323b.scala b/tests/pos/i3323b.scala similarity index 64% rename from tests/pos-special/fatal-warnings/i3323b.scala rename to tests/pos/i3323b.scala index df4b9bb2dc76..0edc6177bbe9 100644 --- a/tests/pos-special/fatal-warnings/i3323b.scala +++ b/tests/pos/i3323b.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + class Foo { def foo(lss: List[Int]): Unit = { lss match { diff --git a/tests/pos-special/fatal-warnings/i3589b.scala b/tests/pos/i3589b.scala similarity index 68% rename from tests/pos-special/fatal-warnings/i3589b.scala rename to tests/pos/i3589b.scala index 115e74b8cee2..f4552c7f8370 100644 --- a/tests/pos-special/fatal-warnings/i3589b.scala +++ b/tests/pos/i3589b.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + class Test { def test(x: 1 | 2 | 3) = (x: @annotation.switch) match { case 1 => 1 diff --git a/tests/pos-special/fatal-warnings/i4166.scala b/tests/pos/i4166.scala similarity index 51% rename from tests/pos-special/fatal-warnings/i4166.scala rename to tests/pos/i4166.scala index 44684bc68855..2ce9d018b614 100644 --- a/tests/pos-special/fatal-warnings/i4166.scala +++ b/tests/pos/i4166.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + package foo { class Hello } diff --git a/tests/pos/i4185.scala b/tests/pos/i4185.scala new file mode 100644 index 000000000000..643f479c59b6 --- /dev/null +++ b/tests/pos/i4185.scala @@ -0,0 +1,6 @@ +//> using options -Xfatal-warnings -deprecation -feature + +object ord { + class Ord + object Ord +} diff --git a/tests/pos-special/fatal-warnings/i4674.scala b/tests/pos/i4674.scala similarity index 73% rename from tests/pos-special/fatal-warnings/i4674.scala rename to tests/pos/i4674.scala index 53108d7981ca..3b570a74e80a 100644 --- a/tests/pos-special/fatal-warnings/i4674.scala +++ b/tests/pos/i4674.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + class Test { def test(x: String) = { x.foreach { diff --git a/tests/pos-special/fatal-warnings/i5970.scala b/tests/pos/i5970.scala similarity index 75% rename from tests/pos-special/fatal-warnings/i5970.scala rename to tests/pos/i5970.scala index 51adb8cd0535..e2e79f6c3f11 100644 --- a/tests/pos-special/fatal-warnings/i5970.scala +++ b/tests/pos/i5970.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + object Test extends App { case class Foo[T](t: T) diff --git a/tests/pos-special/fatal-warnings/i6190a.scala b/tests/pos/i6190a.scala similarity index 72% rename from tests/pos-special/fatal-warnings/i6190a.scala rename to tests/pos/i6190a.scala index e57238edf824..b6d21662389e 100644 --- a/tests/pos-special/fatal-warnings/i6190a.scala +++ b/tests/pos/i6190a.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + case class Rule(name: String) object Rule extends (String => Rule) { def apply(name: String): Rule = new Rule(name) diff --git a/tests/pos-special/fatal-warnings/i6190c.scala b/tests/pos/i6190c.scala similarity index 55% rename from tests/pos-special/fatal-warnings/i6190c.scala rename to tests/pos/i6190c.scala index b7ab530dddd9..37a837addb62 100644 --- a/tests/pos-special/fatal-warnings/i6190c.scala +++ b/tests/pos/i6190c.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + case class Rule(name: String) def foo = List("1", "2").map(Rule.apply) diff --git a/tests/pos-special/fatal-warnings/i6290.scala b/tests/pos/i6290.scala similarity index 85% rename from tests/pos-special/fatal-warnings/i6290.scala rename to tests/pos/i6290.scala index b5694dfa296a..d0da0ea328e4 100644 --- a/tests/pos-special/fatal-warnings/i6290.scala +++ b/tests/pos/i6290.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + class TC { type T } class C(using TC { type T = Int }) diff --git a/tests/pos-special/fatal-warnings/i6621.scala b/tests/pos/i6621.scala similarity index 69% rename from tests/pos-special/fatal-warnings/i6621.scala rename to tests/pos/i6621.scala index 92362a004530..599a75ba776e 100644 --- a/tests/pos-special/fatal-warnings/i6621.scala +++ b/tests/pos/i6621.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + object Unapply { def unapply(a: Any): Option[(Int, Int)] = Some((1, 2)) diff --git a/tests/pos-special/fatal-warnings/i7219b.scala b/tests/pos/i7219b.scala similarity index 80% rename from tests/pos-special/fatal-warnings/i7219b.scala rename to tests/pos/i7219b.scala index 869c72b3b7d0..91dc0d136420 100644 --- a/tests/pos-special/fatal-warnings/i7219b.scala +++ b/tests/pos/i7219b.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + object Foo { enum MyEnum { case Red diff --git a/tests/pos-special/fatal-warnings/i7219.scala b/tests/pos/i7219c.scala similarity index 81% rename from tests/pos-special/fatal-warnings/i7219.scala rename to tests/pos/i7219c.scala index fe50549e2710..1ddfeca39ff1 100644 --- a/tests/pos-special/fatal-warnings/i7219.scala +++ b/tests/pos/i7219c.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + object Foo { enum MyEnum { case Red diff --git a/tests/pos-special/fatal-warnings/i8758.scala b/tests/pos/i8758.scala similarity index 73% rename from tests/pos-special/fatal-warnings/i8758.scala rename to tests/pos/i8758.scala index d64cb4e0624e..ad170750c09e 100644 --- a/tests/pos-special/fatal-warnings/i8758.scala +++ b/tests/pos/i8758.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + def test = "?johndoe" match { case s":$name" => println(s":name $name") case s"{$name}" => println(s"{name} $name") diff --git a/tests/pos-special/fatal-warnings/i8781.scala b/tests/pos/i8781.scala similarity index 73% rename from tests/pos-special/fatal-warnings/i8781.scala rename to tests/pos/i8781.scala index fe0d5d1ce61c..857ff43b9c0a 100644 --- a/tests/pos-special/fatal-warnings/i8781.scala +++ b/tests/pos/i8781.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + @main def Test = diff --git a/tests/pos-special/fatal-warnings/i8956.scala b/tests/pos/i8956.scala similarity index 86% rename from tests/pos-special/fatal-warnings/i8956.scala rename to tests/pos/i8956.scala index 6b935946de17..a6937a3f2363 100644 --- a/tests/pos-special/fatal-warnings/i8956.scala +++ b/tests/pos/i8956.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + type Numeric = Double | Int val v1 = 100 diff --git a/tests/pos-special/fatal-warnings/i9260.scala b/tests/pos/i9260.scala similarity index 82% rename from tests/pos-special/fatal-warnings/i9260.scala rename to tests/pos/i9260.scala index df548f393eea..cf740eb3c096 100644 --- a/tests/pos-special/fatal-warnings/i9260.scala +++ b/tests/pos/i9260.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + package asts enum Ast[-T >: Null]: diff --git a/tests/pos-special/fatal-warnings/i9751.scala b/tests/pos/i9751.scala similarity index 77% rename from tests/pos-special/fatal-warnings/i9751.scala rename to tests/pos/i9751.scala index 4536011b31c8..78c9116f77d1 100644 --- a/tests/pos-special/fatal-warnings/i9751.scala +++ b/tests/pos/i9751.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + object Test { extension (x: Int) inline def times(inline op: Unit): Unit = { diff --git a/tests/pos-special/fatal-warnings/i9751b.scala b/tests/pos/i9751b.scala similarity index 78% rename from tests/pos-special/fatal-warnings/i9751b.scala rename to tests/pos/i9751b.scala index 6336b0c47fd4..bbbe8052a20c 100644 --- a/tests/pos-special/fatal-warnings/i9751b.scala +++ b/tests/pos/i9751b.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + object Test { inline def f(inline x: Boolean): Unit = inline if x then println() diff --git a/tests/pos-special/fatal-warnings/i9776.scala b/tests/pos/i9776.scala similarity index 92% rename from tests/pos-special/fatal-warnings/i9776.scala rename to tests/pos/i9776.scala index e1c65dff268f..73efe2531918 100644 --- a/tests/pos-special/fatal-warnings/i9776.scala +++ b/tests/pos/i9776.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + import scala.annotation.switch sealed trait Fruit diff --git a/tests/pos-special/fatal-warnings/i9804.scala b/tests/pos/i9804.scala similarity index 65% rename from tests/pos-special/fatal-warnings/i9804.scala rename to tests/pos/i9804.scala index e42c13f3ebdc..80b0de79b97f 100644 --- a/tests/pos-special/fatal-warnings/i9804.scala +++ b/tests/pos/i9804.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + import scala.quoted.* def f[A: Type](e: Expr[A])(using Quotes): Expr[A] = e match { diff --git a/tests/new/imports-pos.scala b/tests/pos/imports-pos.scala similarity index 88% rename from tests/new/imports-pos.scala rename to tests/pos/imports-pos.scala index a9b90dbf4527..fae48876507d 100644 --- a/tests/new/imports-pos.scala +++ b/tests/pos/imports-pos.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + package test; import java.lang.System as S diff --git a/tests/new/infer2-pos.scala b/tests/pos/infer2-pos.scala similarity index 84% rename from tests/new/infer2-pos.scala rename to tests/pos/infer2-pos.scala index 2ce88be544b9..0854623ca93a 100644 --- a/tests/new/infer2-pos.scala +++ b/tests/pos/infer2-pos.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + package test class Lst[T] case class cons[T](x: T, xs: Lst[T]) extends Lst[T] diff --git a/tests/new/looping-jsig.scala b/tests/pos/looping-jsig.scala similarity index 93% rename from tests/new/looping-jsig.scala rename to tests/pos/looping-jsig.scala index 18777ed121b4..72f6f48f2d91 100644 --- a/tests/new/looping-jsig.scala +++ b/tests/pos/looping-jsig.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + import scala.collection.mutable.* trait BugTrack { diff --git a/tests/pos-special/fatal-warnings/matchable-same-type.scala b/tests/pos/matchable-same-type.scala similarity index 65% rename from tests/pos-special/fatal-warnings/matchable-same-type.scala rename to tests/pos/matchable-same-type.scala index afcef9619855..71ab788d0d16 100644 --- a/tests/pos-special/fatal-warnings/matchable-same-type.scala +++ b/tests/pos/matchable-same-type.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + import scala.language.`future-migration` type X diff --git a/tests/new/matthias1.scala b/tests/pos/matthias1.scala similarity index 86% rename from tests/new/matthias1.scala rename to tests/pos/matthias1.scala index a923a529fe0f..91a79976d382 100644 --- a/tests/new/matthias1.scala +++ b/tests/pos/matthias1.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + class A() { class B() { def foo(x: B) = 0 diff --git a/tests/new/michel6.scala b/tests/pos/michel6.scala similarity index 75% rename from tests/new/michel6.scala rename to tests/pos/michel6.scala index b32e8bed75a1..c8e9c590fff4 100644 --- a/tests/new/michel6.scala +++ b/tests/pos/michel6.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + object M { def f(x: Int): Unit = {} diff --git a/tests/new/moduletrans.scala b/tests/pos/moduletrans.scala similarity index 71% rename from tests/new/moduletrans.scala rename to tests/pos/moduletrans.scala index 51538417ed5d..8982c5bba890 100644 --- a/tests/new/moduletrans.scala +++ b/tests/pos/moduletrans.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + object m1 { class m() { diff --git a/tests/pos-special/fatal-warnings/not-looping-implicit.scala b/tests/pos/not-looping-implicit.scala similarity index 96% rename from tests/pos-special/fatal-warnings/not-looping-implicit.scala rename to tests/pos/not-looping-implicit.scala index a35945bfe373..90fba9f807a7 100644 --- a/tests/pos-special/fatal-warnings/not-looping-implicit.scala +++ b/tests/pos/not-looping-implicit.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + import scala.deriving.Mirror import scala.compiletime._ diff --git a/tests/pos/nullarify.scala b/tests/pos/nullarify.scala index 62d16ba11f8b..159b22d8482b 100644 --- a/tests/pos/nullarify.scala +++ b/tests/pos/nullarify.scala @@ -1,3 +1,5 @@ +//> using options -Ycheck:nullarify + object Test { def foo: Int = 2 diff --git a/tests/pos-special/fatal-warnings/patmat-exhaustive.scala b/tests/pos/patmat-exhaustive.scala similarity index 74% rename from tests/pos-special/fatal-warnings/patmat-exhaustive.scala rename to tests/pos/patmat-exhaustive.scala index c5c95c455b8c..9e3cb7d8f615 100644 --- a/tests/pos-special/fatal-warnings/patmat-exhaustive.scala +++ b/tests/pos/patmat-exhaustive.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + def foo: Unit = object O: sealed abstract class A diff --git a/tests/new/patterns.scala b/tests/pos/patterns.scala similarity index 96% rename from tests/new/patterns.scala rename to tests/pos/patterns.scala index 92a38118d7ca..78cd813dc621 100644 --- a/tests/new/patterns.scala +++ b/tests/pos/patterns.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + trait Option[+a] {} case class Some[a](x: a) extends Option[a] { diff --git a/tests/new/patterns1.scala b/tests/pos/patterns1.scala similarity index 90% rename from tests/new/patterns1.scala rename to tests/pos/patterns1.scala index f660ea054360..8ea78d3c0aa5 100644 --- a/tests/new/patterns1.scala +++ b/tests/pos/patterns1.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + trait Option[+a] case class Some[a](x: a) extends Option[a] diff --git a/tests/new/pmbug.scala b/tests/pos/pmbug.scala similarity index 82% rename from tests/new/pmbug.scala rename to tests/pos/pmbug.scala index 7d94e7a8bdfd..5cfb1c3d5da0 100644 --- a/tests/new/pmbug.scala +++ b/tests/pos/pmbug.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + object Test { def flatten[a](l: List[List[a]]): List[a] = l match { diff --git a/tests/new/private-types-after-typer.scala b/tests/pos/private-types-after-typer.scala similarity index 86% rename from tests/new/private-types-after-typer.scala rename to tests/pos/private-types-after-typer.scala index 5c20cac2a1fb..ed5fc0f2cecd 100644 --- a/tests/new/private-types-after-typer.scala +++ b/tests/pos/private-types-after-typer.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + // Testing that the type of the outer accessor in O2 // doesn't crash the compiler over private type escaping scope. trait T { diff --git a/tests/new/projection.scala b/tests/pos/projection.scala similarity index 63% rename from tests/new/projection.scala rename to tests/pos/projection.scala index 766c6f41cdeb..04baa8157139 100644 --- a/tests/new/projection.scala +++ b/tests/pos/projection.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + class C { type T } object test { def x: C#T = ??? diff --git a/tests/new/selftails.scala b/tests/pos/selftails.scala similarity index 95% rename from tests/new/selftails.scala rename to tests/pos/selftails.scala index a4253b80c7b0..8a68e851906b 100644 --- a/tests/new/selftails.scala +++ b/tests/pos/selftails.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + package net.liftweb.util /** diff --git a/tests/new/seqtest2.scala b/tests/pos/seqtest2.scala similarity index 85% rename from tests/new/seqtest2.scala rename to tests/pos/seqtest2.scala index 239b1b58168d..3e55c006b3d2 100644 --- a/tests/new/seqtest2.scala +++ b/tests/pos/seqtest2.scala @@ -1,3 +1,5 @@ +//> using options -source 3.2 + object test { val b = List(1, 2, 3); diff --git a/tests/pos-special/spec-t5545/S_1.scala b/tests/pos/spec-t5545/S_1.scala similarity index 100% rename from tests/pos-special/spec-t5545/S_1.scala rename to tests/pos/spec-t5545/S_1.scala diff --git a/tests/pos-special/spec-t5545/S_2.scala b/tests/pos/spec-t5545/S_2.scala similarity index 100% rename from tests/pos-special/spec-t5545/S_2.scala rename to tests/pos/spec-t5545/S_2.scala diff --git a/tests/pos/stats-in-empty-pkg.scala b/tests/pos/stats-in-empty-pkg.scala new file mode 100644 index 000000000000..cbfade71f8b9 --- /dev/null +++ b/tests/pos/stats-in-empty-pkg.scala @@ -0,0 +1,6 @@ +//> using options -Xfatal-warnings -deprecation -feature + +def foo = 23 +val bar = foo +var baz = bar +type Qux = Int diff --git a/tests/pos-special/fatal-warnings/strict-pattern-bindings-3.0-migration.scala b/tests/pos/strict-pattern-bindings-3.0-migration.scala similarity index 95% rename from tests/pos-special/fatal-warnings/strict-pattern-bindings-3.0-migration.scala rename to tests/pos/strict-pattern-bindings-3.0-migration.scala index bab804d81fac..f1d88af0c152 100644 --- a/tests/pos-special/fatal-warnings/strict-pattern-bindings-3.0-migration.scala +++ b/tests/pos/strict-pattern-bindings-3.0-migration.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + // These tests should pass under -Xfatal-warnings with source version less than 3.2 import language.`3.0-migration` diff --git a/tests/pos-special/fatal-warnings/strict-pattern-bindings-3.1.scala b/tests/pos/strict-pattern-bindings-3.1.scala similarity index 94% rename from tests/pos-special/fatal-warnings/strict-pattern-bindings-3.1.scala rename to tests/pos/strict-pattern-bindings-3.1.scala index 8ed183dd1209..bb912204e38a 100644 --- a/tests/pos-special/fatal-warnings/strict-pattern-bindings-3.1.scala +++ b/tests/pos/strict-pattern-bindings-3.1.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + // These tests should pass under -Xfatal-warnings with source version less than 3.2 import language.`3.1` diff --git a/tests/pos-special/fatal-warnings/switches.scala b/tests/pos/switches.scala similarity index 94% rename from tests/pos-special/fatal-warnings/switches.scala rename to tests/pos/switches.scala index a06621acde21..bd7e44f1c8cf 100644 --- a/tests/pos-special/fatal-warnings/switches.scala +++ b/tests/pos/switches.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + import scala.annotation.switch class Test { diff --git a/tests/pos-special/fatal-warnings/t10373.scala b/tests/pos/t10373.scala similarity index 87% rename from tests/pos-special/fatal-warnings/t10373.scala rename to tests/pos/t10373.scala index da054b9fe365..0d91313f694d 100644 --- a/tests/pos-special/fatal-warnings/t10373.scala +++ b/tests/pos/t10373.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + abstract class Foo { def bar(): Unit = this match { case Foo_1() => //do something diff --git a/tests/pos-special/fatal-warnings/t6595.scala b/tests/pos/t6595.scala similarity index 90% rename from tests/pos-special/fatal-warnings/t6595.scala rename to tests/pos/t6595.scala index 82cca01c70a4..b89c8f97308f 100644 --- a/tests/pos-special/fatal-warnings/t6595.scala +++ b/tests/pos/t6595.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + import scala.annotation.switch class Foo extends AnyRef { diff --git a/tests/pos-special/fatal-warnings/tasty-parent-unapply.scala b/tests/pos/tasty-parent-unapply.scala similarity index 88% rename from tests/pos-special/fatal-warnings/tasty-parent-unapply.scala rename to tests/pos/tasty-parent-unapply.scala index f76faa8f0e93..0f882ee060d8 100644 --- a/tests/pos-special/fatal-warnings/tasty-parent-unapply.scala +++ b/tests/pos/tasty-parent-unapply.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + import scala.quoted.* object Macros { diff --git a/tests/pos/test.scala b/tests/pos/test.scala new file mode 100644 index 000000000000..3bb74b3b1386 --- /dev/null +++ b/tests/pos/test.scala @@ -0,0 +1,4 @@ +//> using options -source 3.2 + +object Test: + def test = 0 diff --git a/tests/pos-special/fatal-warnings/tuple-exaustivity.scala b/tests/pos/tuple-exaustivity.scala similarity index 57% rename from tests/pos-special/fatal-warnings/tuple-exaustivity.scala rename to tests/pos/tuple-exaustivity.scala index dd5aec2436f1..a27267fc89e5 100644 --- a/tests/pos-special/fatal-warnings/tuple-exaustivity.scala +++ b/tests/pos/tuple-exaustivity.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + def test(t: Tuple) = t match case Tuple() => diff --git a/tests/pos-special/fatal-warnings/type-test-matchable.scala b/tests/pos/type-test-matchable.scala similarity index 81% rename from tests/pos-special/fatal-warnings/type-test-matchable.scala rename to tests/pos/type-test-matchable.scala index f6d64d0e8aaa..579af12fa2e7 100644 --- a/tests/pos-special/fatal-warnings/type-test-matchable.scala +++ b/tests/pos/type-test-matchable.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + import scala.language.`future-migration` import scala.reflect.TypeTest diff --git a/tests/pos-special/fatal-warnings/unchecked-scrutinee.scala b/tests/pos/unchecked-scrutinee.scala similarity index 60% rename from tests/pos-special/fatal-warnings/unchecked-scrutinee.scala rename to tests/pos/unchecked-scrutinee.scala index cde3d2ff5f91..72fcd3da14e4 100644 --- a/tests/pos-special/fatal-warnings/unchecked-scrutinee.scala +++ b/tests/pos/unchecked-scrutinee.scala @@ -1,3 +1,5 @@ +//> using options -Xfatal-warnings -deprecation -feature + object Test { (List(1: @unchecked, 2, 3): @unchecked) match { case a :: as => diff --git a/tests/run-custom-args/i5256.scala b/tests/run-deep-subtype/i5256.scala similarity index 100% rename from tests/run-custom-args/i5256.scala rename to tests/run-deep-subtype/i5256.scala diff --git a/tests/run-custom-args/tuple-cons.scala b/tests/run-deep-subtype/tuple-cons.scala similarity index 100% rename from tests/run-custom-args/tuple-cons.scala rename to tests/run-deep-subtype/tuple-cons.scala diff --git a/tests/run-custom-args/typeclass-derivation1.scala b/tests/run/typeclass-derivation1.scala similarity index 100% rename from tests/run-custom-args/typeclass-derivation1.scala rename to tests/run/typeclass-derivation1.scala