@@ -42,31 +42,12 @@ 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
50
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" ))
70
51
)
71
52
72
53
if scala.util.Properties .isJavaAtLeast(" 16" ) then
@@ -142,29 +123,14 @@ class CompilationTests {
142
123
compileFilesInDir(" tests/neg" , defaultOptions),
143
124
compileFilesInDir(" tests/neg-tailcall" , defaultOptions),
144
125
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" )),
150
126
compileFilesInDir(" tests/neg-custom-args/allow-double-bindings" , allowDoubleBindings),
151
127
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" )),
154
128
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" )),
162
129
compileFile(" tests/neg-custom-args/i1650.scala" , allowDeepSubtypes),
163
130
compileFile(" tests/neg-custom-args/i3882.scala" , allowDeepSubtypes),
164
131
compileFile(" tests/neg-custom-args/i4372.scala" , allowDeepSubtypes),
165
132
compileFile(" tests/neg-custom-args/i1754.scala" , allowDeepSubtypes),
166
133
compileFile(" tests/neg-custom-args/i12650.scala" , allowDeepSubtypes),
167
- compileFile(" tests/neg-custom-args/i9517.scala" , defaultOptions.and(" -Xprint-types" )),
168
134
compileFile(" tests/neg-custom-args/interop-polytypes.scala" , allowDeepSubtypes.and(" -Yexplicit-nulls" )),
169
135
compileFile(" tests/neg-custom-args/conditionalWarnings.scala" , allowDeepSubtypes.and(" -deprecation" ).and(" -Xfatal-warnings" )),
170
136
compileFilesInDir(" tests/neg-custom-args/isInstanceOf" , allowDeepSubtypes and " -Xfatal-warnings" ),
@@ -176,23 +142,7 @@ class CompilationTests {
176
142
" tests/neg-custom-args/toplevel-samesource/nested/S.scala" ),
177
143
defaultOptions),
178
144
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" )),
184
145
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" )),
196
146
).checkExpectedErrors()
197
147
}
198
148
@@ -209,10 +159,6 @@ class CompilationTests {
209
159
compileFile(" tests/run-custom-args/typeclass-derivation1.scala" , defaultOptions.without(yCheckOptions* )),
210
160
compileFile(" tests/run-custom-args/tuple-cons.scala" , allowDeepSubtypes),
211
161
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" )),
216
162
compileFilesInDir(" tests/run-custom-args/captures" , allowDeepSubtypes.and(" -language:experimental.captureChecking" )),
217
163
compileFilesInDir(" tests/run-deep-subtype" , allowDeepSubtypes),
218
164
compileFilesInDir(" tests/run" , defaultOptions.and(" -Ysafe-init" )),
@@ -254,7 +200,6 @@ class CompilationTests {
254
200
implicit val testGroup : TestGroup = TestGroup (" explicitNullsNeg" )
255
201
aggregateTests(
256
202
compileFilesInDir(" tests/explicit-nulls/neg" , explicitNullsOptions),
257
- compileFilesInDir(" tests/explicit-nulls/neg-patmat" , explicitNullsOptions and " -Xfatal-warnings" ),
258
203
compileFilesInDir(" tests/explicit-nulls/unsafe-common" , explicitNullsOptions),
259
204
)
260
205
}.checkExpectedErrors()
@@ -263,11 +208,7 @@ class CompilationTests {
263
208
implicit val testGroup : TestGroup = TestGroup (" explicitNullsPos" )
264
209
aggregateTests(
265
210
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" ),
268
211
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" ),
271
212
)
272
213
}.checkCompile()
273
214
0 commit comments