@@ -42,31 +42,12 @@ 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" )),
5350 compileDir(" tests/pos-special/stdlib" , defaultOptions),
54- compileFile(
55- // succeeds despite -Xfatal-warnings because of -nowarn
56- " tests/neg-custom-args/fatal-warnings/xfatalWarnings.scala" ,
57- defaultOptions.and(" -nowarn" , " -Xfatal-warnings" )
58- ),
59- compileFile(" tests/pos-special/typeclass-scaling.scala" , defaultOptions.and(" -Xmax-inlines" , " 40" )),
60- compileFile(" tests/pos-special/i7575.scala" , defaultOptions.andLanguageFeature(" dynamics" )),
61- compileFile(" tests/pos-special/kind-projector.scala" , defaultOptions.and(" -Ykind-projector" )),
62- compileFile(" tests/pos-special/kind-projector-underscores.scala" , defaultOptions.and(" -Ykind-projector:underscores" )),
63- compileFile(" tests/run/i5606.scala" , defaultOptions.and(" -Yretain-trees" )),
64- compileFile(" tests/pos-custom-args/i8875.scala" , defaultOptions.and(" -Xprint:getters" )),
65- compileFile(" tests/pos-custom-args/i9267.scala" , defaultOptions.and(" -Ystop-after:erasure" )),
66- compileFile(" tests/pos-special/extend-java-enum.scala" , defaultOptions.and(" -source" , " 3.0-migration" )),
67- compileFile(" tests/pos-custom-args/help.scala" , defaultOptions.and(" -help" , " -V" , " -W" , " -X" , " -Y" )),
68- compileFile(" tests/pos-custom-args/i13044.scala" , defaultOptions.and(" -Xmax-inlines:33" )),
69- compileFile(" tests/pos-custom-args/jdk-8-app.scala" , defaultOptions.and(" -release:8" ))
7051 )
7152
7253 if scala.util.Properties .isJavaAtLeast(" 16" ) then
@@ -142,29 +123,14 @@ class CompilationTests {
142123 compileFilesInDir(" tests/neg" , defaultOptions),
143124 compileFilesInDir(" tests/neg-tailcall" , defaultOptions),
144125 compileFilesInDir(" tests/neg-strict" , defaultOptions.and(" -source" , " future" , " -deprecation" , " -Xfatal-warnings" )),
145- compileFilesInDir(" tests/neg-no-kind-polymorphism" , defaultOptions and " -Yno-kind-polymorphism" ),
146- compileFilesInDir(" tests/neg-custom-args/deprecation" , defaultOptions.and(" -Xfatal-warnings" , " -deprecation" )),
147- compileFilesInDir(" tests/neg-custom-args/fatal-warnings" , defaultOptions.and(" -Xfatal-warnings" )),
148- compileFilesInDir(" tests/neg-custom-args/nowarn" , defaultOptions.and(" -deprecation" , " -Wunused:nowarn" , " -Wconf:msg=@nowarn annotation does not suppress any warnings:e" )),
149- compileFilesInDir(" tests/neg-custom-args/erased" , defaultOptions.and(" -language:experimental.erasedDefinitions" )),
150126 compileFilesInDir(" tests/neg-custom-args/allow-double-bindings" , allowDoubleBindings),
151127 compileFilesInDir(" tests/neg-custom-args/allow-deep-subtypes" , allowDeepSubtypes),
152- compileFilesInDir(" tests/neg-custom-args/feature" , defaultOptions.and(" -Xfatal-warnings" , " -feature" )),
153- compileFilesInDir(" tests/neg-custom-args/no-experimental" , defaultOptions.and(" -Yno-experimental" )),
154128 compileFilesInDir(" tests/neg-custom-args/captures" , defaultOptions.and(" -language:experimental.captureChecking" )),
155- compileFilesInDir(" tests/neg-custom-args/explain" , defaultOptions.and(" -explain" )),
156- compileFile(" tests/neg-custom-args/avoid-warn-deprecation.scala" , defaultOptions.and(" -Xfatal-warnings" , " -feature" )),
157- compileFile(" tests/neg-custom-args/i3246.scala" , scala2CompatMode),
158- compileFile(" tests/neg-custom-args/overrideClass.scala" , scala2CompatMode),
159- compileFile(" tests/neg-custom-args/ovlazy.scala" , scala2CompatMode.and(" -Xfatal-warnings" )),
160- compileFile(" tests/neg-custom-args/newline-braces.scala" , scala2CompatMode.and(" -Xfatal-warnings" )),
161- compileFile(" tests/neg-custom-args/autoTuplingTest.scala" , defaultOptions.andLanguageFeature(" noAutoTupling" )),
162129 compileFile(" tests/neg-custom-args/i1650.scala" , allowDeepSubtypes),
163130 compileFile(" tests/neg-custom-args/i3882.scala" , allowDeepSubtypes),
164131 compileFile(" tests/neg-custom-args/i4372.scala" , allowDeepSubtypes),
165132 compileFile(" tests/neg-custom-args/i1754.scala" , allowDeepSubtypes),
166133 compileFile(" tests/neg-custom-args/i12650.scala" , allowDeepSubtypes),
167- compileFile(" tests/neg-custom-args/i9517.scala" , defaultOptions.and(" -Xprint-types" )),
168134 compileFile(" tests/neg-custom-args/interop-polytypes.scala" , allowDeepSubtypes.and(" -Yexplicit-nulls" )),
169135 compileFile(" tests/neg-custom-args/conditionalWarnings.scala" , allowDeepSubtypes.and(" -deprecation" ).and(" -Xfatal-warnings" )),
170136 compileFilesInDir(" tests/neg-custom-args/isInstanceOf" , allowDeepSubtypes and " -Xfatal-warnings" ),
@@ -176,23 +142,7 @@ class CompilationTests {
176142 " tests/neg-custom-args/toplevel-samesource/nested/S.scala" ),
177143 defaultOptions),
178144 compileFile(" tests/neg-custom-args/i6300.scala" , allowDeepSubtypes),
179- compileFile(" tests/neg-custom-args/infix.scala" , defaultOptions.and(" -source" , " future" , " -deprecation" , " -Xfatal-warnings" )),
180- compileFile(" tests/neg-custom-args/missing-targetName.scala" , defaultOptions.and(" -Yrequire-targetName" , " -Xfatal-warnings" )),
181- compileFile(" tests/neg-custom-args/wildcards.scala" , defaultOptions.and(" -source" , " future" , " -deprecation" , " -Xfatal-warnings" )),
182- compileFile(" tests/neg-custom-args/indentRight.scala" , defaultOptions.and(" -no-indent" , " -Xfatal-warnings" )),
183- compileDir(" tests/neg-custom-args/adhoc-extension" , defaultOptions.and(" -source" , " future" , " -feature" , " -Xfatal-warnings" )),
184145 compileFile(" tests/neg/i7575.scala" , defaultOptions.withoutLanguageFeatures.and(" -language:_" )),
185- compileFile(" tests/neg-custom-args/kind-projector.scala" , defaultOptions.and(" -Ykind-projector" )),
186- compileFile(" tests/neg-custom-args/kind-projector-underscores.scala" , defaultOptions.and(" -Ykind-projector:underscores" )),
187- compileFile(" tests/neg-custom-args/typeclass-derivation2.scala" , defaultOptions.and(" -language:experimental.erasedDefinitions" )),
188- compileFile(" tests/neg-custom-args/deptypes.scala" , defaultOptions.and(" -language:experimental.dependent" )),
189- compileFile(" tests/neg-custom-args/matchable.scala" , defaultOptions.and(" -Xfatal-warnings" , " -source" , " future" )),
190- compileFile(" tests/neg-custom-args/i7314.scala" , defaultOptions.and(" -Xfatal-warnings" , " -source" , " future" )),
191- compileFile(" tests/neg-custom-args/capt-wf.scala" , defaultOptions.and(" -language:experimental.captureChecking" , " -Xfatal-warnings" )),
192- compileFile(" tests/neg-custom-args/i13026.scala" , defaultOptions.and(" -print-lines" )),
193- compileFile(" tests/neg-custom-args/i13838.scala" , defaultOptions.and(" -Ximplicit-search-limit" , " 1000" )),
194- compileFile(" tests/neg-custom-args/jdk-9-app.scala" , defaultOptions.and(" -release:8" )),
195- compileFile(" tests/neg-custom-args/i10994.scala" , defaultOptions.and(" -source" , " future" )),
196146 ).checkExpectedErrors()
197147 }
198148
@@ -209,10 +159,6 @@ class CompilationTests {
209159 compileFile(" tests/run-custom-args/typeclass-derivation1.scala" , defaultOptions.without(yCheckOptions* )),
210160 compileFile(" tests/run-custom-args/tuple-cons.scala" , allowDeepSubtypes),
211161 compileFile(" tests/run-custom-args/i5256.scala" , allowDeepSubtypes),
212- compileFile(" tests/run-custom-args/no-useless-forwarders.scala" , defaultOptions and " -Xmixin-force-forwarders:false" ),
213- compileFile(" tests/run-custom-args/defaults-serizaliable-no-forwarders.scala" , defaultOptions and " -Xmixin-force-forwarders:false" ),
214- compileFilesInDir(" tests/run-custom-args/erased" , defaultOptions.and(" -language:experimental.erasedDefinitions" )),
215- compileFilesInDir(" tests/run-custom-args/fatal-warnings" , defaultOptions.and(" -Xfatal-warnings" )),
216162 compileFilesInDir(" tests/run-custom-args/captures" , allowDeepSubtypes.and(" -language:experimental.captureChecking" )),
217163 compileFilesInDir(" tests/run-deep-subtype" , allowDeepSubtypes),
218164 compileFilesInDir(" tests/run" , defaultOptions.and(" -Ysafe-init" )),
@@ -254,7 +200,6 @@ class CompilationTests {
254200 implicit val testGroup : TestGroup = TestGroup (" explicitNullsNeg" )
255201 aggregateTests(
256202 compileFilesInDir(" tests/explicit-nulls/neg" , explicitNullsOptions),
257- compileFilesInDir(" tests/explicit-nulls/neg-patmat" , explicitNullsOptions and " -Xfatal-warnings" ),
258203 compileFilesInDir(" tests/explicit-nulls/unsafe-common" , explicitNullsOptions),
259204 )
260205 }.checkExpectedErrors()
@@ -263,11 +208,7 @@ class CompilationTests {
263208 implicit val testGroup : TestGroup = TestGroup (" explicitNullsPos" )
264209 aggregateTests(
265210 compileFilesInDir(" tests/explicit-nulls/pos" , explicitNullsOptions),
266- compileFilesInDir(" tests/explicit-nulls/pos-separate" , explicitNullsOptions),
267- compileFilesInDir(" tests/explicit-nulls/pos-patmat" , explicitNullsOptions and " -Xfatal-warnings" ),
268211 compileFilesInDir(" tests/explicit-nulls/unsafe-common" , explicitNullsOptions and " -language:unsafeNulls" ),
269- compileFile(" tests/explicit-nulls/pos-special/i14682.scala" , explicitNullsOptions and " -Ysafe-init" ),
270- compileFile(" tests/explicit-nulls/pos-special/i14947.scala" , explicitNullsOptions and " -Ytest-pickler" and " -Xprint-types" ),
271212 )
272213 }.checkCompile()
273214
0 commit comments