@@ -37,7 +37,7 @@ class CompilationTests {
37
37
compileFilesInDir(" tests/pos-special/sourcepath/outer" , defaultOptions.and(" -sourcepath" , " tests/pos-special/sourcepath" )),
38
38
compileFile(" tests/pos-special/sourcepath/outer/nested/Test4.scala" , defaultOptions.and(" -sourcepath" , " tests/pos-special/sourcepath" )),
39
39
compileFilesInDir(" tests/pos-scala2" , defaultOptions.and(" -source" , " 3.0-migration" )),
40
- compileFilesInDir(" tests/pos-custom-args/captures" , defaultOptions.and(" -language:experimental.captureChecking" )),
40
+ compileFilesInDir(" tests/pos-custom-args/captures" , defaultOptions.and(" -language:experimental.captureChecking" , " -source " , " 3.8 " )),
41
41
compileFile(" tests/pos-special/utf8encoded.scala" , defaultOptions.and(" -encoding" , " UTF8" )),
42
42
compileFile(" tests/pos-special/utf16encoded.scala" , defaultOptions.and(" -encoding" , " UTF16" )),
43
43
compileDir(" tests/pos-special/i18589" , defaultOptions.and(" -Wsafe-init" ).without(" -Ycheck:all" )),
@@ -146,7 +146,7 @@ class CompilationTests {
146
146
aggregateTests(
147
147
compileFilesInDir(" tests/neg" , defaultOptions, FileFilter .exclude(TestSources .negScala2LibraryTastyExcludelisted)),
148
148
compileFilesInDir(" tests/neg-deep-subtype" , allowDeepSubtypes),
149
- compileFilesInDir(" tests/neg-custom-args/captures" , defaultOptions.and(" -language:experimental.captureChecking" )),
149
+ compileFilesInDir(" tests/neg-custom-args/captures" , defaultOptions.and(" -language:experimental.captureChecking" , " -source " , " 3.8 " )),
150
150
compileFile(" tests/neg-custom-args/sourcepath/outer/nested/Test1.scala" , defaultOptions.and(" -sourcepath" , " tests/neg-custom-args/sourcepath" )),
151
151
compileDir(" tests/neg-custom-args/sourcepath2/hi" , defaultOptions.and(" -sourcepath" , " tests/neg-custom-args/sourcepath2" , " -Xfatal-warnings" )),
152
152
compileList(" duplicate source" , List (
@@ -169,7 +169,7 @@ class CompilationTests {
169
169
aggregateTests(
170
170
compileFilesInDir(" tests/run" , defaultOptions.and(" -Wsafe-init" )),
171
171
compileFilesInDir(" tests/run-deep-subtype" , allowDeepSubtypes),
172
- compileFilesInDir(" tests/run-custom-args/captures" , allowDeepSubtypes.and(" -language:experimental.captureChecking" )),
172
+ compileFilesInDir(" tests/run-custom-args/captures" , allowDeepSubtypes.and(" -language:experimental.captureChecking" , " -source " , " 3.8 " )),
173
173
// Run tests for legacy lazy vals.
174
174
compileFilesInDir(" tests/run" , defaultOptions.and(" -Wsafe-init" , " -Ylegacy-lazy-vals" , " -Ycheck-constraint-deps" ), FileFilter .include(TestSources .runLazyValsAllowlist)),
175
175
).checkRuns()
0 commit comments