Skip to content

Commit 02a5657

Browse files
committed
Fix -strict tests
- move all strict neg tests to a special directory - disable -strict for library bootstrap. tasty.reflect sources fail under -strict, but this can be fixed only when the original bootstrap compiler accepts : @unchecked in pattern definitions.
1 parent d44a3b3 commit 02a5657

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

compiler/test/dotty/tools/dotc/CompilationTests.scala

+4-3
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ class CompilationTests extends ParallelTesting {
144144
implicit val testGroup: TestGroup = TestGroup("compileNeg")
145145
compileFilesInDir("tests/neg", defaultOptions) +
146146
compileFilesInDir("tests/neg-tailcall", defaultOptions) +
147+
compileFilesInDir("tests/neg-strict", defaultOptions.and("-strict")) +
147148
compileFilesInDir("tests/neg-no-kind-polymorphism", defaultOptions and "-Yno-kind-polymorphism") +
148149
compileFilesInDir("tests/neg-custom-args/deprecation", defaultOptions.and("-Xfatal-warnings", "-deprecation")) +
149150
compileFilesInDir("tests/neg-custom-args/fatal-warnings", defaultOptions.and("-Xfatal-warnings")) +
@@ -154,8 +155,6 @@ class CompilationTests extends ParallelTesting {
154155
compileFile("tests/neg-custom-args/i3246.scala", scala2Mode) +
155156
compileFile("tests/neg-custom-args/overrideClass.scala", scala2Mode) +
156157
compileFile("tests/neg-custom-args/autoTuplingTest.scala", defaultOptions.and("-language:noAutoTupling")) +
157-
compileFile("tests/neg-custom-args/i1050.scala", defaultOptions.and("-strict")) +
158-
compileFile("tests/neg-custom-args/nullless.scala", defaultOptions.and("-strict")) +
159158
compileFile("tests/neg-custom-args/nopredef.scala", defaultOptions.and("-Yno-predef")) +
160159
compileFile("tests/neg-custom-args/noimports.scala", defaultOptions.and("-Yno-imports")) +
161160
compileFile("tests/neg-custom-args/noimports2.scala", defaultOptions.and("-Yno-imports")) +
@@ -237,7 +236,9 @@ class CompilationTests extends ParallelTesting {
237236

238237
val lib =
239238
compileList("src", librarySources,
240-
defaultOptions.and("-Ycheck-reentrant", "-strict", "-priorityclasspath", defaultOutputDir))(libGroup)
239+
defaultOptions.and("-Ycheck-reentrant",
240+
// "-strict", // TODO: re-enable once we allow : @unchecked in pattern definitions. Right now, lots of narrowing pattern definitions fail.
241+
"-priorityclasspath", defaultOutputDir))(libGroup)
241242

242243
val compilerSources = sources(Paths.get("compiler/src"))
243244
val compilerManagedSources = sources(Properties.dottyCompilerManagedSources)

0 commit comments

Comments
 (0)