Skip to content

Commit 21a5bbe

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 ec5c960 commit 21a5bbe

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ class CompilationTests extends ParallelTesting {
150150
aggregateTests(
151151
compileFilesInDir("tests/neg", defaultOptions),
152152
compileFilesInDir("tests/neg-tailcall", defaultOptions),
153+
compileFilesInDir("tests/neg-strict", defaultOptions.and("-strict")),
153154
compileFilesInDir("tests/neg-no-kind-polymorphism", defaultOptions and "-Yno-kind-polymorphism"),
154155
compileFilesInDir("tests/neg-custom-args/deprecation", defaultOptions.and("-Xfatal-warnings", "-deprecation")),
155156
compileFilesInDir("tests/neg-custom-args/fatal-warnings", defaultOptions.and("-Xfatal-warnings")),
@@ -160,8 +161,6 @@ class CompilationTests extends ParallelTesting {
160161
compileFile("tests/neg-custom-args/i3246.scala", scala2Mode),
161162
compileFile("tests/neg-custom-args/overrideClass.scala", scala2Mode),
162163
compileFile("tests/neg-custom-args/autoTuplingTest.scala", defaultOptions.and("-language:noAutoTupling")),
163-
compileFile("tests/neg-custom-args/i1050.scala", defaultOptions.and("-strict")),
164-
compileFile("tests/neg-custom-args/nullless.scala", defaultOptions.and("-strict")),
165164
compileFile("tests/neg-custom-args/nopredef.scala", defaultOptions.and("-Yno-predef")),
166165
compileFile("tests/neg-custom-args/noimports.scala", defaultOptions.and("-Yno-imports")),
167166
compileFile("tests/neg-custom-args/noimports2.scala", defaultOptions.and("-Yno-imports")),
@@ -249,7 +248,9 @@ class CompilationTests extends ParallelTesting {
249248

250249
val lib =
251250
compileList("src", librarySources,
252-
defaultOptions.and("-Ycheck-reentrant", "-strict", "-priorityclasspath", defaultOutputDir))(libGroup)
251+
defaultOptions.and("-Ycheck-reentrant",
252+
// "-strict", // TODO: re-enable once we allow : @unchecked in pattern definitions. Right now, lots of narrowing pattern definitions fail.
253+
"-priorityclasspath", defaultOutputDir))(libGroup)
253254

254255
val compilerSources = sources(Paths.get("compiler/src"))
255256
val compilerManagedSources = sources(Properties.dottyCompilerManagedSources)
File renamed without changes.

0 commit comments

Comments
 (0)