Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Commit b5ccf33

Browse files
committed
Include compiler flags from system property when interpreting pragma
When interpreting the #partest pragma in check files, also look for compiler flags that were provided using the partest.scalac_opts system property. That is, for example, when running SCALAC_OPTS="-Ydelambdafy:method" test/partest test/files/...
1 parent 3e608c0 commit b5ccf33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/scala/scala/tools/partest/nest/Runner.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ class Runner(val testFile: File, val suiteRunner: SuiteRunner) {
248248
// use lines in block so labeled? Default to sorry, Charlie.
249249
def retainOn(expr: String) = {
250250
val f = expr.trim
251-
def flagWasSet(f: String) = suiteRunner.scalacExtraArgs contains f
251+
val allArgs = suiteRunner.scalacExtraArgs ++ PartestDefaults.scalacOpts.split(' ')
252+
def flagWasSet(f: String) = allArgs contains f
252253
val (invert, token) =
253254
if (f startsWith "!") (true, f drop 1) else (false, f)
254255
val cond = token.trim match {

0 commit comments

Comments
 (0)