@@ -42,30 +42,11 @@ class CompilationTests {
42
42
compileFilesInDir(" tests/new" , defaultOptions.and(" -source" , " 3.2" )), // just to see whether 3.2 works
43
43
compileFilesInDir(" tests/pos-scala2" , scala2CompatMode),
44
44
compileFilesInDir(" tests/pos-custom-args/captures" , defaultOptions.and(" -language:experimental.captureChecking" )),
45
- compileFilesInDir(" tests/pos-custom-args/erased" , defaultOptions.and(" -language:experimental.erasedDefinitions" )),
46
45
compileFilesInDir(" tests/pos" , defaultOptions.and(" -Ysafe-init" )),
47
46
// Run tests for legacy lazy vals
48
47
compileFilesInDir(" tests/pos" , defaultOptions.and(" -Ysafe-init" , " -Ylegacy-lazy-vals" , " -Ycheck-constraint-deps" ), FileFilter .include(TestSources .posLazyValsAllowlist)),
49
48
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" )),
52
49
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" ))
69
50
)
70
51
71
52
if scala.util.Properties .isJavaAtLeast(" 16" ) then
@@ -141,29 +122,14 @@ class CompilationTests {
141
122
compileFilesInDir(" tests/neg" , defaultOptions),
142
123
compileFilesInDir(" tests/neg-tailcall" , defaultOptions),
143
124
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" )),
149
125
compileFilesInDir(" tests/neg-custom-args/allow-double-bindings" , allowDoubleBindings),
150
126
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" )),
153
127
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" )),
161
128
compileFile(" tests/neg-custom-args/i1650.scala" , allowDeepSubtypes),
162
129
compileFile(" tests/neg-custom-args/i3882.scala" , allowDeepSubtypes),
163
130
compileFile(" tests/neg-custom-args/i4372.scala" , allowDeepSubtypes),
164
131
compileFile(" tests/neg-custom-args/i1754.scala" , allowDeepSubtypes),
165
132
compileFile(" tests/neg-custom-args/i12650.scala" , allowDeepSubtypes),
166
- compileFile(" tests/neg-custom-args/i9517.scala" , defaultOptions.and(" -Xprint-types" )),
167
133
compileFile(" tests/neg-custom-args/interop-polytypes.scala" , allowDeepSubtypes.and(" -Yexplicit-nulls" )),
168
134
compileFile(" tests/neg-custom-args/conditionalWarnings.scala" , allowDeepSubtypes.and(" -deprecation" ).and(" -Xfatal-warnings" )),
169
135
compileFilesInDir(" tests/neg-custom-args/isInstanceOf" , allowDeepSubtypes and " -Xfatal-warnings" ),
@@ -175,23 +141,7 @@ class CompilationTests {
175
141
" tests/neg-custom-args/toplevel-samesource/nested/S.scala" ),
176
142
defaultOptions),
177
143
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" )),
183
144
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" )),
195
145
).checkExpectedErrors()
196
146
}
197
147
@@ -208,10 +158,6 @@ class CompilationTests {
208
158
compileFile(" tests/run-custom-args/typeclass-derivation1.scala" , defaultOptions.without(yCheckOptions* )),
209
159
compileFile(" tests/run-custom-args/tuple-cons.scala" , allowDeepSubtypes),
210
160
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" )),
215
161
compileFilesInDir(" tests/run-custom-args/captures" , allowDeepSubtypes.and(" -language:experimental.captureChecking" )),
216
162
compileFilesInDir(" tests/run-deep-subtype" , allowDeepSubtypes),
217
163
compileFilesInDir(" tests/run" , defaultOptions.and(" -Ysafe-init" )),
@@ -253,7 +199,6 @@ class CompilationTests {
253
199
implicit val testGroup : TestGroup = TestGroup (" explicitNullsNeg" )
254
200
aggregateTests(
255
201
compileFilesInDir(" tests/explicit-nulls/neg" , explicitNullsOptions),
256
- compileFilesInDir(" tests/explicit-nulls/neg-patmat" , explicitNullsOptions and " -Xfatal-warnings" ),
257
202
compileFilesInDir(" tests/explicit-nulls/unsafe-common" , explicitNullsOptions),
258
203
)
259
204
}.checkExpectedErrors()
@@ -262,11 +207,7 @@ class CompilationTests {
262
207
implicit val testGroup : TestGroup = TestGroup (" explicitNullsPos" )
263
208
aggregateTests(
264
209
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" ),
267
210
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" ),
270
211
)
271
212
}.checkCompile()
272
213
0 commit comments