@@ -37,7 +37,7 @@ class CompilationTests {
3737 compileFilesInDir(" tests/pos-special/sourcepath/outer" , defaultOptions.and(" -sourcepath" , " tests/pos-special/sourcepath" )),
3838 compileFile(" tests/pos-special/sourcepath/outer/nested/Test4.scala" , defaultOptions.and(" -sourcepath" , " tests/pos-special/sourcepath" )),
3939 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 " )),
4141 compileFile(" tests/pos-special/utf8encoded.scala" , defaultOptions.and(" -encoding" , " UTF8" )),
4242 compileFile(" tests/pos-special/utf16encoded.scala" , defaultOptions.and(" -encoding" , " UTF16" )),
4343 compileDir(" tests/pos-special/i18589" , defaultOptions.and(" -Wsafe-init" ).without(" -Ycheck:all" )),
@@ -146,7 +146,7 @@ class CompilationTests {
146146 aggregateTests(
147147 compileFilesInDir(" tests/neg" , defaultOptions, FileFilter .exclude(TestSources .negScala2LibraryTastyExcludelisted)),
148148 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 " )),
150150 compileFile(" tests/neg-custom-args/sourcepath/outer/nested/Test1.scala" , defaultOptions.and(" -sourcepath" , " tests/neg-custom-args/sourcepath" )),
151151 compileDir(" tests/neg-custom-args/sourcepath2/hi" , defaultOptions.and(" -sourcepath" , " tests/neg-custom-args/sourcepath2" , " -Xfatal-warnings" )),
152152 compileList(" duplicate source" , List (
@@ -169,7 +169,7 @@ class CompilationTests {
169169 aggregateTests(
170170 compileFilesInDir(" tests/run" , defaultOptions.and(" -Wsafe-init" )),
171171 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 " )),
173173 // Run tests for legacy lazy vals.
174174 compileFilesInDir(" tests/run" , defaultOptions.and(" -Wsafe-init" , " -Ylegacy-lazy-vals" , " -Ycheck-constraint-deps" ), FileFilter .include(TestSources .runLazyValsAllowlist)),
175175 ).checkRuns()
0 commit comments