@@ -42,30 +42,11 @@ class CompilationTests {
4242 compileFilesInDir(" tests/new" , defaultOptions.and(" -source" , " 3.2" )), // just to see whether 3.2 works
4343 compileFilesInDir(" tests/pos-scala2" , scala2CompatMode),
4444 compileFilesInDir(" tests/pos-custom-args/captures" , defaultOptions.and(" -language:experimental.captureChecking" )),
45- compileFilesInDir(" tests/pos-custom-args/erased" , defaultOptions.and(" -language:experimental.erasedDefinitions" )),
4645 compileFilesInDir(" tests/pos" , defaultOptions.and(" -Ysafe-init" )),
4746 // Run tests for legacy lazy vals
4847 compileFilesInDir(" tests/pos" , defaultOptions.and(" -Ysafe-init" , " -Ylegacy-lazy-vals" , " -Ycheck-constraint-deps" ), FileFilter .include(TestSources .posLazyValsAllowlist)),
4948 compileFilesInDir(" tests/pos-deep-subtype" , allowDeepSubtypes),
50- compileFilesInDir(" tests/pos-custom-args/no-experimental" , defaultOptions.and(" -Yno-experimental" )),
51- compileFilesInDir(" tests/pos-custom-args/strict" , defaultOptions.and(" -source" , " future" , " -deprecation" , " -Xfatal-warnings" )),
5249 compileDir(" tests/pos-special/java-param-names" , defaultOptions.withJavacOnlyOptions(" -parameters" )),
53- compileFile(
54- // succeeds despite -Xfatal-warnings because of -nowarn
55- " tests/neg-custom-args/fatal-warnings/xfatalWarnings.scala" ,
56- defaultOptions.and(" -nowarn" , " -Xfatal-warnings" )
57- ),
58- compileFile(" tests/pos-special/typeclass-scaling.scala" , defaultOptions.and(" -Xmax-inlines" , " 40" )),
59- compileFile(" tests/pos-special/i7575.scala" , defaultOptions.andLanguageFeature(" dynamics" )),
60- compileFile(" tests/pos-special/kind-projector.scala" , defaultOptions.and(" -Ykind-projector" )),
61- compileFile(" tests/pos-special/kind-projector-underscores.scala" , defaultOptions.and(" -Ykind-projector:underscores" )),
62- compileFile(" tests/run/i5606.scala" , defaultOptions.and(" -Yretain-trees" )),
63- compileFile(" tests/pos-custom-args/i8875.scala" , defaultOptions.and(" -Xprint:getters" )),
64- compileFile(" tests/pos-custom-args/i9267.scala" , defaultOptions.and(" -Ystop-after:erasure" )),
65- compileFile(" tests/pos-special/extend-java-enum.scala" , defaultOptions.and(" -source" , " 3.0-migration" )),
66- compileFile(" tests/pos-custom-args/help.scala" , defaultOptions.and(" -help" , " -V" , " -W" , " -X" , " -Y" )),
67- compileFile(" tests/pos-custom-args/i13044.scala" , defaultOptions.and(" -Xmax-inlines:33" )),
68- compileFile(" tests/pos-custom-args/jdk-8-app.scala" , defaultOptions.and(" -release:8" ))
6950 )
7051
7152 if scala.util.Properties .isJavaAtLeast(" 16" ) then
@@ -141,29 +122,14 @@ class CompilationTests {
141122 compileFilesInDir(" tests/neg" , defaultOptions),
142123 compileFilesInDir(" tests/neg-tailcall" , defaultOptions),
143124 compileFilesInDir(" tests/neg-strict" , defaultOptions.and(" -source" , " future" , " -deprecation" , " -Xfatal-warnings" )),
144- compileFilesInDir(" tests/neg-no-kind-polymorphism" , defaultOptions and " -Yno-kind-polymorphism" ),
145- compileFilesInDir(" tests/neg-custom-args/deprecation" , defaultOptions.and(" -Xfatal-warnings" , " -deprecation" )),
146- compileFilesInDir(" tests/neg-custom-args/fatal-warnings" , defaultOptions.and(" -Xfatal-warnings" )),
147- compileFilesInDir(" tests/neg-custom-args/nowarn" , defaultOptions.and(" -deprecation" , " -Wunused:nowarn" , " -Wconf:msg=@nowarn annotation does not suppress any warnings:e" )),
148- compileFilesInDir(" tests/neg-custom-args/erased" , defaultOptions.and(" -language:experimental.erasedDefinitions" )),
149125 compileFilesInDir(" tests/neg-custom-args/allow-double-bindings" , allowDoubleBindings),
150126 compileFilesInDir(" tests/neg-custom-args/allow-deep-subtypes" , allowDeepSubtypes),
151- compileFilesInDir(" tests/neg-custom-args/feature" , defaultOptions.and(" -Xfatal-warnings" , " -feature" )),
152- compileFilesInDir(" tests/neg-custom-args/no-experimental" , defaultOptions.and(" -Yno-experimental" )),
153127 compileFilesInDir(" tests/neg-custom-args/captures" , defaultOptions.and(" -language:experimental.captureChecking" )),
154- compileFilesInDir(" tests/neg-custom-args/explain" , defaultOptions.and(" -explain" )),
155- compileFile(" tests/neg-custom-args/avoid-warn-deprecation.scala" , defaultOptions.and(" -Xfatal-warnings" , " -feature" )),
156- compileFile(" tests/neg-custom-args/i3246.scala" , scala2CompatMode),
157- compileFile(" tests/neg-custom-args/overrideClass.scala" , scala2CompatMode),
158- compileFile(" tests/neg-custom-args/ovlazy.scala" , scala2CompatMode.and(" -Xfatal-warnings" )),
159- compileFile(" tests/neg-custom-args/newline-braces.scala" , scala2CompatMode.and(" -Xfatal-warnings" )),
160- compileFile(" tests/neg-custom-args/autoTuplingTest.scala" , defaultOptions.andLanguageFeature(" noAutoTupling" )),
161128 compileFile(" tests/neg-custom-args/i1650.scala" , allowDeepSubtypes),
162129 compileFile(" tests/neg-custom-args/i3882.scala" , allowDeepSubtypes),
163130 compileFile(" tests/neg-custom-args/i4372.scala" , allowDeepSubtypes),
164131 compileFile(" tests/neg-custom-args/i1754.scala" , allowDeepSubtypes),
165132 compileFile(" tests/neg-custom-args/i12650.scala" , allowDeepSubtypes),
166- compileFile(" tests/neg-custom-args/i9517.scala" , defaultOptions.and(" -Xprint-types" )),
167133 compileFile(" tests/neg-custom-args/interop-polytypes.scala" , allowDeepSubtypes.and(" -Yexplicit-nulls" )),
168134 compileFile(" tests/neg-custom-args/conditionalWarnings.scala" , allowDeepSubtypes.and(" -deprecation" ).and(" -Xfatal-warnings" )),
169135 compileFilesInDir(" tests/neg-custom-args/isInstanceOf" , allowDeepSubtypes and " -Xfatal-warnings" ),
@@ -175,23 +141,7 @@ class CompilationTests {
175141 " tests/neg-custom-args/toplevel-samesource/nested/S.scala" ),
176142 defaultOptions),
177143 compileFile(" tests/neg-custom-args/i6300.scala" , allowDeepSubtypes),
178- compileFile(" tests/neg-custom-args/infix.scala" , defaultOptions.and(" -source" , " future" , " -deprecation" , " -Xfatal-warnings" )),
179- compileFile(" tests/neg-custom-args/missing-targetName.scala" , defaultOptions.and(" -Yrequire-targetName" , " -Xfatal-warnings" )),
180- compileFile(" tests/neg-custom-args/wildcards.scala" , defaultOptions.and(" -source" , " future" , " -deprecation" , " -Xfatal-warnings" )),
181- compileFile(" tests/neg-custom-args/indentRight.scala" , defaultOptions.and(" -no-indent" , " -Xfatal-warnings" )),
182- compileDir(" tests/neg-custom-args/adhoc-extension" , defaultOptions.and(" -source" , " future" , " -feature" , " -Xfatal-warnings" )),
183144 compileFile(" tests/neg/i7575.scala" , defaultOptions.withoutLanguageFeatures.and(" -language:_" )),
184- compileFile(" tests/neg-custom-args/kind-projector.scala" , defaultOptions.and(" -Ykind-projector" )),
185- compileFile(" tests/neg-custom-args/kind-projector-underscores.scala" , defaultOptions.and(" -Ykind-projector:underscores" )),
186- compileFile(" tests/neg-custom-args/typeclass-derivation2.scala" , defaultOptions.and(" -language:experimental.erasedDefinitions" )),
187- compileFile(" tests/neg-custom-args/deptypes.scala" , defaultOptions.and(" -language:experimental.dependent" )),
188- compileFile(" tests/neg-custom-args/matchable.scala" , defaultOptions.and(" -Xfatal-warnings" , " -source" , " future" )),
189- compileFile(" tests/neg-custom-args/i7314.scala" , defaultOptions.and(" -Xfatal-warnings" , " -source" , " future" )),
190- compileFile(" tests/neg-custom-args/capt-wf.scala" , defaultOptions.and(" -language:experimental.captureChecking" , " -Xfatal-warnings" )),
191- compileFile(" tests/neg-custom-args/i13026.scala" , defaultOptions.and(" -print-lines" )),
192- compileFile(" tests/neg-custom-args/i13838.scala" , defaultOptions.and(" -Ximplicit-search-limit" , " 1000" )),
193- compileFile(" tests/neg-custom-args/jdk-9-app.scala" , defaultOptions.and(" -release:8" )),
194- compileFile(" tests/neg-custom-args/i10994.scala" , defaultOptions.and(" -source" , " future" )),
195145 ).checkExpectedErrors()
196146 }
197147
@@ -208,10 +158,6 @@ class CompilationTests {
208158 compileFile(" tests/run-custom-args/typeclass-derivation1.scala" , defaultOptions.without(yCheckOptions* )),
209159 compileFile(" tests/run-custom-args/tuple-cons.scala" , allowDeepSubtypes),
210160 compileFile(" tests/run-custom-args/i5256.scala" , allowDeepSubtypes),
211- compileFile(" tests/run-custom-args/no-useless-forwarders.scala" , defaultOptions and " -Xmixin-force-forwarders:false" ),
212- compileFile(" tests/run-custom-args/defaults-serizaliable-no-forwarders.scala" , defaultOptions and " -Xmixin-force-forwarders:false" ),
213- compileFilesInDir(" tests/run-custom-args/erased" , defaultOptions.and(" -language:experimental.erasedDefinitions" )),
214- compileFilesInDir(" tests/run-custom-args/fatal-warnings" , defaultOptions.and(" -Xfatal-warnings" )),
215161 compileFilesInDir(" tests/run-custom-args/captures" , allowDeepSubtypes.and(" -language:experimental.captureChecking" )),
216162 compileFilesInDir(" tests/run-deep-subtype" , allowDeepSubtypes),
217163 compileFilesInDir(" tests/run" , defaultOptions.and(" -Ysafe-init" )),
@@ -253,7 +199,6 @@ class CompilationTests {
253199 implicit val testGroup : TestGroup = TestGroup (" explicitNullsNeg" )
254200 aggregateTests(
255201 compileFilesInDir(" tests/explicit-nulls/neg" , explicitNullsOptions),
256- compileFilesInDir(" tests/explicit-nulls/neg-patmat" , explicitNullsOptions and " -Xfatal-warnings" ),
257202 compileFilesInDir(" tests/explicit-nulls/unsafe-common" , explicitNullsOptions),
258203 )
259204 }.checkExpectedErrors()
@@ -262,11 +207,7 @@ class CompilationTests {
262207 implicit val testGroup : TestGroup = TestGroup (" explicitNullsPos" )
263208 aggregateTests(
264209 compileFilesInDir(" tests/explicit-nulls/pos" , explicitNullsOptions),
265- compileFilesInDir(" tests/explicit-nulls/pos-separate" , explicitNullsOptions),
266- compileFilesInDir(" tests/explicit-nulls/pos-patmat" , explicitNullsOptions and " -Xfatal-warnings" ),
267210 compileFilesInDir(" tests/explicit-nulls/unsafe-common" , explicitNullsOptions and " -language:unsafeNulls" ),
268- compileFile(" tests/explicit-nulls/pos-special/i14682.scala" , explicitNullsOptions and " -Ysafe-init" ),
269- compileFile(" tests/explicit-nulls/pos-special/i14947.scala" , explicitNullsOptions and " -Ytest-pickler" and " -Xprint-types" ),
270211 )
271212 }.checkCompile()
272213
0 commit comments