diff --git a/test/async/jvm/anf.scala b/test/async/jvm/anf.scala index 63e6aa8053ca..357651fc70f6 100644 --- a/test/async/jvm/anf.scala +++ b/test/async/jvm/anf.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.anf.AnfTransformSpec]) diff --git a/test/async/jvm/await0.scala b/test/async/jvm/await0.scala index 896b9aaf04e1..fb412b73fc68 100644 --- a/test/async/jvm/await0.scala +++ b/test/async/jvm/await0.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.await0.Await0Spec]) diff --git a/test/async/jvm/block0.scala b/test/async/jvm/block0.scala index b5192a684bb8..f485ea05fdc6 100644 --- a/test/async/jvm/block0.scala +++ b/test/async/jvm/block0.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.block0.AsyncSpec]) diff --git a/test/async/jvm/block1.scala b/test/async/jvm/block1.scala index 5a4cd0e14c26..0fd42105656e 100644 --- a/test/async/jvm/block1.scala +++ b/test/async/jvm/block1.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.block1.Block1Spec]) diff --git a/test/async/jvm/completable-future.scala b/test/async/jvm/completable-future.scala index dd2b5538b31b..6d702d508e2e 100644 --- a/test/async/jvm/completable-future.scala +++ b/test/async/jvm/completable-future.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import java.util.concurrent._ import scala.tools.partest.async.CompletableFutureAwait._ diff --git a/test/async/jvm/concurrent_AfterRefchecksIssue.scala b/test/async/jvm/concurrent_AfterRefchecksIssue.scala index e91af0b7924e..1113bbbd29fe 100644 --- a/test/async/jvm/concurrent_AfterRefchecksIssue.scala +++ b/test/async/jvm/concurrent_AfterRefchecksIssue.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._, ExecutionContext.Implicits.global, scala.tools.testkit.async.Async._ diff --git a/test/async/jvm/concurrent_ArrayIndexOutOfBoundIssue.scala b/test/async/jvm/concurrent_ArrayIndexOutOfBoundIssue.scala index c760607568dd..b1017e8f94eb 100644 --- a/test/async/jvm/concurrent_ArrayIndexOutOfBoundIssue.scala +++ b/test/async/jvm/concurrent_ArrayIndexOutOfBoundIssue.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_GenericTypeBoundaryIssue.scala b/test/async/jvm/concurrent_GenericTypeBoundaryIssue.scala index 83cc4a3d2e29..a63fe07cfddc 100644 --- a/test/async/jvm/concurrent_GenericTypeBoundaryIssue.scala +++ b/test/async/jvm/concurrent_GenericTypeBoundaryIssue.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import Test.test diff --git a/test/async/jvm/concurrent_MatchEndIssue.scala b/test/async/jvm/concurrent_MatchEndIssue.scala index bd37b24f3612..055fd125ead2 100644 --- a/test/async/jvm/concurrent_MatchEndIssue.scala +++ b/test/async/jvm/concurrent_MatchEndIssue.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_NegativeArraySizeException.scala b/test/async/jvm/concurrent_NegativeArraySizeException.scala index 9cda7fa26d8e..58960561fb2b 100644 --- a/test/async/jvm/concurrent_NegativeArraySizeException.scala +++ b/test/async/jvm/concurrent_NegativeArraySizeException.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_NegativeArraySizeExceptionFine1.scala b/test/async/jvm/concurrent_NegativeArraySizeExceptionFine1.scala index 20a7325838e2..1c3ddc9f4a33 100644 --- a/test/async/jvm/concurrent_NegativeArraySizeExceptionFine1.scala +++ b/test/async/jvm/concurrent_NegativeArraySizeExceptionFine1.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_ReturnTupleIssue.scala b/test/async/jvm/concurrent_ReturnTupleIssue.scala index 9f8d52949d6d..61c3495a7bfe 100644 --- a/test/async/jvm/concurrent_ReturnTupleIssue.scala +++ b/test/async/jvm/concurrent_ReturnTupleIssue.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_fetch.scala b/test/async/jvm/concurrent_fetch.scala index 126dd9204438..c25214709ecb 100644 --- a/test/async/jvm/concurrent_fetch.scala +++ b/test/async/jvm/concurrent_fetch.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent.{Await, Future, duration} import scala.concurrent.ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_patternAlternative.scala b/test/async/jvm/concurrent_patternAlternative.scala index f85aef1e9ef0..8ccfd05f005a 100644 --- a/test/async/jvm/concurrent_patternAlternative.scala +++ b/test/async/jvm/concurrent_patternAlternative.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_patternAlternativeBothAnnotations.scala b/test/async/jvm/concurrent_patternAlternativeBothAnnotations.scala index b94a8bad4323..61e8bfb9a934 100644 --- a/test/async/jvm/concurrent_patternAlternativeBothAnnotations.scala +++ b/test/async/jvm/concurrent_patternAlternativeBothAnnotations.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_polymorphicMethod.scala b/test/async/jvm/concurrent_polymorphicMethod.scala index 13543621dae0..c74160a8c05c 100644 --- a/test/async/jvm/concurrent_polymorphicMethod.scala +++ b/test/async/jvm/concurrent_polymorphicMethod.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_shadowing.scala b/test/async/jvm/concurrent_shadowing.scala index 8918096d4da0..9e959911fe4c 100644 --- a/test/async/jvm/concurrent_shadowing.scala +++ b/test/async/jvm/concurrent_shadowing.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_shadowing0.scala b/test/async/jvm/concurrent_shadowing0.scala index f1593831be93..e708eb44d169 100644 --- a/test/async/jvm/concurrent_shadowing0.scala +++ b/test/async/jvm/concurrent_shadowing0.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_shadowing2.scala b/test/async/jvm/concurrent_shadowing2.scala index 65fa05e086ab..3a02f0b2db9d 100644 --- a/test/async/jvm/concurrent_shadowing2.scala +++ b/test/async/jvm/concurrent_shadowing2.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_shadowingRefinedTypes.scala b/test/async/jvm/concurrent_shadowingRefinedTypes.scala index 79c96e09e76a..5264923c9fbd 100644 --- a/test/async/jvm/concurrent_shadowingRefinedTypes.scala +++ b/test/async/jvm/concurrent_shadowingRefinedTypes.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/jvm/concurrent_test0.scala b/test/async/jvm/concurrent_test0.scala index 772c25826b27..24dd770474d6 100644 --- a/test/async/jvm/concurrent_test0.scala +++ b/test/async/jvm/concurrent_test0.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync /* * Scala (https://www.scala-lang.org) diff --git a/test/async/jvm/exceptions.scala b/test/async/jvm/exceptions.scala index 59ae91f28a66..22908defa1a5 100644 --- a/test/async/jvm/exceptions.scala +++ b/test/async/jvm/exceptions.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.exceptions.ExceptionsSpec]) diff --git a/test/async/jvm/futures.scala b/test/async/jvm/futures.scala index 55ebd4c8a6bb..cc871fb056a4 100644 --- a/test/async/jvm/futures.scala +++ b/test/async/jvm/futures.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync -deprecation +//> using options -Xasync -deprecation object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.futures.FutureSpec]) diff --git a/test/async/jvm/hygiene.scala b/test/async/jvm/hygiene.scala index debee49bffc5..39cb86c11767 100644 --- a/test/async/jvm/hygiene.scala +++ b/test/async/jvm/hygiene.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.hygiene.HygieneSpec]) diff --git a/test/async/jvm/ifelse0.scala b/test/async/jvm/ifelse0.scala index 138ee0a57e68..e81a026e53b3 100644 --- a/test/async/jvm/ifelse0.scala +++ b/test/async/jvm/ifelse0.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.ifelse0.IfElseSpec]) diff --git a/test/async/jvm/ifelse0_while.scala b/test/async/jvm/ifelse0_while.scala index 64d07fde62d6..a5cce1445e31 100644 --- a/test/async/jvm/ifelse0_while.scala +++ b/test/async/jvm/ifelse0_while.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.ifelse0.WhileSpec]) diff --git a/test/async/jvm/ifelse1.scala b/test/async/jvm/ifelse1.scala index 86e6cc57ef93..104cf20ce323 100644 --- a/test/async/jvm/ifelse1.scala +++ b/test/async/jvm/ifelse1.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.ifelse1.IfElse1Spec]) diff --git a/test/async/jvm/ifelse2.scala b/test/async/jvm/ifelse2.scala index 12e8bd5a7b88..a65ed71ad45e 100644 --- a/test/async/jvm/ifelse2.scala +++ b/test/async/jvm/ifelse2.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.ifelse2.IfElse2Spec]) diff --git a/test/async/jvm/ifelse3.scala b/test/async/jvm/ifelse3.scala index 0eaeb8f5ea0d..5f455d7bbfee 100644 --- a/test/async/jvm/ifelse3.scala +++ b/test/async/jvm/ifelse3.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.ifelse3.IfElse3Spec]) diff --git a/test/async/jvm/ifelse4.scala b/test/async/jvm/ifelse4.scala index b32a5de26bac..4fd1ff982921 100644 --- a/test/async/jvm/ifelse4.scala +++ b/test/async/jvm/ifelse4.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.ifelse4.IfElse4Spec]) diff --git a/test/async/jvm/lazyval.scala b/test/async/jvm/lazyval.scala index d52f7e275821..414edd6c5310 100644 --- a/test/async/jvm/lazyval.scala +++ b/test/async/jvm/lazyval.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.lazyval.LazyValSpec]) diff --git a/test/async/jvm/live.scala b/test/async/jvm/live.scala index 18fb9245bc15..7ef1e9bd0a0f 100644 --- a/test/async/jvm/live.scala +++ b/test/async/jvm/live.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.live.LiveVariablesSpec]) diff --git a/test/async/jvm/localclasses.scala b/test/async/jvm/localclasses.scala index 9bafc634d079..c0fb5d251051 100644 --- a/test/async/jvm/localclasses.scala +++ b/test/async/jvm/localclasses.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.neg.LocalClasses0Spec]) diff --git a/test/async/jvm/match0.scala b/test/async/jvm/match0.scala index 9916df5edda9..566227e38d18 100644 --- a/test/async/jvm/match0.scala +++ b/test/async/jvm/match0.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.match0.MatchSpec]) diff --git a/test/async/jvm/nesteddef.scala b/test/async/jvm/nesteddef.scala index 42e1763bdfc3..656797e991c9 100644 --- a/test/async/jvm/nesteddef.scala +++ b/test/async/jvm/nesteddef.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.nesteddef.NestedDef]) diff --git a/test/async/jvm/noawait.scala b/test/async/jvm/noawait.scala index dbcc03ac3662..788984fd8d5a 100644 --- a/test/async/jvm/noawait.scala +++ b/test/async/jvm/noawait.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.noawait.NoAwaitSpec]) diff --git a/test/async/jvm/stackoverflow.scala b/test/async/jvm/stackoverflow.scala index f1395194a9f7..6708575d3120 100644 --- a/test/async/jvm/stackoverflow.scala +++ b/test/async/jvm/stackoverflow.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import scala.concurrent.duration._ diff --git a/test/async/jvm/syncOptimization.scala b/test/async/jvm/syncOptimization.scala index a6fc3392c4dc..4d23ea348231 100644 --- a/test/async/jvm/syncOptimization.scala +++ b/test/async/jvm/syncOptimization.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.tools.testkit.async.Async._ import scala.concurrent._ diff --git a/test/async/jvm/toughtype.scala b/test/async/jvm/toughtype.scala index 9587afa35f19..3be405cdbfad 100644 --- a/test/async/jvm/toughtype.scala +++ b/test/async/jvm/toughtype.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync object Test extends scala.tools.partest.JUnitTest(classOf[scala.async.run.toughtype.ToughTypeSpec]) diff --git a/test/async/neg/ill-nested-await.scala b/test/async/neg/ill-nested-await.scala index dc2a0f93a4f8..aacee1e7ac9d 100644 --- a/test/async/neg/ill-nested-await.scala +++ b/test/async/neg/ill-nested-await.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.concurrent._ import ExecutionContext.Implicits.global diff --git a/test/async/neg/naked_await.scala b/test/async/neg/naked_await.scala index 31833df14c99..13333d11615f 100644 --- a/test/async/neg/naked_await.scala +++ b/test/async/neg/naked_await.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.tools.testkit.async.Async._ import scala.concurrent.{ExecutionContext, Future} diff --git a/test/async/neg/stark_naked_await.scala b/test/async/neg/stark_naked_await.scala index 7025061eafcd..11970557b7c2 100644 --- a/test/async/neg/stark_naked_await.scala +++ b/test/async/neg/stark_naked_await.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.tools.testkit.async.Async._ import scala.concurrent.{ExecutionContext, Future} diff --git a/test/async/run/booleans.scala b/test/async/run/booleans.scala index fe9df0b8ca87..f5c74607f59b 100644 --- a/test/async/run/booleans.scala +++ b/test/async/run/booleans.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.tools.partest.async.OptionAwait._ import org.junit.Assert._ diff --git a/test/async/run/edge-cases.scala b/test/async/run/edge-cases.scala index 4306570dc608..ab244c239a62 100644 --- a/test/async/run/edge-cases.scala +++ b/test/async/run/edge-cases.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.tools.partest.async.OptionAwait._ import org.junit.Assert._ diff --git a/test/async/run/lambda.scala b/test/async/run/lambda.scala index 2f23500d581c..455efc8af908 100644 --- a/test/async/run/lambda.scala +++ b/test/async/run/lambda.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.tools.partest.async.OptionAwait._ //import org.junit.Assert._ diff --git a/test/async/run/output.scala b/test/async/run/output.scala index 4324eae15b95..a61332f768eb 100644 --- a/test/async/run/output.scala +++ b/test/async/run/output.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.tools.partest.async.{OutputAwait, Output} import scala.collection.immutable diff --git a/test/async/run/smoketest.scala b/test/async/run/smoketest.scala index 1a1858988c81..f31c46445603 100644 --- a/test/async/run/smoketest.scala +++ b/test/async/run/smoketest.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.tools.partest.async.OptionAwait._ import org.junit.Assert._ diff --git a/test/async/run/string-switch-async.scala b/test/async/run/string-switch-async.scala index 466f7e3abac4..f907e0b5a34f 100644 --- a/test/async/run/string-switch-async.scala +++ b/test/async/run/string-switch-async.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.tools.partest.async.OptionAwait._ import org.junit.Assert._ diff --git a/test/async/run/string-switch-bug.scala b/test/async/run/string-switch-bug.scala index daa0020925dc..28fb8889c504 100644 --- a/test/async/run/string-switch-bug.scala +++ b/test/async/run/string-switch-bug.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.tools.partest.async.OptionAwait._ import org.junit.Assert._ diff --git a/test/async/run/t12723.scala b/test/async/run/t12723.scala index 473e89a63fa5..0c8e0796999d 100644 --- a/test/async/run/t12723.scala +++ b/test/async/run/t12723.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync -Werror -Wnonunit-statement +//> using options -Xasync -Werror -Wnonunit-statement import scala.tools.partest.async.OptionAwait._ import org.junit.Assert._ diff --git a/test/async/run/value-class.scala b/test/async/run/value-class.scala index d50bd24422b2..0fd3d81f8b5a 100644 --- a/test/async/run/value-class.scala +++ b/test/async/run/value-class.scala @@ -1,4 +1,4 @@ -// scalac: -Xasync +//> using options -Xasync import scala.tools.partest.async.OptionAwait._ import org.junit.Assert._ diff --git a/test/files/instrumented/inline-in-constructors/assert_1.scala b/test/files/instrumented/inline-in-constructors/assert_1.scala index 9c055a49475e..0ab3c4047773 100644 --- a/test/files/instrumented/inline-in-constructors/assert_1.scala +++ b/test/files/instrumented/inline-in-constructors/assert_1.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Wopt +//> using options -opt:inline:** -Wopt package instrumented object MyPredef { diff --git a/test/files/instrumented/inline-in-constructors/bar_2.scala b/test/files/instrumented/inline-in-constructors/bar_2.scala index 7a4c4504b898..b67ea9f2f90a 100644 --- a/test/files/instrumented/inline-in-constructors/bar_2.scala +++ b/test/files/instrumented/inline-in-constructors/bar_2.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** package instrumented /** Class that uses assert compiled in previous compiler run so we check if diff --git a/test/files/instrumented/inline-in-constructors/test_3.scala b/test/files/instrumented/inline-in-constructors/test_3.scala index 00fbf8bd5d44..d4e6cd6fe716 100644 --- a/test/files/instrumented/inline-in-constructors/test_3.scala +++ b/test/files/instrumented/inline-in-constructors/test_3.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Wopt +//> using options -opt:inline:** -Wopt import scala.tools.partest.instrumented.Instrumentation._ import instrumented._ diff --git a/test/files/jvm/annotations/Test_2.scala b/test/files/jvm/annotations/Test_2.scala index 83fdeb3f808a..d098f4084ea3 100644 --- a/test/files/jvm/annotations/Test_2.scala +++ b/test/files/jvm/annotations/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // import scala.tools.partest.Util.ArrayDeep import scala.language.reflectiveCalls diff --git a/test/files/jvm/deprecation/Test_1.scala b/test/files/jvm/deprecation/Test_1.scala index 04c9b22365be..3288e20a4a5b 100644 --- a/test/files/jvm/deprecation/Test_1.scala +++ b/test/files/jvm/deprecation/Test_1.scala @@ -1,5 +1,5 @@ -// scalac: -Xlint:deprecation +//> using options -Xlint:deprecation class Test { def test: Unit = { diff --git a/test/files/jvm/nil-conversion/Foo_1.scala b/test/files/jvm/nil-conversion/Foo_1.scala index 51144f297cec..1fcf37c0393d 100644 --- a/test/files/jvm/nil-conversion/Foo_1.scala +++ b/test/files/jvm/nil-conversion/Foo_1.scala @@ -1,4 +1,4 @@ -// scalac: -opt:none +//> using options -opt:none class Foo_1 { def foo: List[Int] = List() diff --git a/test/files/jvm/nil-conversion/Test.scala b/test/files/jvm/nil-conversion/Test.scala index 7305989fb5f7..78013c21b437 100644 --- a/test/files/jvm/nil-conversion/Test.scala +++ b/test/files/jvm/nil-conversion/Test.scala @@ -1,4 +1,4 @@ -// scalac: -opt:none +//> using options -opt:none import scala.tools.partest.BytecodeTest import scala.tools.asm diff --git a/test/files/jvm/t10610.scala b/test/files/jvm/t10610.scala index a697bc941c88..b54e0de685a8 100644 --- a/test/files/jvm/t10610.scala +++ b/test/files/jvm/t10610.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:serial +//> using options -Xlint:serial // @SerialVersionUID(0L) // should have no effect trait T diff --git a/test/files/jvm/t7253/test.scala b/test/files/jvm/t7253/test.scala index c506a116ae0c..9ee22aa71887 100644 --- a/test/files/jvm/t7253/test.scala +++ b/test/files/jvm/t7253/test.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint import scala.tools.asm.Opcodes import scala.tools.partest.BytecodeTest diff --git a/test/files/jvm/t8582.scala b/test/files/jvm/t8582.scala index da76d80e8de9..8d33663d45e3 100644 --- a/test/files/jvm/t8582.scala +++ b/test/files/jvm/t8582.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation import scala.tools.partest.BytecodeTest import scala.jdk.CollectionConverters._ diff --git a/test/files/neg/FooMapView.scala b/test/files/neg/FooMapView.scala index ce448be3a301..103bf924246d 100644 --- a/test/files/neg/FooMapView.scala +++ b/test/files/neg/FooMapView.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -deprecation +//> using options -Xfatal-warnings -deprecation // class FooMapView extends collection.MapView[Int,Int] { def iterator: Iterator[(Int,Int)] = ??? diff --git a/test/files/neg/abstract-explaintypes.scala b/test/files/neg/abstract-explaintypes.scala index 99e09b956d39..2b2d3e6ad9c1 100644 --- a/test/files/neg/abstract-explaintypes.scala +++ b/test/files/neg/abstract-explaintypes.scala @@ -1,4 +1,4 @@ -// scalac: -explaintypes +//> using options -explaintypes // trait A { type T <: A; diff --git a/test/files/neg/abstract-inaccessible.scala b/test/files/neg/abstract-inaccessible.scala index d2636a53e881..006ccc84a407 100644 --- a/test/files/neg/abstract-inaccessible.scala +++ b/test/files/neg/abstract-inaccessible.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint:inaccessible +//> using options -Xfatal-warnings -Xlint:inaccessible // package foo { private[foo] trait Bippy { } diff --git a/test/files/neg/aladdin1055/Test_1.scala b/test/files/neg/aladdin1055/Test_1.scala index 4e2fb0c3ba14..4dd40df63666 100644 --- a/test/files/neg/aladdin1055/Test_1.scala +++ b/test/files/neg/aladdin1055/Test_1.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings object Test { def foo(t: A.T) = t match { case a: A.TT => 0 diff --git a/test/files/neg/and-future.scala b/test/files/neg/and-future.scala index 1092c013b186..01e821206798 100644 --- a/test/files/neg/and-future.scala +++ b/test/files/neg/and-future.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // trait X diff --git a/test/files/neg/applydynamic_sip.scala b/test/files/neg/applydynamic_sip.scala index cc37378903b3..5884dbec7544 100644 --- a/test/files/neg/applydynamic_sip.scala +++ b/test/files/neg/applydynamic_sip.scala @@ -1,4 +1,4 @@ -// scalac: -language:dynamics +//> using options -language:dynamics // object Test extends App { val qual: Dynamic = ??? diff --git a/test/files/neg/auto-application.scala b/test/files/neg/auto-application.scala index 0da77191caf8..906bd16d158e 100644 --- a/test/files/neg/auto-application.scala +++ b/test/files/neg/auto-application.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Werror +//> using options -deprecation -Werror class Test { ("": Any).##() diff --git a/test/files/neg/bad-advice.scala b/test/files/neg/bad-advice.scala index d0706197278b..0683a61036f0 100644 --- a/test/files/neg/bad-advice.scala +++ b/test/files/neg/bad-advice.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Bip object Test { diff --git a/test/files/neg/badtok-1.scala b/test/files/neg/badtok-1.scala index 563711e2a517..c9e98d468bb8 100644 --- a/test/files/neg/badtok-1.scala +++ b/test/files/neg/badtok-1.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation -Werror +//> using options -Xlint:deprecation -Werror // // bug 989 '42' diff --git a/test/files/neg/byname-implicit.scala b/test/files/neg/byname-implicit.scala index 49ce1011eda4..d635bef915de 100644 --- a/test/files/neg/byname-implicit.scala +++ b/test/files/neg/byname-implicit.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:byname-implicit +//> using options -Werror -Xlint:byname-implicit import language._ diff --git a/test/files/neg/case-collision.scala b/test/files/neg/case-collision.scala index 378c6c3957fe..4e005dc40479 100644 --- a/test/files/neg/case-collision.scala +++ b/test/files/neg/case-collision.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // package foo { diff --git a/test/files/neg/catch-all.scala b/test/files/neg/catch-all.scala index eb9f9b506716..46d6d757e4fb 100644 --- a/test/files/neg/catch-all.scala +++ b/test/files/neg/catch-all.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // object CatchAll { try { "warn" } catch { case _ => } diff --git a/test/files/neg/check-dead.scala b/test/files/neg/check-dead.scala index f702c754e6f1..efe12f0bb4bf 100644 --- a/test/files/neg/check-dead.scala +++ b/test/files/neg/check-dead.scala @@ -1,4 +1,4 @@ -// scalac: -Wdead-code -Werror +//> using options -Wdead-code -Werror object Other { def oops(msg: String = "xxx"): Nothing = throw new Exception(msg) // should not warn } diff --git a/test/files/neg/checksensible.scala b/test/files/neg/checksensible.scala index 65cfe390eddf..451f3ceb774a 100644 --- a/test/files/neg/checksensible.scala +++ b/test/files/neg/checksensible.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -deprecation +//> using options -Xfatal-warnings -deprecation // final class Bip { def <=(other: Bop) = true } final class Bop { } diff --git a/test/files/neg/choices.scala b/test/files/neg/choices.scala index fa1ba9ab8333..9803dfdf802a 100644 --- a/test/files/neg/choices.scala +++ b/test/files/neg/choices.scala @@ -1,4 +1,4 @@ -// scalac: -Yresolve-term-conflict +//> using options -Yresolve-term-conflict // object Test { def main(args: Array[String]): Unit = { diff --git a/test/files/neg/classOfDeprecation.scala b/test/files/neg/classOfDeprecation.scala index d7557e3f2e90..92bab336b57f 100644 --- a/test/files/neg/classOfDeprecation.scala +++ b/test/files/neg/classOfDeprecation.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Werror +//> using options -deprecation -Werror @deprecated("no no!", "like, forever") class C class ann(x: Any) extends annotation.Annotation diff --git a/test/files/neg/classmanifests_new_deprecations.scala b/test/files/neg/classmanifests_new_deprecations.scala index 71e5cd22ac80..2c253e170417 100644 --- a/test/files/neg/classmanifests_new_deprecations.scala +++ b/test/files/neg/classmanifests_new_deprecations.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Werror +//> using options -Xlint -Werror // object Test extends App { def rcm1[T: scala.reflect.ClassManifest] = ??? diff --git a/test/files/neg/constructor-init-order.scala b/test/files/neg/constructor-init-order.scala index 8bb8d720cc83..baaaa3fb2cd6 100644 --- a/test/files/neg/constructor-init-order.scala +++ b/test/files/neg/constructor-init-order.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // trait Foo0 { val quux1: String diff --git a/test/files/neg/cycle-bounds.scala b/test/files/neg/cycle-bounds.scala index 5cf5db1996d1..6a709cec752a 100644 --- a/test/files/neg/cycle-bounds.scala +++ b/test/files/neg/cycle-bounds.scala @@ -1,4 +1,4 @@ -// scalac: -Ybreak-cycles +//> using options -Ybreak-cycles // // This should be allowed class Ok[T <: Comparable[_ >: T]] diff --git a/test/files/neg/delayed-init-ref.scala b/test/files/neg/delayed-init-ref.scala index eebabca1d310..1ad93fa328bd 100644 --- a/test/files/neg/delayed-init-ref.scala +++ b/test/files/neg/delayed-init-ref.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xlint -Xfatal-warnings +//> using options -deprecation -Xlint -Xfatal-warnings // trait T { val traitVal = "" diff --git a/test/files/neg/deprecated-annots.scala b/test/files/neg/deprecated-annots.scala index 609a02ffc3ef..fbdcd39b81cf 100644 --- a/test/files/neg/deprecated-annots.scala +++ b/test/files/neg/deprecated-annots.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xlint -Xsource:3 +//> using options -Werror -Xlint -Xsource:3 class C[@specialized A] diff --git a/test/files/neg/deprecated-options.scala b/test/files/neg/deprecated-options.scala index ce12f38d587d..bea08b8e324f 100644 --- a/test/files/neg/deprecated-options.scala +++ b/test/files/neg/deprecated-options.scala @@ -1,4 +1,4 @@ // -// scalac: -Werror -deprecation -optimise -Xexperimental -Xfuture -Xsource:2.14 +//> using options -Werror -deprecation -optimise -Xexperimental -Xfuture -Xsource:2.14 // // Deprecated options are announced before compilation. diff --git a/test/files/neg/deprecated_widening.scala b/test/files/neg/deprecated_widening.scala index fade37e00d95..46fc46fdd25a 100644 --- a/test/files/neg/deprecated_widening.scala +++ b/test/files/neg/deprecated_widening.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:deprecation +//> using options -Werror -Xlint:deprecation // object Test { def foo(i: Int, l: Long): Unit = { diff --git a/test/files/neg/dotless-targs-a.scala b/test/files/neg/dotless-targs-a.scala index d3095c69adfc..a1bfe41655cc 100644 --- a/test/files/neg/dotless-targs-a.scala +++ b/test/files/neg/dotless-targs-a.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 -Yrangepos:false +//> using options -Xsource:3 -Yrangepos:false class A { def fn1 = List apply 1 def fn2 = List apply[Int] 2 diff --git a/test/files/neg/dotless-targs-b.scala b/test/files/neg/dotless-targs-b.scala index d54344238a9a..838d6cb49842 100644 --- a/test/files/neg/dotless-targs-b.scala +++ b/test/files/neg/dotless-targs-b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint -Xsource:3 -Yrangepos:false +//> using options -Werror -Xlint -Xsource:3 -Yrangepos:false class A { def fn1 = List apply 1 def fn2 = List apply[Int] 2 diff --git a/test/files/neg/dotless-targs.scala b/test/files/neg/dotless-targs.scala index 70e01c9a00a4..e4b41535fb19 100644 --- a/test/files/neg/dotless-targs.scala +++ b/test/files/neg/dotless-targs.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 -language:postfixOps +//> using options -Xsource:3 -language:postfixOps // class A { def f1 = "f1" isInstanceOf[String] // not ok diff --git a/test/files/neg/early-type-defs.scala b/test/files/neg/early-type-defs.scala index ba78f423acd9..8c425e9b5f24 100644 --- a/test/files/neg/early-type-defs.scala +++ b/test/files/neg/early-type-defs.scala @@ -1,4 +1,4 @@ // -// scalac: -Werror -Xlint +//> using options -Werror -Xlint // object Test extends { type A1 = Int } with Runnable { def run() = () } diff --git a/test/files/neg/exhausting.scala b/test/files/neg/exhausting.scala index 48d6cc6b4120..d595aab64b26 100644 --- a/test/files/neg/exhausting.scala +++ b/test/files/neg/exhausting.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { sealed abstract class Foo[T] diff --git a/test/files/neg/for-comprehension-old.scala b/test/files/neg/for-comprehension-old.scala index 0434d59adb29..adbb3babcc8b 100644 --- a/test/files/neg/for-comprehension-old.scala +++ b/test/files/neg/for-comprehension-old.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // class A { for (x <- 1 to 5 ; y = x) yield x+y // ok diff --git a/test/files/neg/for-comprehension-val.scala b/test/files/neg/for-comprehension-val.scala index aaab52c2976c..875e9d09a9f6 100644 --- a/test/files/neg/for-comprehension-val.scala +++ b/test/files/neg/for-comprehension-val.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // class A { for (x <- 1 to 5 ; y = x) yield x+y // ok diff --git a/test/files/neg/hk-existential-lb.scala b/test/files/neg/hk-existential-lb.scala index af4bc27c3341..df4ff906fb63 100644 --- a/test/files/neg/hk-existential-lb.scala +++ b/test/files/neg/hk-existential-lb.scala @@ -1,4 +1,4 @@ -// scalac: -language:higherKinds,existentials -Xfatal-warnings +//> using options -language:higherKinds,existentials -Xfatal-warnings // class Functor[F[_]] object Functor { diff --git a/test/files/neg/hk-typevar-unification.scala b/test/files/neg/hk-typevar-unification.scala index 9b44e40b1062..2cd9c93b2b43 100644 --- a/test/files/neg/hk-typevar-unification.scala +++ b/test/files/neg/hk-typevar-unification.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 // class A class B diff --git a/test/files/neg/i15552.scala b/test/files/neg/i15552.scala index e9363222d038..95f608efcb52 100644 --- a/test/files/neg/i15552.scala +++ b/test/files/neg/i15552.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror class C { val ctx: C = new C() def f() = g(42)(using ctx) // error: no g diff --git a/test/files/neg/i17266.scala b/test/files/neg/i17266.scala index 78566ef26ef2..411fa262c73a 100644 --- a/test/files/neg/i17266.scala +++ b/test/files/neg/i17266.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xsource:3 -Xlint:universal-methods +//> using options -Werror -Xsource:3 -Xlint:universal-methods // Dotty has top-level defs, so the reference is linted based on context. // For Scala 2, check result of looking up the identifier. diff --git a/test/files/neg/i17266c.scala b/test/files/neg/i17266c.scala index 3cff3e34b30a..1858c3427711 100644 --- a/test/files/neg/i17266c.scala +++ b/test/files/neg/i17266c.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:universal-methods +//> using options -Werror -Xlint:universal-methods object X diff --git a/test/files/neg/implicit-ambiguous-invalid.scala b/test/files/neg/implicit-ambiguous-invalid.scala index 465cd9163d98..ca6003e34496 100644 --- a/test/files/neg/implicit-ambiguous-invalid.scala +++ b/test/files/neg/implicit-ambiguous-invalid.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:implicit-not-found -Xfatal-warnings +//> using options -Xlint:implicit-not-found -Xfatal-warnings // object Test { trait =!=[C, D] diff --git a/test/files/neg/implicit-shadow.scala b/test/files/neg/implicit-shadow.scala index 33725ece13f1..dffa838221f4 100644 --- a/test/files/neg/implicit-shadow.scala +++ b/test/files/neg/implicit-shadow.scala @@ -1,4 +1,4 @@ -// scalac: -Vimplicits +//> using options -Vimplicits // object Test { import B._, C._ diff --git a/test/files/neg/implicitly-self.scala b/test/files/neg/implicitly-self.scala index 8515f1235d23..becd16ccb311 100644 --- a/test/files/neg/implicitly-self.scala +++ b/test/files/neg/implicitly-self.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:implicit-recursion +//> using options -Werror -Xlint:implicit-recursion // trait TC[A] { def ix: Int } diff --git a/test/files/neg/import-future.scala b/test/files/neg/import-future.scala index 288fd3d0e240..bc4d23165b76 100644 --- a/test/files/neg/import-future.scala +++ b/test/files/neg/import-future.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // class D { diff --git a/test/files/neg/import-syntax.scala b/test/files/neg/import-syntax.scala index 0e3deb00cce0..00caf0aecd7b 100644 --- a/test/files/neg/import-syntax.scala +++ b/test/files/neg/import-syntax.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 class D { def *(y: Int): Int = y diff --git a/test/files/neg/infixed.scala b/test/files/neg/infixed.scala index 01a6cd950978..1b8422e1792d 100644 --- a/test/files/neg/infixed.scala +++ b/test/files/neg/infixed.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 class K { def x(y: Int) = 0 } diff --git a/test/files/neg/inlineIndyLambdaPrivate/Test_2.scala b/test/files/neg/inlineIndyLambdaPrivate/Test_2.scala index 71d75a45e47a..87648689f116 100644 --- a/test/files/neg/inlineIndyLambdaPrivate/Test_2.scala +++ b/test/files/neg/inlineIndyLambdaPrivate/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Yopt-inline-heuristics:everything -Wopt:_ -Werror +//> using options -opt:inline:** -Yopt-inline-heuristics:everything -Wopt:_ -Werror class Test { def foo = A_1.test } diff --git a/test/files/neg/iterable-ordering.scala b/test/files/neg/iterable-ordering.scala index 9ef34b1cdb75..ae25b1dd4522 100644 --- a/test/files/neg/iterable-ordering.scala +++ b/test/files/neg/iterable-ordering.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation -Werror +//> using options -Xlint:deprecation -Werror object Test { val o = Ordering[Iterable[Int]] } diff --git a/test/files/neg/lint-int-div-to-float.scala b/test/files/neg/lint-int-div-to-float.scala index 4f66c481384e..927c82853f90 100644 --- a/test/files/neg/lint-int-div-to-float.scala +++ b/test/files/neg/lint-int-div-to-float.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Xfatal-warnings +//> using options -Xlint -Xfatal-warnings class C { def f = 1 diff --git a/test/files/neg/literals.scala b/test/files/neg/literals.scala index 9557d26bdc51..f7e9e3d2bf42 100644 --- a/test/files/neg/literals.scala +++ b/test/files/neg/literals.scala @@ -1,4 +1,4 @@ -// scalac: -Woctal-literal -Werror -deprecation +//> using options -Woctal-literal -Werror -deprecation trait RejectedLiterals { def missingHex: Int = { 0x } // line 4: was: not reported, taken as zero diff --git a/test/files/neg/locally-x.scala b/test/files/neg/locally-x.scala index 4a6c7560058d..58435659b2df 100644 --- a/test/files/neg/locally-x.scala +++ b/test/files/neg/locally-x.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:deprecation +//> using options -Werror -Xlint:deprecation // // an innocent gotcha // diff --git a/test/files/neg/logImplicits.scala b/test/files/neg/logImplicits.scala index 2d94fcbd3b6e..72df36b90a17 100644 --- a/test/files/neg/logImplicits.scala +++ b/test/files/neg/logImplicits.scala @@ -1,4 +1,4 @@ -// scalac: -Xlog-implicit-conversions +//> using options -Xlog-implicit-conversions // class A { def f(xs: Array[Byte]) = xs.size diff --git a/test/files/neg/macro-annot-not-expanded/Macros_1.scala b/test/files/neg/macro-annot-not-expanded/Macros_1.scala index fdb63874cdd7..08c24880d5ad 100644 --- a/test/files/neg/macro-annot-not-expanded/Macros_1.scala +++ b/test/files/neg/macro-annot-not-expanded/Macros_1.scala @@ -1,4 +1,4 @@ -// scalac: -Ymacro-annotations +//> using options -Ymacro-annotations import scala.language.experimental.macros import scala.reflect.macros.blackbox import scala.annotation.StaticAnnotation diff --git a/test/files/neg/macro-annot-unused-param/Macros_1.scala b/test/files/neg/macro-annot-unused-param/Macros_1.scala index 17d602216c23..3ab8d0bc820c 100644 --- a/test/files/neg/macro-annot-unused-param/Macros_1.scala +++ b/test/files/neg/macro-annot-unused-param/Macros_1.scala @@ -1,4 +1,4 @@ -// scalac: -Ymacro-annotations +//> using options -Ymacro-annotations import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context import scala.annotation.StaticAnnotation diff --git a/test/files/neg/macro-annot-unused-param/Test_2.scala b/test/files/neg/macro-annot-unused-param/Test_2.scala index 6ac2d3f50eeb..f43e1122a8a0 100644 --- a/test/files/neg/macro-annot-unused-param/Test_2.scala +++ b/test/files/neg/macro-annot-unused-param/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Ymacro-annotations -Wunused:params -Wmacros:after -Werror +//> using options -Ymacro-annotations -Wunused:params -Wmacros:after -Werror @mymacro class X diff --git a/test/files/neg/macro-deprecate-idents.scala b/test/files/neg/macro-deprecate-idents.scala index 7c0e9e762a13..be21c06893db 100644 --- a/test/files/neg/macro-deprecate-idents.scala +++ b/test/files/neg/macro-deprecate-idents.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // object Test1 { val macro = ??? diff --git a/test/files/neg/macro-incompatible-macro-engine-a/Macros_2.scala b/test/files/neg/macro-incompatible-macro-engine-a/Macros_2.scala index 5b24ff5c7b11..c3e2b9255ab0 100644 --- a/test/files/neg/macro-incompatible-macro-engine-a/Macros_2.scala +++ b/test/files/neg/macro-incompatible-macro-engine-a/Macros_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. +//> using options -Xplugin:. import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context diff --git a/test/files/neg/macro-incompatible-macro-engine-b/Macros_2.scala b/test/files/neg/macro-incompatible-macro-engine-b/Macros_2.scala index 5b24ff5c7b11..c3e2b9255ab0 100644 --- a/test/files/neg/macro-incompatible-macro-engine-b/Macros_2.scala +++ b/test/files/neg/macro-incompatible-macro-engine-b/Macros_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. +//> using options -Xplugin:. import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context diff --git a/test/files/neg/macro-incompatible-macro-engine-b/Test_3.scala b/test/files/neg/macro-incompatible-macro-engine-b/Test_3.scala index c1ff232f98b8..e9f7953e3881 100644 --- a/test/files/neg/macro-incompatible-macro-engine-b/Test_3.scala +++ b/test/files/neg/macro-incompatible-macro-engine-b/Test_3.scala @@ -1,4 +1,4 @@ -// scalac: -Vmacro-lite +//> using options -Vmacro-lite object Test extends App { Macros.foo Macros.foo diff --git a/test/files/neg/macro-invalidret/Macros_Test_2.scala b/test/files/neg/macro-invalidret/Macros_Test_2.scala index c1851acc0206..102d112fb58c 100644 --- a/test/files/neg/macro-invalidret/Macros_Test_2.scala +++ b/test/files/neg/macro-invalidret/Macros_Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation -Werror +//> using options -Xlint:deprecation -Werror import language.experimental.macros object Macros { diff --git a/test/files/neg/main1.scala b/test/files/neg/main1.scala index 295920808350..a07b51e0d03b 100644 --- a/test/files/neg/main1.scala +++ b/test/files/neg/main1.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // // negatives package foo1 { diff --git a/test/files/neg/main2.scala b/test/files/neg/main2.scala index 3ec0c607ef65..2b3bb7a0a12f 100644 --- a/test/files/neg/main2.scala +++ b/test/files/neg/main2.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xmain-class p.X +//> using options -Xfatal-warnings -Xmain-class p.X // // emit a warning diff --git a/test/files/neg/maxerrs.scala b/test/files/neg/maxerrs.scala index ad24a1cac4ba..f72577f5a319 100644 --- a/test/files/neg/maxerrs.scala +++ b/test/files/neg/maxerrs.scala @@ -1,4 +1,4 @@ -// scalac: -Xmaxerrs 3 -Xfatal-warnings -deprecation +//> using options -Xmaxerrs 3 -Xfatal-warnings -deprecation // object X { diff --git a/test/files/neg/maxwarns.scala b/test/files/neg/maxwarns.scala index 8b8d21329a03..a5523a9af8d4 100644 --- a/test/files/neg/maxwarns.scala +++ b/test/files/neg/maxwarns.scala @@ -1,4 +1,4 @@ -// scalac: -Xmaxwarns 3 -Xfatal-warnings -deprecation +//> using options -Xmaxwarns 3 -Xfatal-warnings -deprecation // object X { diff --git a/test/files/neg/multi-array.scala b/test/files/neg/multi-array.scala index ce50a0f4a1c3..82fb938d511d 100644 --- a/test/files/neg/multi-array.scala +++ b/test/files/neg/multi-array.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // /** Multi-dimensional array creation with `new` was removed in 2.10. * The replacement Array.ofDim[Int](10,10) makes the original mistake diff --git a/test/files/neg/names-defaults-neg-213.scala b/test/files/neg/names-defaults-neg-213.scala index d40d6b9071bf..8e5c212f1d61 100644 --- a/test/files/neg/names-defaults-neg-213.scala +++ b/test/files/neg/names-defaults-neg-213.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 // class C { def f1(x: Unit): Int = 0 diff --git a/test/files/neg/names-defaults-neg-pu.scala b/test/files/neg/names-defaults-neg-pu.scala index e381e1119e11..1656b8b40691 100644 --- a/test/files/neg/names-defaults-neg-pu.scala +++ b/test/files/neg/names-defaults-neg-pu.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // object Test extends App { // TESTS diff --git a/test/files/neg/names-defaults-neg-warn.scala b/test/files/neg/names-defaults-neg-warn.scala index 3ecd909eaa2f..611ef6d65916 100644 --- a/test/files/neg/names-defaults-neg-warn.scala +++ b/test/files/neg/names-defaults-neg-warn.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // object Test extends App { object deprNam2 { diff --git a/test/files/neg/names-defaults-neg.scala b/test/files/neg/names-defaults-neg.scala index c738aaa7de0d..fe76f5e41e8e 100644 --- a/test/files/neg/names-defaults-neg.scala +++ b/test/files/neg/names-defaults-neg.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // object Test extends App { // TESTS diff --git a/test/files/neg/nested-class-shadowing-removal.scala b/test/files/neg/nested-class-shadowing-removal.scala index 7b84845dfc1f..a691d3aed9da 100644 --- a/test/files/neg/nested-class-shadowing-removal.scala +++ b/test/files/neg/nested-class-shadowing-removal.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // trait Core { diff --git a/test/files/neg/nested-class-shadowing.scala b/test/files/neg/nested-class-shadowing.scala index d9ac447a4079..c50d695503b9 100644 --- a/test/files/neg/nested-class-shadowing.scala +++ b/test/files/neg/nested-class-shadowing.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:deprecation +//> using options -Werror -Xlint:deprecation // trait Core { diff --git a/test/files/neg/newpat_unreachable.scala b/test/files/neg/newpat_unreachable.scala index ccaf5ab5a825..8d6b0221675f 100644 --- a/test/files/neg/newpat_unreachable.scala +++ b/test/files/neg/newpat_unreachable.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { class A { diff --git a/test/files/neg/no-predef.scala b/test/files/neg/no-predef.scala index c4a1a120bad3..64f55028d46a 100644 --- a/test/files/neg/no-predef.scala +++ b/test/files/neg/no-predef.scala @@ -1,4 +1,4 @@ -// scalac: -Yno-predef +//> using options -Yno-predef // class NoPredef { def f1 = 5L: java.lang.Long diff --git a/test/files/neg/nonlocal-warning.scala b/test/files/neg/nonlocal-warning.scala index bfc731a65271..8fcf2e1c4709 100644 --- a/test/files/neg/nonlocal-warning.scala +++ b/test/files/neg/nonlocal-warning.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class Foo { def foo(l: List[Int]): Int = { diff --git a/test/files/neg/nonsense_eq_refine.scala b/test/files/neg/nonsense_eq_refine.scala index c14776e9c1fa..952003f8175e 100644 --- a/test/files/neg/nonsense_eq_refine.scala +++ b/test/files/neg/nonsense_eq_refine.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror class E class SE extends Serializable diff --git a/test/files/neg/nonunit-if.scala b/test/files/neg/nonunit-if.scala index 17aee82cc15c..8d79ef2a5fca 100644 --- a/test/files/neg/nonunit-if.scala +++ b/test/files/neg/nonunit-if.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wnonunit-statement -Wnonunit-if:true -Wvalue-discard +//> using options -Werror -Wnonunit-statement -Wnonunit-if:true -Wvalue-discard // debug: -Vprint:refchecks -Yprint-trees:format import collection.ArrayOps import collection.mutable.{ArrayBuilder, LinkedHashSet, ListBuffer} diff --git a/test/files/neg/nonunit-statement.scala b/test/files/neg/nonunit-statement.scala index 192091dbd034..40d1cc8357cf 100644 --- a/test/files/neg/nonunit-statement.scala +++ b/test/files/neg/nonunit-statement.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wnonunit-statement -Wnonunit-if:false -Wvalue-discard +//> using options -Werror -Wnonunit-statement -Wnonunit-if:false -Wvalue-discard // debug: -Vprint:refchecks -Yprint-trees:format import collection.ArrayOps import collection.mutable.{ArrayBuilder, LinkedHashSet, ListBuffer} diff --git a/test/files/neg/nowarnMacros/Test_2.scala b/test/files/neg/nowarnMacros/Test_2.scala index c9d76a54a393..207e4fa019bf 100644 --- a/test/files/neg/nowarnMacros/Test_2.scala +++ b/test/files/neg/nowarnMacros/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror import language.experimental.macros import scala.annotation.nowarn diff --git a/test/files/neg/nowarnPointPos.scala b/test/files/neg/nowarnPointPos.scala index 0551d7aae378..770867388ddd 100644 --- a/test/files/neg/nowarnPointPos.scala +++ b/test/files/neg/nowarnPointPos.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Wunused:nowarn -Yrangepos:false -Werror +//> using options -deprecation -Wunused:nowarn -Yrangepos:false -Werror import scala.annotation._ class ann(a: Any) extends Annotation diff --git a/test/files/neg/nowarnRangePos.scala b/test/files/neg/nowarnRangePos.scala index 67c7975881d8..2f98fc8b8f0d 100644 --- a/test/files/neg/nowarnRangePos.scala +++ b/test/files/neg/nowarnRangePos.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Wunused:nowarn -Yrangepos:true -Werror +//> using options -deprecation -Wunused:nowarn -Yrangepos:true -Werror import scala.annotation._ class ann(a: Any) extends Annotation diff --git a/test/files/neg/nullary-override-3a.scala b/test/files/neg/nullary-override-3a.scala index dbf30d034727..da03b78585e6 100644 --- a/test/files/neg/nullary-override-3a.scala +++ b/test/files/neg/nullary-override-3a.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:nowarn -Xsource:3 +//> using options -Werror -Wunused:nowarn -Xsource:3 // class A { def x: Int = 3 } class B extends A { override def x(): Int = 4 } diff --git a/test/files/neg/nullary-override-3b.scala b/test/files/neg/nullary-override-3b.scala index 265f9755b219..bf46b885dda3 100644 --- a/test/files/neg/nullary-override-3b.scala +++ b/test/files/neg/nullary-override-3b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:nowarn -Xsource:3 +//> using options -Werror -Wunused:nowarn -Xsource:3 // // P has parens class P { def x(): Int = 3 } diff --git a/test/files/neg/nullary-override.scala b/test/files/neg/nullary-override.scala index 18b713b94f64..4d3884deed94 100644 --- a/test/files/neg/nullary-override.scala +++ b/test/files/neg/nullary-override.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:nowarn +//> using options -Werror -Wunused:nowarn // class A { def x: Int = 3 } class B extends A { override def x(): Int = 4 } diff --git a/test/files/neg/numeric-add-string-warning.scala b/test/files/neg/numeric-add-string-warning.scala index b9baf5c109fb..07cae7735a80 100644 --- a/test/files/neg/numeric-add-string-warning.scala +++ b/test/files/neg/numeric-add-string-warning.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -deprecation +//> using options -Xfatal-warnings -deprecation // object Test { val x = 4 + "2" diff --git a/test/files/neg/open-infix-future.scala b/test/files/neg/open-infix-future.scala index 2a250f3b006e..f667d7961f21 100644 --- a/test/files/neg/open-infix-future.scala +++ b/test/files/neg/open-infix-future.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // open trait A // error diff --git a/test/files/neg/outer-ref-checks.scala b/test/files/neg/outer-ref-checks.scala index c0e5d9e66b77..7e9996dac780 100644 --- a/test/files/neg/outer-ref-checks.scala +++ b/test/files/neg/outer-ref-checks.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // import scala.annotation.unchecked.uncheckedVariance diff --git a/test/files/neg/overloaded-implicit.scala b/test/files/neg/overloaded-implicit.scala index 43000ff824ff..05b13be5b745 100644 --- a/test/files/neg/overloaded-implicit.scala +++ b/test/files/neg/overloaded-implicit.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:poly-implicit-overload -Xfatal-warnings -Xdev +//> using options -Xlint:poly-implicit-overload -Xfatal-warnings -Xdev // object Test { implicit def imp1[T](x: List[T]): Map[T, T] = Map() diff --git a/test/files/neg/parens-for-params.scala b/test/files/neg/parens-for-params.scala index 4f73f5df01b0..b774c8d8cac6 100644 --- a/test/files/neg/parens-for-params.scala +++ b/test/files/neg/parens-for-params.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 class C { def f = { diff --git a/test/files/neg/partestInvalidFlag.scala b/test/files/neg/partestInvalidFlag.scala index b6315e63d5f6..b64913fa6e76 100644 --- a/test/files/neg/partestInvalidFlag.scala +++ b/test/files/neg/partestInvalidFlag.scala @@ -1,3 +1,3 @@ -// scalac: -badCompilerFlag notAFlag -opt:badChoice +//> using options -badCompilerFlag notAFlag -opt:badChoice // class C diff --git a/test/files/neg/pat_unreachable.scala b/test/files/neg/pat_unreachable.scala index cd5acfd093cb..ae73d384eec4 100644 --- a/test/files/neg/pat_unreachable.scala +++ b/test/files/neg/pat_unreachable.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test extends App { diff --git a/test/files/neg/patmat-classtag-compound.scala b/test/files/neg/patmat-classtag-compound.scala index 412123d78922..8867974a9ce1 100644 --- a/test/files/neg/patmat-classtag-compound.scala +++ b/test/files/neg/patmat-classtag-compound.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test extends App{ trait Bar diff --git a/test/files/neg/patmat-exprs-b.scala b/test/files/neg/patmat-exprs-b.scala index 17b2ed63473b..ac35e9c8bdc2 100644 --- a/test/files/neg/patmat-exprs-b.scala +++ b/test/files/neg/patmat-exprs-b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint // import annotation.nowarn diff --git a/test/files/neg/patmat-sealed-reachable.scala b/test/files/neg/patmat-sealed-reachable.scala index 3242daabc6a0..e315db9743b7 100644 --- a/test/files/neg/patmat-sealed-reachable.scala +++ b/test/files/neg/patmat-sealed-reachable.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // aka t12438.scala diff --git a/test/files/neg/patmatexhaust.scala b/test/files/neg/patmatexhaust.scala index 9e061be8af9c..e44c26d70edc 100644 --- a/test/files/neg/patmatexhaust.scala +++ b/test/files/neg/patmatexhaust.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Ypatmat-exhaust-depth off +//> using options -Xfatal-warnings -Ypatmat-exhaust-depth off // class TestSealedExhaustive { // compile only sealed abstract class Foo diff --git a/test/files/neg/permanent-blindness.scala b/test/files/neg/permanent-blindness.scala index 975290508c0e..88fd07ada448 100644 --- a/test/files/neg/permanent-blindness.scala +++ b/test/files/neg/permanent-blindness.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // package foo { class Bippy diff --git a/test/files/neg/prefix-unary-nilary-deprecation.scala b/test/files/neg/prefix-unary-nilary-deprecation.scala index 3060cda77f97..1a41640d48c4 100644 --- a/test/files/neg/prefix-unary-nilary-deprecation.scala +++ b/test/files/neg/prefix-unary-nilary-deprecation.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:deprecation +//> using options -Werror -Xlint:deprecation // class Foo { def unary_~() : Foo = this diff --git a/test/files/neg/prefix-unary-nilary-removal.scala b/test/files/neg/prefix-unary-nilary-removal.scala index cd8ec6986850..0169fa2517c8 100644 --- a/test/files/neg/prefix-unary-nilary-removal.scala +++ b/test/files/neg/prefix-unary-nilary-removal.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint // class Foo { def unary_~() : Foo = this diff --git a/test/files/neg/procedure-deprecation.scala b/test/files/neg/procedure-deprecation.scala index 1e3cd199cb4f..9ae5ed4d566c 100644 --- a/test/files/neg/procedure-deprecation.scala +++ b/test/files/neg/procedure-deprecation.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:deprecation +//> using options -Werror -Xlint:deprecation // abstract class Foo { def bar {} diff --git a/test/files/neg/procedure-removal.scala b/test/files/neg/procedure-removal.scala index 9177d191fa7b..e7ae67e4ae71 100644 --- a/test/files/neg/procedure-removal.scala +++ b/test/files/neg/procedure-removal.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint // abstract class Foo { def bar {} diff --git a/test/files/neg/qmark-deprecated.scala b/test/files/neg/qmark-deprecated.scala index f37edc58ea43..decba5fe92d0 100644 --- a/test/files/neg/qmark-deprecated.scala +++ b/test/files/neg/qmark-deprecated.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // class Foo[?] // error diff --git a/test/files/neg/quickfix-silent.scala b/test/files/neg/quickfix-silent.scala index 99bdc0e50a29..856eaa8cea96 100644 --- a/test/files/neg/quickfix-silent.scala +++ b/test/files/neg/quickfix-silent.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Werror -quickfix:silent +//> using options -deprecation -Werror -quickfix:silent class C { def f { println } diff --git a/test/files/neg/recursive-method-default.scala b/test/files/neg/recursive-method-default.scala index b2972e6c8b5b..2187f4d1afa5 100644 --- a/test/files/neg/recursive-method-default.scala +++ b/test/files/neg/recursive-method-default.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:recurse-with-default +//> using options -Werror -Xlint:recurse-with-default object Test { def rec1(a: Any, b: Any = "".reverse): Any = { rec1(0, 0) // okay diff --git a/test/files/neg/ref-checks.scala b/test/files/neg/ref-checks.scala index e68f25938810..42bab64d346d 100644 --- a/test/files/neg/ref-checks.scala +++ b/test/files/neg/ref-checks.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Werror +//> using options -deprecation -Werror import scala.annotation.{StaticAnnotation, nowarn} import scala.reflect.internal.annotations.uncheckedBounds diff --git a/test/files/neg/scala3-keywords.scala b/test/files/neg/scala3-keywords.scala index 23fbce36dc4c..6c37baaa5515 100644 --- a/test/files/neg/scala3-keywords.scala +++ b/test/files/neg/scala3-keywords.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // class A { val `enum`: Int = 1 diff --git a/test/files/neg/sd503.scala b/test/files/neg/sd503.scala index dd7fbdaf28a4..7c89cb5a52ae 100644 --- a/test/files/neg/sd503.scala +++ b/test/files/neg/sd503.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:multiarg-infix +//> using options -Xlint:multiarg-infix // // lint multiarg infix syntax, e.g., vs += (1, 2, 3) // Since infix is encouraged by symbolic operator names, discourage defining def += (x: A, y: A, zs: A*) diff --git a/test/files/neg/sealed-final-neg.scala b/test/files/neg/sealed-final-neg.scala index 25ad1ed8b55c..1698f46712cc 100644 --- a/test/files/neg/sealed-final-neg.scala +++ b/test/files/neg/sealed-final-neg.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -opt:inline:** -Wopt +//> using options -Werror -opt:inline:** -Wopt // package neg1 { sealed abstract class Foo { diff --git a/test/files/neg/sealed-java-enums.scala b/test/files/neg/sealed-java-enums.scala index f22b8c44818b..7aead780d91c 100644 --- a/test/files/neg/sealed-java-enums.scala +++ b/test/files/neg/sealed-java-enums.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // import java.lang.Thread.State import java.lang.Thread.State._ diff --git a/test/files/neg/sip23-uninitialized-1.scala b/test/files/neg/sip23-uninitialized-1.scala index d6e3df1602fc..89804aafafc3 100644 --- a/test/files/neg/sip23-uninitialized-1.scala +++ b/test/files/neg/sip23-uninitialized-1.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { val f1: 1 = f1 // warning: recursive diff --git a/test/files/neg/sip23-uninitialized-3.scala b/test/files/neg/sip23-uninitialized-3.scala index 9cae9cdf1b57..bf7b7723aa13 100644 --- a/test/files/neg/sip23-uninitialized-3.scala +++ b/test/files/neg/sip23-uninitialized-3.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { var f3: 1 = f3 // warning: recursive diff --git a/test/files/neg/stmt-expr-discard.scala b/test/files/neg/stmt-expr-discard.scala index 35c014f6b4ca..a5c9f62627aa 100644 --- a/test/files/neg/stmt-expr-discard.scala +++ b/test/files/neg/stmt-expr-discard.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xsource:2.13 -Xlint:deprecation +//> using options -Werror -Xsource:2.13 -Xlint:deprecation // class A { def f = 1 diff --git a/test/files/neg/switch.scala b/test/files/neg/switch.scala index 9d0defc0b5f4..428d80cce261 100644 --- a/test/files/neg/switch.scala +++ b/test/files/neg/switch.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // import scala.annotation.switch diff --git a/test/files/neg/symbol-literal-deprecation.scala b/test/files/neg/symbol-literal-deprecation.scala index 4ab45cf7ce1b..296d18c377db 100644 --- a/test/files/neg/symbol-literal-deprecation.scala +++ b/test/files/neg/symbol-literal-deprecation.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // abstract class Foo { val foo = 'TestSymbol diff --git a/test/files/neg/t0903.scala b/test/files/neg/t0903.scala index 9b69dcf3cf09..7b178d758111 100644 --- a/test/files/neg/t0903.scala +++ b/test/files/neg/t0903.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // object Test { val x = 1 diff --git a/test/files/neg/t10019.scala b/test/files/neg/t10019.scala index 9d9aac4e7ff3..8c4c910a588f 100644 --- a/test/files/neg/t10019.scala +++ b/test/files/neg/t10019.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Bug { sealed case class Foo(e: Option[Int]) diff --git a/test/files/neg/t10068.scala b/test/files/neg/t10068.scala index 30a1e8d25f3f..1128b68d710b 100644 --- a/test/files/neg/t10068.scala +++ b/test/files/neg/t10068.scala @@ -1,4 +1,4 @@ -// scalac: -Xelide-below WARNING -Xsource:2.13 +//> using options -Xelide-below WARNING -Xsource:2.13 // import annotation._, elidable._ diff --git a/test/files/neg/t10097.scala b/test/files/neg/t10097.scala index c12d6891c9f6..592ea5459400 100644 --- a/test/files/neg/t10097.scala +++ b/test/files/neg/t10097.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 // case class C(implicit val c: Int) diff --git a/test/files/neg/t10097b.scala b/test/files/neg/t10097b.scala index 34836b52c643..d52e9be1226d 100644 --- a/test/files/neg/t10097b.scala +++ b/test/files/neg/t10097b.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // case class C(implicit val c: Int) diff --git a/test/files/neg/t10270/Main_2.scala b/test/files/neg/t10270/Main_2.scala index 34bc9849c342..e15240dd05d3 100644 --- a/test/files/neg/t10270/Main_2.scala +++ b/test/files/neg/t10270/Main_2.scala @@ -1,4 +1,4 @@ -// scalac: -Wunused:imports -Werror +//> using options -Wunused:imports -Werror object Main extends App { def f(): Any = Macro { diff --git a/test/files/neg/t10296-after/Unused_2.scala b/test/files/neg/t10296-after/Unused_2.scala index 95e6234f0507..93c110c35cbb 100644 --- a/test/files/neg/t10296-after/Unused_2.scala +++ b/test/files/neg/t10296-after/Unused_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:unused -Wmacros:after +//> using options -Werror -Xlint:unused -Wmacros:after import scala.language.experimental.macros object Unused extends App { diff --git a/test/files/neg/t10296-warn/Unused_2.scala b/test/files/neg/t10296-warn/Unused_2.scala index e3f8ca93256e..a0fbd1ff5ce2 100644 --- a/test/files/neg/t10296-warn/Unused_2.scala +++ b/test/files/neg/t10296-warn/Unused_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:unused +//> using options -Werror -Xlint:unused import scala.language.experimental.macros object Unused { diff --git a/test/files/neg/t10502.scala b/test/files/neg/t10502.scala index 979b8c878f04..c428adaea897 100644 --- a/test/files/neg/t10502.scala +++ b/test/files/neg/t10502.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:strict-unsealed-patmat +//> using options -Werror -Xlint:strict-unsealed-patmat object Bug { object Perhaps { def unapply[A](oa: Option[A]): Some[Option[A]] = Some(oa) diff --git a/test/files/neg/t10678.scala b/test/files/neg/t10678.scala index 7f40125cfc26..62bb3025ef06 100644 --- a/test/files/neg/t10678.scala +++ b/test/files/neg/t10678.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // trait T diff --git a/test/files/neg/t10733.scala b/test/files/neg/t10733.scala index 98b4864f7e18..01d779d1a706 100644 --- a/test/files/neg/t10733.scala +++ b/test/files/neg/t10733.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos -Ystop-after:parser +//> using options -Yrangepos -Ystop-after:parser trait T[_] trait U[_, _] diff --git a/test/files/neg/t10752/Test_2.scala b/test/files/neg/t10752/Test_2.scala index 5f76ec601f72..18b74b3cb815 100644 --- a/test/files/neg/t10752/Test_2.scala +++ b/test/files/neg/t10752/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation -Werror +//> using options -Xlint:deprecation -Werror object Test extends p1.DeprecatedClass { def useC = p1.DeprecatedClass.foo def useM = p1.DeprecatedMethod.foo diff --git a/test/files/neg/t10763.scala b/test/files/neg/t10763.scala index c5e008582361..edf22e4e3c9f 100644 --- a/test/files/neg/t10763.scala +++ b/test/files/neg/t10763.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused +//> using options -Werror -Wunused object Test extends App { // cf test/files/pos/t10763.scala test/files/run/t11938.scala diff --git a/test/files/neg/t10790.scala b/test/files/neg/t10790.scala index cc199c7b2078..5864767fa150 100644 --- a/test/files/neg/t10790.scala +++ b/test/files/neg/t10790.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused +//> using options -Werror -Wunused import annotation.unused diff --git a/test/files/neg/t10806.scala b/test/files/neg/t10806.scala index 10abc6d46a32..54d4f9d53992 100644 --- a/test/files/neg/t10806.scala +++ b/test/files/neg/t10806.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror trait T { diff --git a/test/files/neg/t10820-warn.scala b/test/files/neg/t10820-warn.scala index 97796aaa90d1..57fc9bc984e1 100644 --- a/test/files/neg/t10820-warn.scala +++ b/test/files/neg/t10820-warn.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wperformance +//> using options -Werror -Wperformance // import util.Try diff --git a/test/files/neg/t10938.scala b/test/files/neg/t10938.scala index 757230ed6082..b880272378bc 100644 --- a/test/files/neg/t10938.scala +++ b/test/files/neg/t10938.scala @@ -1,4 +1,4 @@ -// scalac: -feature +//> using options -feature trait T { def f(): scala.xxx.XXX[_, _] = ??? diff --git a/test/files/neg/t11012.scala b/test/files/neg/t11012.scala index 9ac9d1d562a0..4f109c126324 100644 --- a/test/files/neg/t11012.scala +++ b/test/files/neg/t11012.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -deprecation +//> using options -Xfatal-warnings -deprecation import scala.annotation.StaticAnnotation @deprecated("class!", "") class A extends StaticAnnotation diff --git a/test/files/neg/t11379a.scala b/test/files/neg/t11379a.scala index 3502d5cf0e89..5ed2de4b315c 100644 --- a/test/files/neg/t11379a.scala +++ b/test/files/neg/t11379a.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wvalue-discard +//> using options -Werror -Wvalue-discard object UnitOfTrust { import scala.util._ diff --git a/test/files/neg/t11379b.scala b/test/files/neg/t11379b.scala index afd5233d3c04..0e00bcf3271b 100644 --- a/test/files/neg/t11379b.scala +++ b/test/files/neg/t11379b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wvalue-discard +//> using options -Werror -Wvalue-discard class OneTypeParam[B](value: B) { def map[B1](fn: B => B1): OneTypeParam[B1] = new OneTypeParam(fn(value)) def unitValue: OneTypeParam[Unit] = new OneTypeParam(()) diff --git a/test/files/neg/t11379c.scala b/test/files/neg/t11379c.scala index 0a4f5e4925bd..c1f21547d43d 100644 --- a/test/files/neg/t11379c.scala +++ b/test/files/neg/t11379c.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wvalue-discard +//> using options -Werror -Wvalue-discard class OneTypeParam[B](value: B) { def map[B1](fn: B => B1): OneTypeParam[B1] = new OneTypeParam(fn(value)) diff --git a/test/files/neg/t11618.scala b/test/files/neg/t11618.scala index 49dbfb5bc9b7..cef5b3a36c48 100644 --- a/test/files/neg/t11618.scala +++ b/test/files/neg/t11618.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:deprecation +//> using options -Werror -Xlint:deprecation // warn about introducing Unit-valued fields instead of merely side-effecting. // warn about implicit not introducing any implicits diff --git a/test/files/neg/t11643.scala b/test/files/neg/t11643.scala index a0ec2358743c..8c5b4e0a30cb 100644 --- a/test/files/neg/t11643.scala +++ b/test/files/neg/t11643.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Wunused:params +//> using options -Werror -Wunused:params trait T { def f(implicit i: Int) = i diff --git a/test/files/neg/t11644a.scala b/test/files/neg/t11644a.scala index 3e9ef0dcb0bb..3f51e8cf667c 100644 --- a/test/files/neg/t11644a.scala +++ b/test/files/neg/t11644a.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // // eta-expansion to SAM type always warns in Scala 3 world diff --git a/test/files/neg/t11644b.scala b/test/files/neg/t11644b.scala index 299667389a50..0722aa7ab322 100644 --- a/test/files/neg/t11644b.scala +++ b/test/files/neg/t11644b.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation,eta-zero,eta-sam +//> using options -Xlint:deprecation,eta-zero,eta-sam trait AcciSamZero { def apply(): Int } diff --git a/test/files/neg/t11644c/s.scala b/test/files/neg/t11644c/s.scala index 185ba67ad221..06085452737f 100644 --- a/test/files/neg/t11644c/s.scala +++ b/test/files/neg/t11644c/s.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 -Werror +//> using options -Xsource:3 -Werror class C { def f(j: J): Int = j.f(42) diff --git a/test/files/neg/t11681.scala b/test/files/neg/t11681.scala index 8cface30f25d..0254fa0884d0 100644 --- a/test/files/neg/t11681.scala +++ b/test/files/neg/t11681.scala @@ -1,5 +1,5 @@ // -// scalac: -Wunused:privates -Werror +//> using options -Wunused:privates -Werror // package com diff --git a/test/files/neg/t11690.scala b/test/files/neg/t11690.scala index 20e746cb026a..79f84c9ad1b7 100644 --- a/test/files/neg/t11690.scala +++ b/test/files/neg/t11690.scala @@ -1,5 +1,5 @@ -// scalac: -Wunused:imports -Werror +//> using options -Wunused:imports -Werror object X { val v = 27 diff --git a/test/files/neg/t11746.scala b/test/files/neg/t11746.scala index c6f81d994961..9a95f427873c 100644 --- a/test/files/neg/t11746.scala +++ b/test/files/neg/t11746.scala @@ -1,5 +1,5 @@ // -// scalac: -Werror -opt:inline:** -Wopt:none,_ +//> using options -Werror -opt:inline:** -Wopt:none,_ // // compare -opt-warnings:none,at-inline-failed-summary diff --git a/test/files/neg/t11758.scala b/test/files/neg/t11758.scala index c6109ff684fc..027d4ca2d868 100644 --- a/test/files/neg/t11758.scala +++ b/test/files/neg/t11758.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation -Wunused:imports -Werror +//> using options -Xlint:deprecation -Wunused:imports -Werror import language.higherKinds diff --git a/test/files/neg/t11921-alias.scala b/test/files/neg/t11921-alias.scala index fab5ae9badc2..2e4131633082 100644 --- a/test/files/neg/t11921-alias.scala +++ b/test/files/neg/t11921-alias.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xsource:3 +//> using options -Werror -Xsource:3 object t1 { class C[T] { type TT = T } diff --git a/test/files/neg/t11921.scala b/test/files/neg/t11921.scala index 91093f3e7443..fe3f4fa2bfe2 100644 --- a/test/files/neg/t11921.scala +++ b/test/files/neg/t11921.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 class C { def lazyMap[A, B](coll: Iterable[A], f: A => B) = diff --git a/test/files/neg/t11921b.scala b/test/files/neg/t11921b.scala index bf397ffcfadf..4097c7a21446 100644 --- a/test/files/neg/t11921b.scala +++ b/test/files/neg/t11921b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xsource:3 +//> using options -Werror -Xsource:3 object test1 { diff --git a/test/files/neg/t11921c.scala b/test/files/neg/t11921c.scala index 3b38fa6c9520..280cd3eabc42 100644 --- a/test/files/neg/t11921c.scala +++ b/test/files/neg/t11921c.scala @@ -1,4 +1,4 @@ -// scalac: -Wconf:msg=legacy-binding:s -Xsource:3 +//> using options -Wconf:msg=legacy-binding:s -Xsource:3 class C { def lazyMap[A, B](coll: Iterable[A], f: A => B) = diff --git a/test/files/neg/t11938.scala b/test/files/neg/t11938.scala index b0b2b2e8348d..7c8c5bedb746 100644 --- a/test/files/neg/t11938.scala +++ b/test/files/neg/t11938.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Werror +//> using options -Xlint -Werror class Test { val a: Nil.type = (Vector(): Any) match { case n @ Nil => n } // error diff --git a/test/files/neg/t11952.scala b/test/files/neg/t11952.scala index 8a7b54498464..c24f18689ef4 100644 --- a/test/files/neg/t11952.scala +++ b/test/files/neg/t11952.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint -Xmaxwarns 0 +//> using options -Werror -Xlint -Xmaxwarns 0 // // nowarn should mean no warnings are emitted, // irrespective of other flags, and also no diff --git a/test/files/neg/t11952b.scala b/test/files/neg/t11952b.scala index 573def21c87a..e3d68fe62970 100644 --- a/test/files/neg/t11952b.scala +++ b/test/files/neg/t11952b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint -Vdebug +//> using options -Werror -Xlint -Vdebug // // Multiple errors at a location are shown under debug. // diff --git a/test/files/neg/t11962.scala b/test/files/neg/t11962.scala index db9c340ce2e2..9dd109f3e3e0 100644 --- a/test/files/neg/t11962.scala +++ b/test/files/neg/t11962.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Werror -Ystop-after:refchecks +//> using options -Xlint -Werror -Ystop-after:refchecks trait T extends Any { def f = println() } diff --git a/test/files/neg/t12071.scala b/test/files/neg/t12071.scala index f3f9529c147b..9bc0e851ea39 100644 --- a/test/files/neg/t12071.scala +++ b/test/files/neg/t12071.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint -Xmigration:2.13 +//> using options -Werror -Xlint -Xmigration:2.13 class C { def `c c`(n: Int): Int = n + 1 diff --git a/test/files/neg/t12134/sample_2.scala b/test/files/neg/t12134/sample_2.scala index b1de02a551bc..5d3b9aadb960 100644 --- a/test/files/neg/t12134/sample_2.scala +++ b/test/files/neg/t12134/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Xplugin-require:unplugged -d testy.jar +//> using options -Xplugin:. -Xplugin-require:unplugged -d testy.jar package sample // The unplugged plugin pre-emptively creates a read-only testy.jar. diff --git a/test/files/neg/t1215.scala b/test/files/neg/t1215.scala index ab6a6d976dd6..9dbaacbfc1f3 100644 --- a/test/files/neg/t1215.scala +++ b/test/files/neg/t1215.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // object Test { val x = 1 += 1 diff --git a/test/files/neg/t12159c/s_2.scala b/test/files/neg/t12159c/s_2.scala index ec9c445cad42..728519d3193c 100644 --- a/test/files/neg/t12159c/s_2.scala +++ b/test/files/neg/t12159c/s_2.scala @@ -1,5 +1,5 @@ // javaVersion: 17+ -// scalac: -Werror +//> using options -Werror package p class C { diff --git a/test/files/neg/t12159d/t.scala b/test/files/neg/t12159d/t.scala index e57c9cd62ddc..6d26704cbea5 100644 --- a/test/files/neg/t12159d/t.scala +++ b/test/files/neg/t12159d/t.scala @@ -1,5 +1,5 @@ // javaVersion: 17+ -// scalac: -Werror +//> using options -Werror package p class C { diff --git a/test/files/neg/t12159e/t.scala b/test/files/neg/t12159e/t.scala index 1d5810a09f85..c01cc373ff38 100644 --- a/test/files/neg/t12159e/t.scala +++ b/test/files/neg/t12159e/t.scala @@ -1,5 +1,5 @@ // javaVersion: 17+ -// scalac: -Werror +//> using options -Werror package p class C { diff --git a/test/files/neg/t12159f/t.scala b/test/files/neg/t12159f/t.scala index 1d5810a09f85..c01cc373ff38 100644 --- a/test/files/neg/t12159f/t.scala +++ b/test/files/neg/t12159f/t.scala @@ -1,5 +1,5 @@ // javaVersion: 17+ -// scalac: -Werror +//> using options -Werror package p class C { diff --git a/test/files/neg/t12159g/t.scala b/test/files/neg/t12159g/t.scala index f92009287f1b..a1cbf521e0e1 100644 --- a/test/files/neg/t12159g/t.scala +++ b/test/files/neg/t12159g/t.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint package p class T { def n(a: X) = a match { case _: Y => 42 } diff --git a/test/files/neg/t12199.scala b/test/files/neg/t12199.scala index a9ceb3d07c41..822b86483688 100644 --- a/test/files/neg/t12199.scala +++ b/test/files/neg/t12199.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint class C { val a: IndexedSeq[Int] = Array(1, 2, 3) diff --git a/test/files/neg/t12237.scala b/test/files/neg/t12237.scala index 480634cf86f6..0a8b27675fb8 100644 --- a/test/files/neg/t12237.scala +++ b/test/files/neg/t12237.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror sealed trait PathAndQuery sealed trait Path extends PathAndQuery sealed trait Query extends PathAndQuery diff --git a/test/files/neg/t1224.scala b/test/files/neg/t1224.scala index 9e638b14b853..64b76a04b3a7 100644 --- a/test/files/neg/t1224.scala +++ b/test/files/neg/t1224.scala @@ -1,4 +1,4 @@ -// scalac: -Ybreak-cycles +//> using options -Ybreak-cycles // trait C[T] {} diff --git a/test/files/neg/t12240.scala b/test/files/neg/t12240.scala index c1a3b068c5f3..bebd05e8376a 100644 --- a/test/files/neg/t12240.scala +++ b/test/files/neg/t12240.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint:strict-unsealed-patmat +//> using options -Xfatal-warnings -Xlint:strict-unsealed-patmat // object Test { diff --git a/test/files/neg/t12304.scala b/test/files/neg/t12304.scala index 1f6c3e8b715e..0e40e8fa140f 100644 --- a/test/files/neg/t12304.scala +++ b/test/files/neg/t12304.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // variant of pos/t12304 // that does warn as desired diff --git a/test/files/neg/t12326.scala b/test/files/neg/t12326.scala index 233438250055..8515393c8f67 100644 --- a/test/files/neg/t12326.scala +++ b/test/files/neg/t12326.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:imports -Wconf:site=p.T:s +//> using options -Werror -Wunused:imports -Wconf:site=p.T:s package p diff --git a/test/files/neg/t12326b.scala b/test/files/neg/t12326b.scala index 6e261b0f257d..3b8054fd007b 100644 --- a/test/files/neg/t12326b.scala +++ b/test/files/neg/t12326b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:imports -Wconf:site=p.T:s,origin=scala.collection.mutable.Map:s,origin=scala.collection.mutable.Set:s +//> using options -Werror -Wunused:imports -Wconf:site=p.T:s,origin=scala.collection.mutable.Map:s,origin=scala.collection.mutable.Set:s package p diff --git a/test/files/neg/t12326c.scala b/test/files/neg/t12326c.scala index 22652417e0d1..37f8c86f1d60 100644 --- a/test/files/neg/t12326c.scala +++ b/test/files/neg/t12326c.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:imports -Wconf:origin=scala.collection.mutable.*:s +//> using options -Werror -Wunused:imports -Wconf:origin=scala.collection.mutable.*:s package p diff --git a/test/files/neg/t12408.scala b/test/files/neg/t12408.scala index ab5879ae5c6d..fc6ffa9899f3 100644 --- a/test/files/neg/t12408.scala +++ b/test/files/neg/t12408.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror package t12408 { class Renderer[A] diff --git a/test/files/neg/t12414.scala b/test/files/neg/t12414.scala index 649fbb23e5b4..187f701d6015 100644 --- a/test/files/neg/t12414.scala +++ b/test/files/neg/t12414.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror sealed trait Trait1 sealed trait Trait2 diff --git a/test/files/neg/t12414b/b_2.scala b/test/files/neg/t12414b/b_2.scala index 87f5694346eb..39f17177de45 100644 --- a/test/files/neg/t12414b/b_2.scala +++ b/test/files/neg/t12414b/b_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test extends App { def test(x: Trait1): Unit = diff --git a/test/files/neg/t12433.scala b/test/files/neg/t12433.scala index c1975ca848db..885b49ff3646 100644 --- a/test/files/neg/t12433.scala +++ b/test/files/neg/t12433.scala @@ -1,4 +1,4 @@ -// scalac: -Wunused:nowarn +//> using options -Wunused:nowarn import annotation.nowarn object T { @deprecated def f = 1 diff --git a/test/files/neg/t12441.scala b/test/files/neg/t12441.scala index 86b9eec048e4..73cb49f2b4ae 100644 --- a/test/files/neg/t12441.scala +++ b/test/files/neg/t12441.scala @@ -1,5 +1,5 @@ -// scalac: -Xlint -Werror +//> using options -Xlint -Werror trait T { def k(u: => Unit): Unit = u diff --git a/test/files/neg/t12494.scala b/test/files/neg/t12494.scala index 4d2f27e99b85..a54f436aba99 100644 --- a/test/files/neg/t12494.scala +++ b/test/files/neg/t12494.scala @@ -1,4 +1,4 @@ -// scalac: -Ylog:superaccessors -Ydebug +//> using options -Ylog:superaccessors -Ydebug object X { def m: Int = { trait C { diff --git a/test/files/neg/t12495.scala b/test/files/neg/t12495.scala index 5be5e3796c22..5d24b25a486f 100644 --- a/test/files/neg/t12495.scala +++ b/test/files/neg/t12495.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:arg-discard,adapted-args -Wvalue-discard +//> using options -Werror -Xlint:arg-discard,adapted-args -Wvalue-discard class C { val f = (u: Unit) => println(s"[$u]") def g = f(42, 27) diff --git a/test/files/neg/t12499.scala b/test/files/neg/t12499.scala index 91f397f12b24..be5e60cbe1d8 100644 --- a/test/files/neg/t12499.scala +++ b/test/files/neg/t12499.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Ystop-after:patmat -Ypatmat-exhaust-depth 30 +//> using options -Werror -Ystop-after:patmat -Ypatmat-exhaust-depth 30 sealed trait Phantom[A] {} object Phantom { diff --git a/test/files/neg/t12513/predefer_2.scala b/test/files/neg/t12513/predefer_2.scala index 6688ec5acbad..1872ff9d82fe 100644 --- a/test/files/neg/t12513/predefer_2.scala +++ b/test/files/neg/t12513/predefer_2.scala @@ -1,4 +1,4 @@ -// scalac: -Yimports:p.MyPredef,scala.Predef,scala +//> using options -Yimports:p.MyPredef,scala.Predef,scala package p { object Test extends App { diff --git a/test/files/neg/t12513b.scala b/test/files/neg/t12513b.scala index 51038b82a06d..c4dc17f02a7f 100644 --- a/test/files/neg/t12513b.scala +++ b/test/files/neg/t12513b.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xsource:3 +//> using options -Werror -Xsource:3 object X { type T = annotation.tailrec } object Y { type T = annotation.tailrec } diff --git a/test/files/neg/t12543.scala b/test/files/neg/t12543.scala index 3bb916938105..6d4cd1a540fa 100644 --- a/test/files/neg/t12543.scala +++ b/test/files/neg/t12543.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -release 8 +//> using options -Werror -release 8 import scala.jdk.CollectionConverters._ //import jdk.CollectionConverters._ // scala/bug/issues/12566 diff --git a/test/files/neg/t12565.scala b/test/files/neg/t12565.scala index 6336f90a4dd4..fdb1f023d4a1 100644 --- a/test/files/neg/t12565.scala +++ b/test/files/neg/t12565.scala @@ -1,4 +1,4 @@ -// scalac: -Werror --release 8 +//> using options -Werror --release 8 // javaVersion: 9+ class C { diff --git a/test/files/neg/t12590.scala b/test/files/neg/t12590.scala index 059391320087..2339f3411412 100644 --- a/test/files/neg/t12590.scala +++ b/test/files/neg/t12590.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:locals +//> using options -Werror -Wunused:locals class C { def unusedLocal = { val a = 27 diff --git a/test/files/neg/t12591.scala b/test/files/neg/t12591.scala index df6c1c8480af..c66259aa9393 100644 --- a/test/files/neg/t12591.scala +++ b/test/files/neg/t12591.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:synthetics +//> using options -Werror -Wunused:synthetics trait Context[A] { def m(a: A): A = a } // Context has a member, so warn if unused object Example { diff --git a/test/files/neg/t12647/Macro_1.scala b/test/files/neg/t12647/Macro_1.scala index 748657682eec..da6431cd2ae2 100644 --- a/test/files/neg/t12647/Macro_1.scala +++ b/test/files/neg/t12647/Macro_1.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 import scala.reflect.macros.blackbox.Context diff --git a/test/files/neg/t12647/Resolve_2.scala b/test/files/neg/t12647/Resolve_2.scala index dab65c6a310b..97cc4c354007 100644 --- a/test/files/neg/t12647/Resolve_2.scala +++ b/test/files/neg/t12647/Resolve_2.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 import language.experimental.macros diff --git a/test/files/neg/t12647/Test_3.scala b/test/files/neg/t12647/Test_3.scala index 152e5ddc4aa4..e2fc19f46853 100644 --- a/test/files/neg/t12647/Test_3.scala +++ b/test/files/neg/t12647/Test_3.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 object Test extends App { val resolver = new ValueResolver diff --git a/test/files/neg/t12648/LogConfig_2.scala b/test/files/neg/t12648/LogConfig_2.scala index 13d621ce0358..c8ff61d95df8 100644 --- a/test/files/neg/t12648/LogConfig_2.scala +++ b/test/files/neg/t12648/LogConfig_2.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xlint -Xsource:3 +//> using options -Werror -Xlint -Xsource:3 import annotation.* diff --git a/test/files/neg/t12690b.scala b/test/files/neg/t12690b.scala index 30b6ccab7604..95cace46d190 100644 --- a/test/files/neg/t12690b.scala +++ b/test/files/neg/t12690b.scala @@ -1,5 +1,5 @@ -// scalac: -Wunused:imports -Werror +//> using options -Wunused:imports -Werror object X { val v = 27 diff --git a/test/files/neg/t12704.scala b/test/files/neg/t12704.scala index db43b888d029..d481cc21635e 100644 --- a/test/files/neg/t12704.scala +++ b/test/files/neg/t12704.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror class Out { sealed trait P case class K(x: Int) extends P diff --git a/test/files/neg/t12720.scala b/test/files/neg/t12720.scala index 48c659065c4f..be4d3578fad5 100644 --- a/test/files/neg/t12720.scala +++ b/test/files/neg/t12720.scala @@ -1,4 +1,4 @@ -// scalac: -uniqid -Werror -Wunused +//> using options -uniqid -Werror -Wunused // hide: #\d+ class C { def f(x: Int) = "" diff --git a/test/files/neg/t12728.scala b/test/files/neg/t12728.scala index 6ccb0f19d639..3b2730b7add6 100644 --- a/test/files/neg/t12728.scala +++ b/test/files/neg/t12728.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint class C { val u = () diff --git a/test/files/neg/t12735a.scala b/test/files/neg/t12735a.scala index e6f998e098b6..67594fcf7a18 100644 --- a/test/files/neg/t12735a.scala +++ b/test/files/neg/t12735a.scala @@ -1,4 +1,4 @@ -// scalac: -Xreporter:scala.tools.partest.nest.PlainReporter +//> using options -Xreporter:scala.tools.partest.nest.PlainReporter trait A { def x: String diff --git a/test/files/neg/t12735b.scala b/test/files/neg/t12735b.scala index a27496be6f21..3b8fa184005d 100644 --- a/test/files/neg/t12735b.scala +++ b/test/files/neg/t12735b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint -Xreporter:scala.tools.partest.nest.PlainReporter +//> using options -Werror -Xlint -Xreporter:scala.tools.partest.nest.PlainReporter class UnusedMethod { private def m: String = diff --git a/test/files/neg/t12735c.scala b/test/files/neg/t12735c.scala index 1c8bb56b58a6..8b1b3e29f6a5 100644 --- a/test/files/neg/t12735c.scala +++ b/test/files/neg/t12735c.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint -Xreporter:scala.tools.partest.nest.PlainReporter +//> using options -Werror -Xlint -Xreporter:scala.tools.partest.nest.PlainReporter class UnusedVal { private val v: String = diff --git a/test/files/neg/t12770.scala b/test/files/neg/t12770.scala index b1059aadb9b4..8119777134e8 100644 --- a/test/files/neg/t12770.scala +++ b/test/files/neg/t12770.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint object Test { def doesntWarn(input: String) = input match { diff --git a/test/files/neg/t12785.scala b/test/files/neg/t12785.scala index aa1716f6dae9..19609b1fa59d 100644 --- a/test/files/neg/t12785.scala +++ b/test/files/neg/t12785.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror import scala.Predef._ diff --git a/test/files/neg/t12799/Test_2.scala b/test/files/neg/t12799/Test_2.scala index 4f1ddfe5e3d1..4b7242d971cb 100644 --- a/test/files/neg/t12799/Test_2.scala +++ b/test/files/neg/t12799/Test_2.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint // javaVersion: 9+ import example._ diff --git a/test/files/neg/t12800/matcher_1.scala b/test/files/neg/t12800/matcher_1.scala index 47d287a248ff..186acb763fb4 100644 --- a/test/files/neg/t12800/matcher_1.scala +++ b/test/files/neg/t12800/matcher_1.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xsource:3 +//> using options -Werror -Xsource:3 import JetBrains.* diff --git a/test/files/neg/t12813b.scala b/test/files/neg/t12813b.scala index da65e1b90364..bc6b1d593aaa 100644 --- a/test/files/neg/t12813b.scala +++ b/test/files/neg/t12813b.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 object O { val a = 1 } diff --git a/test/files/neg/t12815.scala b/test/files/neg/t12815.scala index 945e0b18d1e3..dd477e487c76 100644 --- a/test/files/neg/t12815.scala +++ b/test/files/neg/t12815.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror import scala.beans.BeanProperty diff --git a/test/files/neg/t12816.scala b/test/files/neg/t12816.scala index ccac64ed5765..fa9e74543167 100644 --- a/test/files/neg/t12816.scala +++ b/test/files/neg/t12816.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 -Werror +//> using options -Xsource:3 -Werror trait U { def a: Int = 0 diff --git a/test/files/neg/t12816b/B.scala b/test/files/neg/t12816b/B.scala index f4c12477b262..1ea81921e114 100644 --- a/test/files/neg/t12816b/B.scala +++ b/test/files/neg/t12816b/B.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 -Werror +//> using options -Xsource:3 -Werror package p { object c diff --git a/test/files/neg/t12851b/C_2.scala b/test/files/neg/t12851b/C_2.scala index c6d4b70f2960..39536ddec310 100644 --- a/test/files/neg/t12851b/C_2.scala +++ b/test/files/neg/t12851b/C_2.scala @@ -1,2 +1,2 @@ -// scalac: -Werror +//> using options -Werror class C extends T1 with T2 diff --git a/test/files/neg/t12879/Test.scala b/test/files/neg/t12879/Test.scala index 72814765e9fb..d3e755560921 100644 --- a/test/files/neg/t12879/Test.scala +++ b/test/files/neg/t12879/Test.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Werror +//> using options -deprecation -Werror class C { val x: A = A.Foo val y: A = A.Bar diff --git a/test/files/neg/t1371.scala b/test/files/neg/t1371.scala index f90942fb345a..7a674047be31 100644 --- a/test/files/neg/t1371.scala +++ b/test/files/neg/t1371.scala @@ -1,3 +1,3 @@ -// scalac: -Yrangepos +//> using options -Yrangepos trait A[T <: (_)] diff --git a/test/files/neg/t1503.scala b/test/files/neg/t1503.scala index e5be752475a0..1fe63fdaded3 100644 --- a/test/files/neg/t1503.scala +++ b/test/files/neg/t1503.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Werror -Wvalue-discard +//> using options -Xlint -Werror -Wvalue-discard // object Whatever { override def equals(x: Any) = true diff --git a/test/files/neg/t1909-object.scala b/test/files/neg/t1909-object.scala index 6b6e0247557b..cbce3bc84a77 100644 --- a/test/files/neg/t1909-object.scala +++ b/test/files/neg/t1909-object.scala @@ -1,4 +1,4 @@ -// scalac: -Xdev -Xfatal-warnings +//> using options -Xdev -Xfatal-warnings // class Kaboom(a: Any) { def this() = { diff --git a/test/files/neg/t2442/t2442.scala b/test/files/neg/t2442/t2442.scala index 3909905229cf..738e12485936 100644 --- a/test/files/neg/t2442/t2442.scala +++ b/test/files/neg/t2442/t2442.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror class Test { import MyEnum._ diff --git a/test/files/neg/t2458/test.scala b/test/files/neg/t2458/test.scala index a2cae880a158..bc0d25957984 100644 --- a/test/files/neg/t2458/test.scala +++ b/test/files/neg/t2458/test.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 import q.X package p { diff --git a/test/files/neg/t2458b/test.scala b/test/files/neg/t2458b/test.scala index 087aca4668b0..767187d14276 100644 --- a/test/files/neg/t2458b/test.scala +++ b/test/files/neg/t2458b/test.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 import q._ package q.qq { diff --git a/test/files/neg/t2458c/test.scala b/test/files/neg/t2458c/test.scala index ec082fadf31e..8e5ea67c6def 100644 --- a/test/files/neg/t2458c/test.scala +++ b/test/files/neg/t2458c/test.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 import q.X._ package p { diff --git a/test/files/neg/t2462b.scala b/test/files/neg/t2462b.scala index 5c80e62dfd34..d1c826d81644 100644 --- a/test/files/neg/t2462b.scala +++ b/test/files/neg/t2462b.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:implicit-not-found -Xfatal-warnings +//> using options -Xlint:implicit-not-found -Xfatal-warnings // package test diff --git a/test/files/neg/t2462c.scala b/test/files/neg/t2462c.scala index d059a47ceb09..f229a76e577b 100644 --- a/test/files/neg/t2462c.scala +++ b/test/files/neg/t2462c.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // import annotation._ diff --git a/test/files/neg/t2796.scala b/test/files/neg/t2796.scala index 4bf0d2168baf..7a718fc0cade 100644 --- a/test/files/neg/t2796.scala +++ b/test/files/neg/t2796.scala @@ -1,5 +1,5 @@ // -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // trait Base { val abstractVal: String diff --git a/test/files/neg/t2799.scala b/test/files/neg/t2799.scala index abf78ab17a28..85bce2a27b94 100644 --- a/test/files/neg/t2799.scala +++ b/test/files/neg/t2799.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Werror +//> using options -Xlint -Werror @deprecated("other mother", "") trait T[A] diff --git a/test/files/neg/t284.scala b/test/files/neg/t284.scala index 26fd20167559..40118ca29612 100644 --- a/test/files/neg/t284.scala +++ b/test/files/neg/t284.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // trait B[T] { def f1(a: T): Unit { } diff --git a/test/files/neg/t3098/a.scala b/test/files/neg/t3098/a.scala index 9f8fb295f5c0..d2ee7048fd56 100644 --- a/test/files/neg/t3098/a.scala +++ b/test/files/neg/t3098/a.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror sealed trait T trait A extends T diff --git a/test/files/neg/t3420b.scala b/test/files/neg/t3420b.scala index 33d907594145..a6c9ff90170e 100644 --- a/test/files/neg/t3420b.scala +++ b/test/files/neg/t3420b.scala @@ -1,5 +1,5 @@ -// scalac: --release 8 -opt:inline:** -Wopt -Werror +//> using options --release 8 -opt:inline:** -Wopt -Werror // class C { val cv = Map[Int, Int](1 -> 2) diff --git a/test/files/neg/t3683a.scala b/test/files/neg/t3683a.scala index 8047d4b172a1..cf06ef26094c 100644 --- a/test/files/neg/t3683a.scala +++ b/test/files/neg/t3683a.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed trait Foo sealed trait Bar extends Foo diff --git a/test/files/neg/t3692-new.scala b/test/files/neg/t3692-new.scala index 063e141cb4a3..3a3531270cda 100644 --- a/test/files/neg/t3692-new.scala +++ b/test/files/neg/t3692-new.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // import scala.reflect.{ClassTag, classTag} import java.lang.Integer diff --git a/test/files/neg/t4302.scala b/test/files/neg/t4302.scala index 6498a0f29ced..233250d212d9 100644 --- a/test/files/neg/t4302.scala +++ b/test/files/neg/t4302.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { def hasMatch[T](x: AnyRef) = x.isInstanceOf[T] diff --git a/test/files/neg/t4440.scala b/test/files/neg/t4440.scala index 8fe7346e315e..21d99b89d804 100644 --- a/test/files/neg/t4440.scala +++ b/test/files/neg/t4440.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // // constructors used to drop outer fields when they were not accessed // however, how can you know (respecting separate compilation) that they're not accessed!? diff --git a/test/files/neg/t4691_exhaust_extractor.scala b/test/files/neg/t4691_exhaust_extractor.scala index 683aca76f7af..c1f8bd498ab5 100644 --- a/test/files/neg/t4691_exhaust_extractor.scala +++ b/test/files/neg/t4691_exhaust_extractor.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed trait Foo class Bar1 extends Foo diff --git a/test/files/neg/t4701.scala b/test/files/neg/t4701.scala index 54ec087dd07f..8b62ed14d7b7 100644 --- a/test/files/neg/t4701.scala +++ b/test/files/neg/t4701.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos trait HL[A] object HN { def :: [A](x: A): HL[A] = new HL[A] {} diff --git a/test/files/neg/t4749.scala b/test/files/neg/t4749.scala index 858937f78740..f9521d47ddce 100644 --- a/test/files/neg/t4749.scala +++ b/test/files/neg/t4749.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // package bippy { object Fail1 { diff --git a/test/files/neg/t4762.scala b/test/files/neg/t4762.scala index 7fb73ee13780..c56924bea198 100644 --- a/test/files/neg/t4762.scala +++ b/test/files/neg/t4762.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Xfatal-warnings +//> using options -Xlint -Xfatal-warnings // // https://github.com/scala/bug/issues/4762 diff --git a/test/files/neg/t4851/S.scala b/test/files/neg/t4851/S.scala index ba22f93452e4..3ebe93a9d775 100644 --- a/test/files/neg/t4851/S.scala +++ b/test/files/neg/t4851/S.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:adapted-args -Xfatal-warnings -deprecation +//> using options -Xlint:adapted-args -Xfatal-warnings -deprecation // object Test { val x1 = new J diff --git a/test/files/neg/t5182.scala b/test/files/neg/t5182.scala index 32f2ed534830..2eeb0960cfa2 100644 --- a/test/files/neg/t5182.scala +++ b/test/files/neg/t5182.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class test { @java.lang.Deprecated(qwe = "wer") def ok(q:Int) = 1 diff --git a/test/files/neg/t5197.scala b/test/files/neg/t5197.scala index 8e568ea47660..61f2a535220a 100644 --- a/test/files/neg/t5197.scala +++ b/test/files/neg/t5197.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -feature +//> using options -Werror -feature // Periodic reminder that the feature is not required for implicit function values. //import scala.language.implicitConversions diff --git a/test/files/neg/t5265a.scala b/test/files/neg/t5265a.scala index 80b127e1adeb..42984206bdf5 100644 --- a/test/files/neg/t5265a.scala +++ b/test/files/neg/t5265a.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror trait T[A] class C[A: T] diff --git a/test/files/neg/t5265b.scala b/test/files/neg/t5265b.scala index c85add2bb44b..45b2170fc7d9 100644 --- a/test/files/neg/t5265b.scala +++ b/test/files/neg/t5265b.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 trait T[A] class C[A: T] diff --git a/test/files/neg/t5352.scala b/test/files/neg/t5352.scala index 5e54d345b36c..2dd99003d0bc 100644 --- a/test/files/neg/t5352.scala +++ b/test/files/neg/t5352.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object boop { abstract class Bar { protected def f(): Any } diff --git a/test/files/neg/t5365.scala b/test/files/neg/t5365.scala index 25a6dcc8cf67..087635454d3f 100644 --- a/test/files/neg/t5365.scala +++ b/test/files/neg/t5365.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings class C { def nonExhautiveIfWeAssumeGuardsTrueOrFalse(x: Option[Int]): Int = x match { case Some(n) if n % 2 == 0 => n diff --git a/test/files/neg/t5365b.scala b/test/files/neg/t5365b.scala index 25a6dcc8cf67..087635454d3f 100644 --- a/test/files/neg/t5365b.scala +++ b/test/files/neg/t5365b.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings class C { def nonExhautiveIfWeAssumeGuardsTrueOrFalse(x: Option[Int]): Int = x match { case Some(n) if n % 2 == 0 => n diff --git a/test/files/neg/t5365c.scala b/test/files/neg/t5365c.scala index d79cd905c0d4..3c460b59d56d 100644 --- a/test/files/neg/t5365c.scala +++ b/test/files/neg/t5365c.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint:strict-unsealed-patmat +//> using options -Xfatal-warnings -Xlint:strict-unsealed-patmat object C { trait Z final case class Q(i: Int) extends Z diff --git a/test/files/neg/t5365d.scala b/test/files/neg/t5365d.scala index eab29e7ecead..6f84c2eaf2b8 100644 --- a/test/files/neg/t5365d.scala +++ b/test/files/neg/t5365d.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings object D { sealed trait T final case class C(i: Int) extends T diff --git a/test/files/neg/t5365e.scala b/test/files/neg/t5365e.scala index 5975587cbf94..f06c70b11a60 100644 --- a/test/files/neg/t5365e.scala +++ b/test/files/neg/t5365e.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings sealed trait Exh final case class Foo(xs: String*) extends Exh final case class Bar(x: String) extends Exh diff --git a/test/files/neg/t5426.scala b/test/files/neg/t5426.scala index 14a24529142f..de8480f8b826 100644 --- a/test/files/neg/t5426.scala +++ b/test/files/neg/t5426.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class A { def f1 = Some(5) == 5 diff --git a/test/files/neg/t5440.scala b/test/files/neg/t5440.scala index c0322af55841..dbbad683338e 100644 --- a/test/files/neg/t5440.scala +++ b/test/files/neg/t5440.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { def merge(list1: List[Long], list2: List[Long]): Boolean = diff --git a/test/files/neg/t5507.scala b/test/files/neg/t5507.scala index 912fad66702d..63a9e6604de9 100644 --- a/test/files/neg/t5507.scala +++ b/test/files/neg/t5507.scala @@ -1,5 +1,5 @@ // -// scalac: -Xlint:unit-special -Werror +//> using options -Xlint:unit-special -Werror // warn once final class C[@specialized A, @specialized B](a: A, b: B) diff --git a/test/files/neg/t5606.scala b/test/files/neg/t5606.scala index c44b1e96e378..fed05b645f69 100644 --- a/test/files/neg/t5606.scala +++ b/test/files/neg/t5606.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // was: _ taken as ident of type param, but poor interactions below case class CaseTest[_](someData: String) diff --git a/test/files/neg/t5606b.scala b/test/files/neg/t5606b.scala index 3931de26d43b..eef807300770 100644 --- a/test/files/neg/t5606b.scala +++ b/test/files/neg/t5606b.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Werror +//> using options -Xlint -Werror // // was: _ taken as ident of type param, now a fresh name case class CaseTest[_](someData: String) diff --git a/test/files/neg/t5663-badwarneq.scala b/test/files/neg/t5663-badwarneq.scala index f920d6e88f42..4646b9fd011d 100644 --- a/test/files/neg/t5663-badwarneq.scala +++ b/test/files/neg/t5663-badwarneq.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // // alias diff --git a/test/files/neg/t5675.scala b/test/files/neg/t5675.scala index baaabaf89ef0..1e414307798a 100644 --- a/test/files/neg/t5675.scala +++ b/test/files/neg/t5675.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // // without -feature, don't double-count the warning // diff --git a/test/files/neg/t5689.scala b/test/files/neg/t5689.scala index e973c6f74c26..23462a860ee6 100644 --- a/test/files/neg/t5689.scala +++ b/test/files/neg/t5689.scala @@ -1,4 +1,4 @@ -// scalac: -language:experimental.macros +//> using options -language:experimental.macros // import scala.reflect.macros.blackbox.Context diff --git a/test/files/neg/t5691.scala b/test/files/neg/t5691.scala index 42cc75e45f0f..3624e200910d 100644 --- a/test/files/neg/t5691.scala +++ b/test/files/neg/t5691.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:type-parameter-shadow -language:higherKinds -Xfatal-warnings +//> using options -Xlint:type-parameter-shadow -language:higherKinds -Xfatal-warnings // class B { diff --git a/test/files/neg/t5715.scala b/test/files/neg/t5715.scala index fe76dee9b53a..5ea9c2a3af7a 100644 --- a/test/files/neg/t5715.scala +++ b/test/files/neg/t5715.scala @@ -1,5 +1,5 @@ -// scalac: -Xlint -Werror +//> using options -Xlint -Werror package example diff --git a/test/files/neg/t5762.scala b/test/files/neg/t5762.scala index 8290920d0e7a..a2341860f600 100644 --- a/test/files/neg/t5762.scala +++ b/test/files/neg/t5762.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class D[-A] diff --git a/test/files/neg/t5830.scala b/test/files/neg/t5830.scala index 9c46e2bcd90b..8a3f96485f95 100644 --- a/test/files/neg/t5830.scala +++ b/test/files/neg/t5830.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // import scala.annotation.switch diff --git a/test/files/neg/t5898.scala b/test/files/neg/t5898.scala index b4eed38e3388..23057bc7b09e 100644 --- a/test/files/neg/t5898.scala +++ b/test/files/neg/t5898.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:valpattern -Xfatal-warnings +//> using options -Xlint:valpattern -Xfatal-warnings // sealed trait T case class C(i: Int) extends T diff --git a/test/files/neg/t5956.scala b/test/files/neg/t5956.scala index 3c189fe8e541..507e721f4043 100644 --- a/test/files/neg/t5956.scala +++ b/test/files/neg/t5956.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // object O { case class C[T](); class C() } object T { case class C[T](); case class C() } diff --git a/test/files/neg/t6011.scala b/test/files/neg/t6011.scala index 3cd7f7c62500..c909c4e4691b 100644 --- a/test/files/neg/t6011.scala +++ b/test/files/neg/t6011.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { def f(ch: Char): Any = ch match { diff --git a/test/files/neg/t6048.scala b/test/files/neg/t6048.scala index e21bfeee0836..431cb6adde64 100644 --- a/test/files/neg/t6048.scala +++ b/test/files/neg/t6048.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class A { def f1(x: Int) = x match { diff --git a/test/files/neg/t6123-explaintypes-macros/BadMac_2.scala b/test/files/neg/t6123-explaintypes-macros/BadMac_2.scala index 65303fb6e6dd..c9d33756d6a7 100644 --- a/test/files/neg/t6123-explaintypes-macros/BadMac_2.scala +++ b/test/files/neg/t6123-explaintypes-macros/BadMac_2.scala @@ -1,4 +1,4 @@ -// scalac: -explaintypes +//> using options -explaintypes import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context diff --git a/test/files/neg/t6123-explaintypes-macros/Macros.scala b/test/files/neg/t6123-explaintypes-macros/Macros.scala index 21979a86207d..a6feb5b88dbc 100644 --- a/test/files/neg/t6123-explaintypes-macros/Macros.scala +++ b/test/files/neg/t6123-explaintypes-macros/Macros.scala @@ -1,4 +1,4 @@ -// scalac: -explaintypes +//> using options -explaintypes import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context diff --git a/test/files/neg/t6159.scala b/test/files/neg/t6159.scala index 2e7477a299c7..71abea905e54 100644 --- a/test/files/neg/t6159.scala +++ b/test/files/neg/t6159.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // like test/files/pos/t6159.scala // but with T2 not private trait A { diff --git a/test/files/neg/t6162-inheritance/defn.scala b/test/files/neg/t6162-inheritance/defn.scala index 8b77690c0ac2..673ea4dbfd1b 100644 --- a/test/files/neg/t6162-inheritance/defn.scala +++ b/test/files/neg/t6162-inheritance/defn.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Werror +//> using options -deprecation -Werror package scala.t6126 @deprecatedInheritance("`Foo` will be made final in a future version.", "2.10.0") diff --git a/test/files/neg/t6162-overriding.scala b/test/files/neg/t6162-overriding.scala index 4667536ae9f3..17932569c129 100644 --- a/test/files/neg/t6162-overriding.scala +++ b/test/files/neg/t6162-overriding.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -deprecation +//> using options -Xfatal-warnings -deprecation // package scala.t6162 diff --git a/test/files/neg/t6217.scala b/test/files/neg/t6217.scala index 931fe8c13930..58cce7844fbe 100644 --- a/test/files/neg/t6217.scala +++ b/test/files/neg/t6217.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror package p { package _root_ { package scala { diff --git a/test/files/neg/t6217b.scala b/test/files/neg/t6217b.scala index a33cae6eca7e..923effa94171 100644 --- a/test/files/neg/t6217b.scala +++ b/test/files/neg/t6217b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror package p package _root_ object Test { diff --git a/test/files/neg/t6217c.scala b/test/files/neg/t6217c.scala index f27162811d96..439aad07c106 100644 --- a/test/files/neg/t6217c.scala +++ b/test/files/neg/t6217c.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror package b { class B } diff --git a/test/files/neg/t6264.scala b/test/files/neg/t6264.scala index fdef3eb18ded..f7be7eff0f01 100644 --- a/test/files/neg/t6264.scala +++ b/test/files/neg/t6264.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class Foo { def foo(x: AnyRef): Unit = { diff --git a/test/files/neg/t6276.scala b/test/files/neg/t6276.scala index 76f8a00cc687..d236ee69885f 100644 --- a/test/files/neg/t6276.scala +++ b/test/files/neg/t6276.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { def foo(a: Int, b: Int, c: Int): Unit = { diff --git a/test/files/neg/t6446-additional/sample_2.scala b/test/files/neg/t6446-additional/sample_2.scala index 597b70cc65ac..f9d2a3e52360 100644 --- a/test/files/neg/t6446-additional/sample_2.scala +++ b/test/files/neg/t6446-additional/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Vphases +//> using options -Xplugin:. -Vphases package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t6446-list/sample_2.scala b/test/files/neg/t6446-list/sample_2.scala index e3bf6cd14603..55d8bb1625d7 100644 --- a/test/files/neg/t6446-list/sample_2.scala +++ b/test/files/neg/t6446-list/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Xplugin-list +//> using options -Xplugin:. -Xplugin-list package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t6446-missing/sample_2.scala b/test/files/neg/t6446-missing/sample_2.scala index 597b70cc65ac..f9d2a3e52360 100644 --- a/test/files/neg/t6446-missing/sample_2.scala +++ b/test/files/neg/t6446-missing/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Vphases +//> using options -Xplugin:. -Vphases package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t6446-show-phases.scala b/test/files/neg/t6446-show-phases.scala index d0bd64b20973..016067364f1d 100644 --- a/test/files/neg/t6446-show-phases.scala +++ b/test/files/neg/t6446-show-phases.scala @@ -1,4 +1,4 @@ -// scalac: -Vphases +//> using options -Vphases // // testing compiler flag output only diff --git a/test/files/neg/t6534.scala b/test/files/neg/t6534.scala index 14144fd375b9..c80af5fc4c4b 100644 --- a/test/files/neg/t6534.scala +++ b/test/files/neg/t6534.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint +//> using options -Xlint // trait Foo extends Any { override def equals(x: Any) = false } trait Ding extends Any { override def hashCode = -1 } diff --git a/test/files/neg/t6567.scala b/test/files/neg/t6567.scala index 43d46231ca4e..3e300f9f7053 100644 --- a/test/files/neg/t6567.scala +++ b/test/files/neg/t6567.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:option-implicit -Xfatal-warnings +//> using options -Xlint:option-implicit -Xfatal-warnings // class A class B diff --git a/test/files/neg/t6582_exhaust_big.scala b/test/files/neg/t6582_exhaust_big.scala index ee0649c2b4e2..6f53cd24f28a 100644 --- a/test/files/neg/t6582_exhaust_big.scala +++ b/test/files/neg/t6582_exhaust_big.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed abstract class Z object Z { diff --git a/test/files/neg/t6595.scala b/test/files/neg/t6595.scala index f64275ba794b..4cdc0f6d89a4 100644 --- a/test/files/neg/t6595.scala +++ b/test/files/neg/t6595.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -deprecation +//> using options -Xfatal-warnings -deprecation // import scala.annotation.switch diff --git a/test/files/neg/t6666.scala b/test/files/neg/t6666.scala index 077a79083d03..cf3d0010c96c 100644 --- a/test/files/neg/t6666.scala +++ b/test/files/neg/t6666.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:inline +//> using options -Ydelambdafy:inline // class C(a: Any) object F { diff --git a/test/files/neg/t6666c.scala b/test/files/neg/t6666c.scala index 693eeff2eeee..7a8ec5e23b36 100644 --- a/test/files/neg/t6666c.scala +++ b/test/files/neg/t6666c.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:inline +//> using options -Ydelambdafy:inline // class C(a: Any) class D extends C({def x = 0; object X { x }}) diff --git a/test/files/neg/t6675.scala b/test/files/neg/t6675.scala index 879fc6d5a41e..7cc97f36cdef 100644 --- a/test/files/neg/t6675.scala +++ b/test/files/neg/t6675.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // object X { def unapply(s: String): Option[(Int,Int,Int)] = Some((1,2,3)) diff --git a/test/files/neg/t6675b.scala b/test/files/neg/t6675b.scala index 7ade88fbf2b4..2f494e08b539 100644 --- a/test/files/neg/t6675b.scala +++ b/test/files/neg/t6675b.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xlint +//> using options -deprecation -Xlint // object LeftOrRight { def unapply[A](value: Either[A, A]): Option[A] = value match { diff --git a/test/files/neg/t6714.scala b/test/files/neg/t6714.scala index 9a2b229588fa..b1b92e4aadf1 100644 --- a/test/files/neg/t6714.scala +++ b/test/files/neg/t6714.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // case class A(a: Int, index: Int) { diff --git a/test/files/neg/t6902.scala b/test/files/neg/t6902.scala index e2e7a5084dbe..680e6108481c 100644 --- a/test/files/neg/t6902.scala +++ b/test/files/neg/t6902.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { Some(Some(1)) collect { diff --git a/test/files/neg/t7014/t7014_2.scala b/test/files/neg/t7014/t7014_2.scala index f8c903128d13..94f8f1c05237 100644 --- a/test/files/neg/t7014/t7014_2.scala +++ b/test/files/neg/t7014/t7014_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror package t7014 import ThreadSafetyLevel_1.COMPLETELY_THREADSAFE // refer to annotation so it gets parsed diff --git a/test/files/neg/t7020.scala b/test/files/neg/t7020.scala index 871938be8d82..f323456a9bca 100644 --- a/test/files/neg/t7020.scala +++ b/test/files/neg/t7020.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { // warning was non-deterministic diff --git a/test/files/neg/t7110.scala b/test/files/neg/t7110.scala index 3b62a05ac6b7..66aa076681c0 100644 --- a/test/files/neg/t7110.scala +++ b/test/files/neg/t7110.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { try { ??? } // warn diff --git a/test/files/neg/t7171.scala b/test/files/neg/t7171.scala index f259826e6343..aa3aaa9ef32d 100644 --- a/test/files/neg/t7171.scala +++ b/test/files/neg/t7171.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // trait T { final case class A() diff --git a/test/files/neg/t7171b.scala b/test/files/neg/t7171b.scala index 94cfa7826d1c..236603c02ce8 100644 --- a/test/files/neg/t7171b.scala +++ b/test/files/neg/t7171b.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // trait T { final case class A() diff --git a/test/files/neg/t7187-3.scala b/test/files/neg/t7187-3.scala index a3bc502ba6b1..347c7f0f6c11 100644 --- a/test/files/neg/t7187-3.scala +++ b/test/files/neg/t7187-3.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 -Xlint:eta-zero +//> using options -Xsource:3 -Xlint:eta-zero // trait AcciSamZero { def apply(): Int } diff --git a/test/files/neg/t7187-deprecation.scala b/test/files/neg/t7187-deprecation.scala index 7808df726e59..8ed9bb9aec11 100644 --- a/test/files/neg/t7187-deprecation.scala +++ b/test/files/neg/t7187-deprecation.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 -deprecation -Werror +//> using options -Xsource:3 -deprecation -Werror // trait AcciSamZero { def apply(): Int } diff --git a/test/files/neg/t7187.scala b/test/files/neg/t7187.scala index f58d7e49cb98..42ad461bf8b1 100644 --- a/test/files/neg/t7187.scala +++ b/test/files/neg/t7187.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation,eta-zero,eta-sam +//> using options -Xlint:deprecation,eta-zero,eta-sam // trait AcciSamOne { def apply(x: Int): Int } diff --git a/test/files/neg/t7285.scala b/test/files/neg/t7285.scala index 6c31a7b96907..9204c1ded393 100644 --- a/test/files/neg/t7285.scala +++ b/test/files/neg/t7285.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed abstract class Base diff --git a/test/files/neg/t7290.scala b/test/files/neg/t7290.scala index fcc5a561db8f..1d3c774119af 100644 --- a/test/files/neg/t7290.scala +++ b/test/files/neg/t7290.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test extends App { val y = (0: Int) match { diff --git a/test/files/neg/t7369.scala b/test/files/neg/t7369.scala index 094a7d576b30..91ba91ffee3b 100644 --- a/test/files/neg/t7369.scala +++ b/test/files/neg/t7369.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { val X, Y = true diff --git a/test/files/neg/t7494-after-terminal/sample_2.scala b/test/files/neg/t7494-after-terminal/sample_2.scala index 774b9aed4545..d2583c1b5524 100644 --- a/test/files/neg/t7494-after-terminal/sample_2.scala +++ b/test/files/neg/t7494-after-terminal/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Xplugin-require:afterterminal +//> using options -Xplugin:. -Xplugin-require:afterterminal package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t7494-before-parser/sample_2.scala b/test/files/neg/t7494-before-parser/sample_2.scala index 10b67355cc5d..23bbb066b83f 100644 --- a/test/files/neg/t7494-before-parser/sample_2.scala +++ b/test/files/neg/t7494-before-parser/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Xplugin-require:beforeparser +//> using options -Xplugin:. -Xplugin-require:beforeparser package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t7494-multi-right-after/sample_2.scala b/test/files/neg/t7494-multi-right-after/sample_2.scala index 9bf136ad27a6..2c9cfa861a9b 100644 --- a/test/files/neg/t7494-multi-right-after/sample_2.scala +++ b/test/files/neg/t7494-multi-right-after/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Xplugin-require:multi-rafter +//> using options -Xplugin:. -Xplugin-require:multi-rafter package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t7494-no-options/sample_2.scala b/test/files/neg/t7494-no-options/sample_2.scala index d756032b43c9..47a206b7b3de 100644 --- a/test/files/neg/t7494-no-options/sample_2.scala +++ b/test/files/neg/t7494-no-options/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Vphases -P:ploogin:inploog +//> using options -Xplugin:. -Vphases -P:ploogin:inploog package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t7494-right-after-before/sample_2.scala b/test/files/neg/t7494-right-after-before/sample_2.scala index ebe48c4e8911..dac3d6950201 100644 --- a/test/files/neg/t7494-right-after-before/sample_2.scala +++ b/test/files/neg/t7494-right-after-before/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Xplugin-require:rafter-before-1 +//> using options -Xplugin:. -Xplugin-require:rafter-before-1 package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t7494-right-after-terminal/sample_2.scala b/test/files/neg/t7494-right-after-terminal/sample_2.scala index c705cf912e0c..e0f367078bfa 100644 --- a/test/files/neg/t7494-right-after-terminal/sample_2.scala +++ b/test/files/neg/t7494-right-after-terminal/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Xplugin-require:rightafterterminal +//> using options -Xplugin:. -Xplugin-require:rightafterterminal package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t7622-cyclic-dependency/sample_2.scala b/test/files/neg/t7622-cyclic-dependency/sample_2.scala index 3d5db665f8c5..798bebc4a23e 100644 --- a/test/files/neg/t7622-cyclic-dependency/sample_2.scala +++ b/test/files/neg/t7622-cyclic-dependency/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Xplugin-require:cyclicdependency +//> using options -Xplugin:. -Xplugin-require:cyclicdependency package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t7622-missing-dependency/sample_2.scala b/test/files/neg/t7622-missing-dependency/sample_2.scala index e03e32d9a7f2..9bff3616a847 100644 --- a/test/files/neg/t7622-missing-dependency/sample_2.scala +++ b/test/files/neg/t7622-missing-dependency/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Xplugin-require:myplugin +//> using options -Xplugin:. -Xplugin-require:myplugin package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t7622-missing-required.scala b/test/files/neg/t7622-missing-required.scala index 0025feb680ac..76d381981d6e 100644 --- a/test/files/neg/t7622-missing-required.scala +++ b/test/files/neg/t7622-missing-required.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin-require:special-plugin +//> using options -Xplugin-require:special-plugin // // the amazing features of this trait diff --git a/test/files/neg/t7622-multi-followers/sample_2.scala b/test/files/neg/t7622-multi-followers/sample_2.scala index 392e2ad7c0cd..941a6da13e39 100644 --- a/test/files/neg/t7622-multi-followers/sample_2.scala +++ b/test/files/neg/t7622-multi-followers/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Xplugin-require:multi +//> using options -Xplugin:. -Xplugin-require:multi package sample // just a sample that is compiled with the sample plugin enabled diff --git a/test/files/neg/t7623.scala b/test/files/neg/t7623.scala index fb36d0b5d737..8fae4fcf13f5 100644 --- a/test/files/neg/t7623.scala +++ b/test/files/neg/t7623.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:stars-align -Xfatal-warnings +//> using options -Xlint:stars-align -Xfatal-warnings // diff --git a/test/files/neg/t7669.scala b/test/files/neg/t7669.scala index 7ad88eba563d..2033b37b89a0 100644 --- a/test/files/neg/t7669.scala +++ b/test/files/neg/t7669.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { diff --git a/test/files/neg/t7721.scala b/test/files/neg/t7721.scala index 61b66503b5a1..7d1b40ad6450 100644 --- a/test/files/neg/t7721.scala +++ b/test/files/neg/t7721.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // import scala.language.reflectiveCalls diff --git a/test/files/neg/t7756b.scala b/test/files/neg/t7756b.scala index b3364aa86087..6feab9ba5c87 100644 --- a/test/files/neg/t7756b.scala +++ b/test/files/neg/t7756b.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { 0 match { diff --git a/test/files/neg/t7783.scala b/test/files/neg/t7783.scala index c9412fe8cb7a..85ae75dafd1a 100644 --- a/test/files/neg/t7783.scala +++ b/test/files/neg/t7783.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // object O { class C; @deprecated("", "") type D = C; def foo: Seq[D] = Nil } diff --git a/test/files/neg/t7848-interp-warn.scala b/test/files/neg/t7848-interp-warn.scala index af087ff1ac52..f3eac5128403 100644 --- a/test/files/neg/t7848-interp-warn.scala +++ b/test/files/neg/t7848-interp-warn.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:missing-interpolator -Xfatal-warnings +//> using options -Xlint:missing-interpolator -Xfatal-warnings // package test diff --git a/test/files/neg/t7860.scala b/test/files/neg/t7860.scala index 905dc3854f7b..7eaf1f7b09ba 100644 --- a/test/files/neg/t7860.scala +++ b/test/files/neg/t7860.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Ywarn-unused:privates +//> using options -Xfatal-warnings -Ywarn-unused:privates // class Test diff --git a/test/files/neg/t7984.scala b/test/files/neg/t7984.scala index 9e6c5e6b9d5a..c53dd1633eb8 100644 --- a/test/files/neg/t7984.scala +++ b/test/files/neg/t7984.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class Test { type ListInt = List[Int] diff --git a/test/files/neg/t8015-ffb.scala b/test/files/neg/t8015-ffb.scala index 7fd2d9ea91dd..d94e4d6353f6 100644 --- a/test/files/neg/t8015-ffb.scala +++ b/test/files/neg/t8015-ffb.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Xfatal-warnings +//> using options -Xlint -Xfatal-warnings // trait G { diff --git a/test/files/neg/t8178.scala b/test/files/neg/t8178.scala index bc5804577d74..37595cc83062 100644 --- a/test/files/neg/t8178.scala +++ b/test/files/neg/t8178.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings sealed trait Fails case class VarArgs1(a: String*) extends Fails case class FailsChild2(a: Seq[String]) extends Fails diff --git a/test/files/neg/t8265.scala b/test/files/neg/t8265.scala index ae4e64b8ba45..d7896cde87da 100644 --- a/test/files/neg/t8265.scala +++ b/test/files/neg/t8265.scala @@ -1,3 +1,3 @@ -// scalac: -language:higherKinds +//> using options -language:higherKinds // class Foo[+CC[X]] { type Coll = CC[_] } diff --git a/test/files/neg/t8417.scala b/test/files/neg/t8417.scala index 961514d9eb7f..8f37043ce886 100644 --- a/test/files/neg/t8417.scala +++ b/test/files/neg/t8417.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint:adapted-args +//> using options -Xfatal-warnings -Xlint:adapted-args // diff --git a/test/files/neg/t8430.scala b/test/files/neg/t8430.scala index da1b4eefbcce..972aeea3fd99 100644 --- a/test/files/neg/t8430.scala +++ b/test/files/neg/t8430.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Ypatmat-exhaust-depth off +//> using options -Xfatal-warnings -Ypatmat-exhaust-depth off // sealed trait CL3Literal case object IntLit extends CL3Literal diff --git a/test/files/neg/t8450.scala b/test/files/neg/t8450.scala index a1c5de01ce7c..55f60ecd61d7 100644 --- a/test/files/neg/t8450.scala +++ b/test/files/neg/t8450.scala @@ -1,4 +1,4 @@ -// scalac: -Ywarn-numeric-widen -Xfatal-warnings +//> using options -Ywarn-numeric-widen -Xfatal-warnings // trait Foo diff --git a/test/files/neg/t8511.scala b/test/files/neg/t8511.scala index 6d96eda0b0e0..9be381769f18 100644 --- a/test/files/neg/t8511.scala +++ b/test/files/neg/t8511.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror sealed trait Expr final case class Foo(other: Option[String]) extends Expr final case class Bar(someConstant: String) extends Expr diff --git a/test/files/neg/t8525.scala b/test/files/neg/t8525.scala index 606b473983b0..96d5e3a51b45 100644 --- a/test/files/neg/t8525.scala +++ b/test/files/neg/t8525.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint:-missing-interpolator -Xlint +//> using options -Xfatal-warnings -Xlint:-missing-interpolator -Xlint // class Named(var name: String) diff --git a/test/files/neg/t8597.scala b/test/files/neg/t8597.scala index b5925c48a1ca..815032539721 100644 --- a/test/files/neg/t8597.scala +++ b/test/files/neg/t8597.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class Unchecked[C] { def nowarn[T] = (null: Any) match { case _: Some[T] => } // warn (did not warn due to scala/bug#8597) diff --git a/test/files/neg/t8597b.scala b/test/files/neg/t8597b.scala index 26b3f97c1500..4a4f38d79d39 100644 --- a/test/files/neg/t8597b.scala +++ b/test/files/neg/t8597b.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Unchecked { (null: Any) match { diff --git a/test/files/neg/t8610-arg.scala b/test/files/neg/t8610-arg.scala index 553a164201ea..380796019999 100644 --- a/test/files/neg/t8610-arg.scala +++ b/test/files/neg/t8610-arg.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint nullary-unit +//> using options -Xfatal-warnings -Xlint nullary-unit // class Named(var name: String) diff --git a/test/files/neg/t8610.scala b/test/files/neg/t8610.scala index 8388d6f4368b..62443d2af273 100644 --- a/test/files/neg/t8610.scala +++ b/test/files/neg/t8610.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint +//> using options -Xfatal-warnings -Xlint // class Named(var name: String) diff --git a/test/files/neg/t8650.scala b/test/files/neg/t8650.scala index b05d3a1d3ba0..98b33b116ab3 100644 --- a/test/files/neg/t8650.scala +++ b/test/files/neg/t8650.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint object Strings { final val greeting = "hello" diff --git a/test/files/neg/t8650b.scala b/test/files/neg/t8650b.scala index c694791320b8..217b0fd1845b 100644 --- a/test/files/neg/t8650b.scala +++ b/test/files/neg/t8650b.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint object Strings { final val greeting = "hello" diff --git a/test/files/neg/t8685.scala b/test/files/neg/t8685.scala index 0cba602194e6..af9db61ea9c3 100644 --- a/test/files/neg/t8685.scala +++ b/test/files/neg/t8685.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // diff --git a/test/files/neg/t8700a/Bar.scala b/test/files/neg/t8700a/Bar.scala index fce3c061f787..3055c25042e0 100644 --- a/test/files/neg/t8700a/Bar.scala +++ b/test/files/neg/t8700a/Bar.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Bar { def bar1(foo: Foo) = foo match { case Foo.A => 1 diff --git a/test/files/neg/t8700b/Bar_2.scala b/test/files/neg/t8700b/Bar_2.scala index bc61137a5afe..c7f5c4966717 100644 --- a/test/files/neg/t8700b/Bar_2.scala +++ b/test/files/neg/t8700b/Bar_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // object Bar { def bar1(foo: Foo) = foo match { diff --git a/test/files/neg/t8704.scala b/test/files/neg/t8704.scala index aebc7162deaf..37614452f4f0 100644 --- a/test/files/neg/t8704.scala +++ b/test/files/neg/t8704.scala @@ -1,4 +1,4 @@ -// scalac: -Ywarn-extra-implicit +//> using options -Ywarn-extra-implicit // diff --git a/test/files/neg/t8731.scala b/test/files/neg/t8731.scala index fd85fbe42ae6..c1015396a1f0 100644 --- a/test/files/neg/t8731.scala +++ b/test/files/neg/t8731.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class C { // not a compile-time constant due to return type diff --git a/test/files/neg/t8777.scala b/test/files/neg/t8777.scala index bd853d7daec5..8d8ad0fa921d 100644 --- a/test/files/neg/t8777.scala +++ b/test/files/neg/t8777.scala @@ -1,4 +1,4 @@ -// scalac: '-Wconf:msg=shadowing a nested class of a parent is deprecated:s' +//> using options '-Wconf:msg=shadowing a nested class of a parent is deprecated:s' package a { trait Test { diff --git a/test/files/neg/t9127.scala b/test/files/neg/t9127.scala index 1871e63dfa2d..0e937b331301 100644 --- a/test/files/neg/t9127.scala +++ b/test/files/neg/t9127.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:missing-interpolator -Xfatal-warnings +//> using options -Xlint:missing-interpolator -Xfatal-warnings // trait X { diff --git a/test/files/neg/t9232.scala b/test/files/neg/t9232.scala index 453cc1be8a2b..bdc5977ef90a 100644 --- a/test/files/neg/t9232.scala +++ b/test/files/neg/t9232.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings final class Foo(val value: Int) object Foo { diff --git a/test/files/neg/t9398/match.scala b/test/files/neg/t9398/match.scala index 1329b3894588..95015888d5a3 100644 --- a/test/files/neg/t9398/match.scala +++ b/test/files/neg/t9398/match.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror class Test { // Should warn that CC(B2) isn't matched def test(c: CC): Unit = c match { diff --git a/test/files/neg/t9617/Test.scala b/test/files/neg/t9617/Test.scala index efdd94f8a15d..2d365a0ebf8f 100644 --- a/test/files/neg/t9617/Test.scala +++ b/test/files/neg/t9617/Test.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:deprecation +//> using options -Werror -Xlint:deprecation // Joint-compilation copy of test/files/neg/t10752/Test_2.scala object Test extends p1.DeprecatedClass { diff --git a/test/files/neg/t9636.scala b/test/files/neg/t9636.scala index 2c0b483e83bd..4c3293d20384 100644 --- a/test/files/neg/t9636.scala +++ b/test/files/neg/t9636.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint // import java.io._ diff --git a/test/files/neg/t9675.scala b/test/files/neg/t9675.scala index d4fcdbf4de55..66319c2886b6 100644 --- a/test/files/neg/t9675.scala +++ b/test/files/neg/t9675.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { case class A(x: String) diff --git a/test/files/neg/t9834.scala b/test/files/neg/t9834.scala index a0d5e15dbdba..cbdd6f59db89 100644 --- a/test/files/neg/t9834.scala +++ b/test/files/neg/t9834.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // object x { def apply() = 42 ; def update(i: Int) = () } diff --git a/test/files/neg/t9847.scala b/test/files/neg/t9847.scala index fba4739f169c..9e6abbffb167 100644 --- a/test/files/neg/t9847.scala +++ b/test/files/neg/t9847.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:deprecation -Ywarn-value-discard +//> using options -Werror -Xlint:deprecation -Ywarn-value-discard // trait T { diff --git a/test/files/neg/t9953.scala b/test/files/neg/t9953.scala index 957fc8f04e4b..a106a03920c7 100644 --- a/test/files/neg/t9953.scala +++ b/test/files/neg/t9953.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class X(val v: Int) extends AnyVal diff --git a/test/files/neg/trait_fields_deprecated_overriding.scala b/test/files/neg/trait_fields_deprecated_overriding.scala index aafc1088159c..73711e59b685 100644 --- a/test/files/neg/trait_fields_deprecated_overriding.scala +++ b/test/files/neg/trait_fields_deprecated_overriding.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // package scala diff --git a/test/files/neg/unchecked-abstract.scala b/test/files/neg/unchecked-abstract.scala index fc9e33a26c60..808128a310ec 100644 --- a/test/files/neg/unchecked-abstract.scala +++ b/test/files/neg/unchecked-abstract.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // trait Contravariant[-X] trait Invariant[X] diff --git a/test/files/neg/unchecked-impossible.scala b/test/files/neg/unchecked-impossible.scala index c2b78aff963a..8d84fb938921 100644 --- a/test/files/neg/unchecked-impossible.scala +++ b/test/files/neg/unchecked-impossible.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // final case class T2[+A, +B](a: A, b: B) diff --git a/test/files/neg/unchecked-knowable.scala b/test/files/neg/unchecked-knowable.scala index 10882cd3482a..39c967468890 100644 --- a/test/files/neg/unchecked-knowable.scala +++ b/test/files/neg/unchecked-knowable.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // /** Knowable - only final leaves */ sealed abstract class A1 diff --git a/test/files/neg/unchecked-refinement.scala b/test/files/neg/unchecked-refinement.scala index 2d3b27eda23a..491fcfaf33a0 100644 --- a/test/files/neg/unchecked-refinement.scala +++ b/test/files/neg/unchecked-refinement.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // // a.scala // Thu Sep 27 09:42:16 PDT 2012 diff --git a/test/files/neg/unchecked-suppress.scala b/test/files/neg/unchecked-suppress.scala index de9ce147cbea..9302ef9e9e16 100644 --- a/test/files/neg/unchecked-suppress.scala +++ b/test/files/neg/unchecked-suppress.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class A { def f(x: Any) = x match { diff --git a/test/files/neg/unchecked.scala b/test/files/neg/unchecked.scala index 56526347001e..eee51c67bce3 100644 --- a/test/files/neg/unchecked.scala +++ b/test/files/neg/unchecked.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // import language.existentials diff --git a/test/files/neg/unchecked2.scala b/test/files/neg/unchecked2.scala index 35148453869f..007b0b6a8d6e 100644 --- a/test/files/neg/unchecked2.scala +++ b/test/files/neg/unchecked2.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { // These warn because it can be statically shown they won't match. diff --git a/test/files/neg/unchecked3.scala b/test/files/neg/unchecked3.scala index c8b636233957..d077a59b8849 100644 --- a/test/files/neg/unchecked3.scala +++ b/test/files/neg/unchecked3.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed trait A2[T1] final class B2[T1, T2] extends A2[T1] diff --git a/test/files/neg/unicode-arrows-deprecation.scala b/test/files/neg/unicode-arrows-deprecation.scala index e77a7f0a5bec..7a9f05a24d68 100644 --- a/test/files/neg/unicode-arrows-deprecation.scala +++ b/test/files/neg/unicode-arrows-deprecation.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // object Test { val a: Int ⇒ Int = x ⇒ x diff --git a/test/files/neg/unit-returns-value.scala b/test/files/neg/unit-returns-value.scala index 6c4295e67864..89ce8d827b9f 100644 --- a/test/files/neg/unit-returns-value.scala +++ b/test/files/neg/unit-returns-value.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { def f: Unit = { diff --git a/test/files/neg/universal-lint.scala b/test/files/neg/universal-lint.scala index 86adb81c08c0..c01a573cf939 100644 --- a/test/files/neg/universal-lint.scala +++ b/test/files/neg/universal-lint.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Werror +//> using options -Xlint -Werror trait Test { def f = List("").map(_.isInstanceOf) diff --git a/test/files/neg/unreachablechar.scala b/test/files/neg/unreachablechar.scala index ae8d6c32f62c..b17fe0505efc 100644 --- a/test/files/neg/unreachablechar.scala +++ b/test/files/neg/unreachablechar.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Foo extends App{ 'f' match { diff --git a/test/files/neg/unsafe.scala b/test/files/neg/unsafe.scala index f026db2598e2..a0ab5ea5c202 100644 --- a/test/files/neg/unsafe.scala +++ b/test/files/neg/unsafe.scala @@ -1,5 +1,5 @@ -// scalac: --release:8 -Yrelease:java.lang +//> using options --release:8 -Yrelease:java.lang // javaVersion: 19+ // -Yrelease opens packages but does not override class definitions diff --git a/test/files/neg/unused.scala b/test/files/neg/unused.scala index ba0bb7ab7693..c9fae1b3afab 100644 --- a/test/files/neg/unused.scala +++ b/test/files/neg/unused.scala @@ -1,4 +1,4 @@ -// scalac: -Wunused:patvars -Werror +//> using options -Wunused:patvars -Werror case class C(a: Int, b: Int, c: Int, d: Int) diff --git a/test/files/neg/value-discard.scala b/test/files/neg/value-discard.scala index a6bde54878b3..21bb040c6e39 100644 --- a/test/files/neg/value-discard.scala +++ b/test/files/neg/value-discard.scala @@ -1,4 +1,4 @@ -// scalac: -Wvalue-discard -Werror +//> using options -Wvalue-discard -Werror final class UnusedTest { import scala.collection.mutable diff --git a/test/files/neg/varargs2.scala b/test/files/neg/varargs2.scala index 82ccf97cb03a..26c8da1e43a8 100644 --- a/test/files/neg/varargs2.scala +++ b/test/files/neg/varargs2.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 import annotation.* diff --git a/test/files/neg/variant-placeholders-future.scala b/test/files/neg/variant-placeholders-future.scala index 75296ff945b4..62ec844d76f1 100644 --- a/test/files/neg/variant-placeholders-future.scala +++ b/test/files/neg/variant-placeholders-future.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // object Test { type -_ = Int // error -_ not allowed as a type def name without backticks diff --git a/test/files/neg/view-bounds-deprecation.scala b/test/files/neg/view-bounds-deprecation.scala index 28928c009ddd..4d4e56f3bc7f 100644 --- a/test/files/neg/view-bounds-deprecation.scala +++ b/test/files/neg/view-bounds-deprecation.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // object Test { def f[A <% Int](a: A) = null diff --git a/test/files/neg/view-bounds-removal.scala b/test/files/neg/view-bounds-removal.scala index 4559e7175135..7c1d741d5cdb 100644 --- a/test/files/neg/view-bounds-removal.scala +++ b/test/files/neg/view-bounds-removal.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // object Test { def f[A <% Int](a: A) = null diff --git a/test/files/neg/virtpatmat_exhaust_big.scala b/test/files/neg/virtpatmat_exhaust_big.scala index ee0649c2b4e2..6f53cd24f28a 100644 --- a/test/files/neg/virtpatmat_exhaust_big.scala +++ b/test/files/neg/virtpatmat_exhaust_big.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed abstract class Z object Z { diff --git a/test/files/neg/virtpatmat_exhaust_compound.scala b/test/files/neg/virtpatmat_exhaust_compound.scala index 461656968a5c..4860d94558e6 100644 --- a/test/files/neg/virtpatmat_exhaust_compound.scala +++ b/test/files/neg/virtpatmat_exhaust_compound.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed trait Base case object O1 extends Base diff --git a/test/files/neg/virtpatmat_reach_null.scala b/test/files/neg/virtpatmat_reach_null.scala index 0a98530095ad..f6c8db0ca687 100644 --- a/test/files/neg/virtpatmat_reach_null.scala +++ b/test/files/neg/virtpatmat_reach_null.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed abstract class Const { final def excludes(other: Const) = diff --git a/test/files/neg/virtpatmat_reach_sealed_unsealed.scala b/test/files/neg/virtpatmat_reach_sealed_unsealed.scala index 300a0ab85cae..f0a8905f6d72 100644 --- a/test/files/neg/virtpatmat_reach_sealed_unsealed.scala +++ b/test/files/neg/virtpatmat_reach_sealed_unsealed.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed abstract class X sealed case class A(x: Int) extends X diff --git a/test/files/neg/virtpatmat_unreach_select.scala b/test/files/neg/virtpatmat_unreach_select.scala index db6caf85b1a3..dc49fe2dabd4 100644 --- a/test/files/neg/virtpatmat_unreach_select.scala +++ b/test/files/neg/virtpatmat_unreach_select.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // class Test { object severity extends Enumeration diff --git a/test/files/neg/warn-inferred-any.scala b/test/files/neg/warn-inferred-any.scala index a717a84ece00..069ddbafa42d 100644 --- a/test/files/neg/warn-inferred-any.scala +++ b/test/files/neg/warn-inferred-any.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint:infer-any +//> using options -Xfatal-warnings -Xlint:infer-any // trait Foo[-A <: AnyRef, +B <: AnyRef] { def run[U](x: A)(action: B => U): Boolean = ??? diff --git a/test/files/neg/warn-unused-explicits.scala b/test/files/neg/warn-unused-explicits.scala index eca406ccf5a4..b90ac269fd51 100644 --- a/test/files/neg/warn-unused-explicits.scala +++ b/test/files/neg/warn-unused-explicits.scala @@ -1,4 +1,4 @@ -// scalac: -Wunused:explicits -Werror +//> using options -Wunused:explicits -Werror // trait Context[A] trait ExplicitsOnly { diff --git a/test/files/neg/warn-unused-implicits.scala b/test/files/neg/warn-unused-implicits.scala index e61a65a4e7b4..2fd2b374f7cd 100644 --- a/test/files/neg/warn-unused-implicits.scala +++ b/test/files/neg/warn-unused-implicits.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:implicits +//> using options -Werror -Wunused:implicits // trait InterFace { diff --git a/test/files/neg/warn-unused-imports-b/warn-unused-imports_2.scala b/test/files/neg/warn-unused-imports-b/warn-unused-imports_2.scala index 47451b3e7743..d09377524abc 100644 --- a/test/files/neg/warn-unused-imports-b/warn-unused-imports_2.scala +++ b/test/files/neg/warn-unused-imports-b/warn-unused-imports_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:imports -Ymacro-annotations +//> using options -Werror -Wunused:imports -Ymacro-annotations // class Bippo { def length: Int = 123 diff --git a/test/files/neg/warn-unused-imports/sample_1.scala b/test/files/neg/warn-unused-imports/sample_1.scala index 04765849ee0e..80dcc59cfa10 100644 --- a/test/files/neg/warn-unused-imports/sample_1.scala +++ b/test/files/neg/warn-unused-imports/sample_1.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:imports +//> using options -Werror -Wunused:imports import language._ diff --git a/test/files/neg/warn-unused-imports/warn-unused-imports_2.scala b/test/files/neg/warn-unused-imports/warn-unused-imports_2.scala index 48f760d12753..d9fc9c69072f 100644 --- a/test/files/neg/warn-unused-imports/warn-unused-imports_2.scala +++ b/test/files/neg/warn-unused-imports/warn-unused-imports_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:imports +//> using options -Werror -Wunused:imports // class Bippo { def length: Int = 123 diff --git a/test/files/neg/warn-unused-locals.scala b/test/files/neg/warn-unused-locals.scala index 09c7c4067cd6..ef9068d4845e 100644 --- a/test/files/neg/warn-unused-locals.scala +++ b/test/files/neg/warn-unused-locals.scala @@ -1,4 +1,4 @@ -// scalac: -Wunused:locals -Werror +//> using options -Wunused:locals -Werror class Outer { class Inner diff --git a/test/files/neg/warn-unused-params.scala b/test/files/neg/warn-unused-params.scala index 956d3dd95743..f10c04559421 100644 --- a/test/files/neg/warn-unused-params.scala +++ b/test/files/neg/warn-unused-params.scala @@ -1,4 +1,4 @@ -// scalac: -Wunused:params -Werror +//> using options -Wunused:params -Werror // import Answers._ diff --git a/test/files/neg/warn-unused-patvars.scala b/test/files/neg/warn-unused-patvars.scala index 2f4930d5ac60..c3f8ad6ceacb 100644 --- a/test/files/neg/warn-unused-patvars.scala +++ b/test/files/neg/warn-unused-patvars.scala @@ -1,4 +1,4 @@ -// scalac: -Ywarn-unused:-patvars,_ -Xfatal-warnings +//> using options -Ywarn-unused:-patvars,_ -Xfatal-warnings // // verify no warning when -Ywarn-unused:-patvars diff --git a/test/files/neg/warn-unused-privates.scala b/test/files/neg/warn-unused-privates.scala index 30fad175955e..46e441ba882a 100644 --- a/test/files/neg/warn-unused-privates.scala +++ b/test/files/neg/warn-unused-privates.scala @@ -1,5 +1,5 @@ // -// scalac: -deprecation -Wunused:privates -Xfatal-warnings +//> using options -deprecation -Wunused:privates -Xfatal-warnings // class Bippy(a: Int, b: Int) { private def this(c: Int) = this(c, c) // warn diff --git a/test/files/neg/warn-useless-svuid.scala b/test/files/neg/warn-useless-svuid.scala index 25882dc1bcd6..3253cb8ec8e0 100644 --- a/test/files/neg/warn-useless-svuid.scala +++ b/test/files/neg/warn-useless-svuid.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:serial -Xfatal-warnings +//> using options -Xlint:serial -Xfatal-warnings // @SerialVersionUID(1L) class X diff --git a/test/files/neg/wconfSource1.scala b/test/files/neg/wconfSource1.scala index 19e191de5a19..0e7e8805170d 100644 --- a/test/files/neg/wconfSource1.scala +++ b/test/files/neg/wconfSource1.scala @@ -1,4 +1,4 @@ -// scalac: -Wconf:src=.*Source.*&cat=deprecation:e,src=Source1.scala&msg=statement:e,src=wconfSource1&msg=statement:e,src=wconfSource1.scala&msg=statement:i +//> using options -Wconf:src=.*Source.*&cat=deprecation:e,src=Source1.scala&msg=statement:e,src=wconfSource1&msg=statement:e,src=wconfSource1.scala&msg=statement:i // src=Source1.scala doesn't match: the pattern needs to start at a path segment (after `/`) // src=wconfSource1 doesn't match: the pattern needs to match to the end of the path (.scala) diff --git a/test/files/neg/wconfSource2.scala b/test/files/neg/wconfSource2.scala index 022356993884..549476972c76 100644 --- a/test/files/neg/wconfSource2.scala +++ b/test/files/neg/wconfSource2.scala @@ -1,4 +1,4 @@ -// scalac: -Wconf:src=test/files/neg/wconfSource2.scala&cat=deprecation:e,src=test/.*&msg=statement:i,src=/neg/.*&cat=feature-reflective-calls:i +//> using options -Wconf:src=test/files/neg/wconfSource2.scala&cat=deprecation:e,src=test/.*&msg=statement:i,src=/neg/.*&cat=feature-reflective-calls:i class C { @deprecated("", "") def dep = 0 diff --git a/test/files/neg/wildcards-future.scala b/test/files/neg/wildcards-future.scala index 54b7675813e7..f69e0b02f79d 100644 --- a/test/files/neg/wildcards-future.scala +++ b/test/files/neg/wildcards-future.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // object Test { val underscores: Map[_ <: AnyRef, _ >: Null] = Map() diff --git a/test/files/neg/xlint-captured.scala b/test/files/neg/xlint-captured.scala index e4acdf7bcc59..ded04c983428 100644 --- a/test/files/neg/xlint-captured.scala +++ b/test/files/neg/xlint-captured.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wperformance +//> using options -Werror -Wperformance object Test { var a, b = 0 // ok def mkStrangeCounter(): Int => Int = { diff --git a/test/files/neg/xml-parens.scala b/test/files/neg/xml-parens.scala index 490b23952804..b97bf73442b4 100644 --- a/test/files/neg/xml-parens.scala +++ b/test/files/neg/xml-parens.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:typer +//> using options -Ystop-after:typer // object Test { () diff --git a/test/files/neg/yimports-custom-b/C_2.scala b/test/files/neg/yimports-custom-b/C_2.scala index 09940d0a6d42..37901f6cbeba 100644 --- a/test/files/neg/yimports-custom-b/C_2.scala +++ b/test/files/neg/yimports-custom-b/C_2.scala @@ -1,4 +1,4 @@ -// scalac: -Yimports:hello.world.minidef +//> using options -Yimports:hello.world.minidef import hello.{world => hw} import hw.minidef.{Magic => Answer} diff --git a/test/files/neg/yimports-custom-b/minidef_1.scala b/test/files/neg/yimports-custom-b/minidef_1.scala index befc137b6ab6..78d2f3c03bfc 100644 --- a/test/files/neg/yimports-custom-b/minidef_1.scala +++ b/test/files/neg/yimports-custom-b/minidef_1.scala @@ -1,4 +1,4 @@ -// scalac: -Yimports:scala +//> using options -Yimports:scala package hello.world diff --git a/test/files/neg/yimports-custom/C_2.scala b/test/files/neg/yimports-custom/C_2.scala index 660a580d6fee..5a5482c51058 100644 --- a/test/files/neg/yimports-custom/C_2.scala +++ b/test/files/neg/yimports-custom/C_2.scala @@ -1,4 +1,4 @@ -// scalac: -Yimports:hello.world.minidef +//> using options -Yimports:hello.world.minidef class C { val v: Numb = Magic diff --git a/test/files/neg/yimports-masked/C_2.scala b/test/files/neg/yimports-masked/C_2.scala index e3eade457876..88d6e61a3e4b 100644 --- a/test/files/neg/yimports-masked/C_2.scala +++ b/test/files/neg/yimports-masked/C_2.scala @@ -1,4 +1,4 @@ -// scalac: -Yimports:scala,hello.world.minidef +//> using options -Yimports:scala,hello.world.minidef // import at top level or top of package disables implicit import. // the import can appear at any statement position, here, end of package. diff --git a/test/files/neg/yimports-nojava.scala b/test/files/neg/yimports-nojava.scala index 955685d16f7a..d7ef3646cdf4 100644 --- a/test/files/neg/yimports-nojava.scala +++ b/test/files/neg/yimports-nojava.scala @@ -1,4 +1,4 @@ -// scalac: -Yimports:scala,scala.Predef +//> using options -Yimports:scala,scala.Predef trait T { def f() = println("hello, world!") diff --git a/test/files/neg/yimports-nosuch.scala b/test/files/neg/yimports-nosuch.scala index c868edfa3d6c..617f0b84ba12 100644 --- a/test/files/neg/yimports-nosuch.scala +++ b/test/files/neg/yimports-nosuch.scala @@ -1,3 +1,3 @@ -// scalac: -Yimports:skala,scala.Predeff +//> using options -Yimports:skala,scala.Predeff // class C diff --git a/test/files/neg/yimports-predef.scala b/test/files/neg/yimports-predef.scala index 6165c566ac82..d6b2b7be4197 100644 --- a/test/files/neg/yimports-predef.scala +++ b/test/files/neg/yimports-predef.scala @@ -1,4 +1,4 @@ -// scalac: -Yimports:scala,scala.Predef +//> using options -Yimports:scala,scala.Predef // import Predef.{any2stringadd => _, _} diff --git a/test/files/neg/yimports-stable/C_2.scala b/test/files/neg/yimports-stable/C_2.scala index dfadaef12186..6c57e369be71 100644 --- a/test/files/neg/yimports-stable/C_2.scala +++ b/test/files/neg/yimports-stable/C_2.scala @@ -1,4 +1,4 @@ -// scalac: -Yimports:scala,scala.Predef,hello.world.potions +//> using options -Yimports:scala,scala.Predef,hello.world.potions // class C { val v: Numb = magic diff --git a/test/files/pos/and-future.scala b/test/files/pos/and-future.scala index f7e15e822ecc..27ace4bc8d54 100644 --- a/test/files/pos/and-future.scala +++ b/test/files/pos/and-future.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // trait X diff --git a/test/files/pos/annotated-outer.scala b/test/files/pos/annotated-outer.scala index 86f6fe675ace..51a26f2aa0b4 100644 --- a/test/files/pos/annotated-outer.scala +++ b/test/files/pos/annotated-outer.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test { trait MySet[A] trait MyMap[K, +V] { diff --git a/test/files/pos/auto-application.scala b/test/files/pos/auto-application.scala index 1e9ec1b1c209..293136c39b0d 100644 --- a/test/files/pos/auto-application.scala +++ b/test/files/pos/auto-application.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -deprecation -Xsource:3 +//> using options -Werror -deprecation -Xsource:3 // class Test { def a1(xs: List[String]): Int = xs.hashCode diff --git a/test/files/pos/byname-implicits-31/Main_2.scala b/test/files/pos/byname-implicits-31/Main_2.scala index 7f7962f38ef6..7d279d8b9cae 100644 --- a/test/files/pos/byname-implicits-31/Main_2.scala +++ b/test/files/pos/byname-implicits-31/Main_2.scala @@ -1,4 +1,4 @@ -// scalac: -Ycheck:_ +//> using options -Ycheck:_ object Test { util.lazily[Ping] } diff --git a/test/files/pos/byname-implicits-32/Main_2.scala b/test/files/pos/byname-implicits-32/Main_2.scala index 7f7962f38ef6..7d279d8b9cae 100644 --- a/test/files/pos/byname-implicits-32/Main_2.scala +++ b/test/files/pos/byname-implicits-32/Main_2.scala @@ -1,4 +1,4 @@ -// scalac: -Ycheck:_ +//> using options -Ycheck:_ object Test { util.lazily[Ping] } diff --git a/test/files/pos/byname-implicits-33/Main_2.scala b/test/files/pos/byname-implicits-33/Main_2.scala index d3a14994ca12..e1e0214b50c3 100644 --- a/test/files/pos/byname-implicits-33/Main_2.scala +++ b/test/files/pos/byname-implicits-33/Main_2.scala @@ -1,4 +1,4 @@ -// scalac: -Ycheck:_ +//> using options -Ycheck:_ object Test { util.lazily[Functor[Rec]] } diff --git a/test/files/pos/byname-implicits-34/Main_2.scala b/test/files/pos/byname-implicits-34/Main_2.scala index d2bcbe4645d9..249d845e0340 100644 --- a/test/files/pos/byname-implicits-34/Main_2.scala +++ b/test/files/pos/byname-implicits-34/Main_2.scala @@ -1,4 +1,4 @@ -// scalac: -Ycheck:_ +//> using options -Ycheck:_ object Test { util.lazily[Rec] } diff --git a/test/files/pos/case-object-add-serializable.scala b/test/files/pos/case-object-add-serializable.scala index 7728649414a7..b773f08a7e7c 100644 --- a/test/files/pos/case-object-add-serializable.scala +++ b/test/files/pos/case-object-add-serializable.scala @@ -1,4 +1,4 @@ -// scalac: -Xdev -Werror +//> using options -Xdev -Werror // Was: "warning: !!! base trait Serializable not found in basetypes of object Person. This might indicate incorrect caching of TypeRef#parents." // under -Xdev class Test { diff --git a/test/files/pos/classtag-pos.scala b/test/files/pos/classtag-pos.scala index f30c3c3c1685..32d7104c21f8 100644 --- a/test/files/pos/classtag-pos.scala +++ b/test/files/pos/classtag-pos.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos import scala.reflect.runtime.universe._ class A { diff --git a/test/files/pos/cycle/X_2.scala b/test/files/pos/cycle/X_2.scala index 68c22b86446f..3effc687d68f 100644 --- a/test/files/pos/cycle/X_2.scala +++ b/test/files/pos/cycle/X_2.scala @@ -1,4 +1,4 @@ -// scalac: -Ybreak-cycles +//> using options -Ybreak-cycles import bar.J_1._ //<--- illegal cyclic reference involving class X diff --git a/test/files/pos/debug-reset-local-attrs.scala b/test/files/pos/debug-reset-local-attrs.scala index 94d68ff9c0f7..cbc86a2c901f 100644 --- a/test/files/pos/debug-reset-local-attrs.scala +++ b/test/files/pos/debug-reset-local-attrs.scala @@ -1,2 +1,2 @@ -// scalac: -Ydebug +//> using options -Ydebug case class FT(f : Float) diff --git a/test/files/pos/delambdafy_t6260_method.scala b/test/files/pos/delambdafy_t6260_method.scala index 644e2681dc19..7c073c0d3066 100644 --- a/test/files/pos/delambdafy_t6260_method.scala +++ b/test/files/pos/delambdafy_t6260_method.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:method +//> using options -Ydelambdafy:method class Box[X](val x: X) extends AnyVal { def map[Y](f: X => Y): Box[Y] = ((bx: Box[X]) => new Box(f(bx.x)))(this) diff --git a/test/files/pos/dotless-targs-ranged.scala b/test/files/pos/dotless-targs-ranged.scala index 67d4f8d80dcb..a5182ef8fb93 100644 --- a/test/files/pos/dotless-targs-ranged.scala +++ b/test/files/pos/dotless-targs-ranged.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:true +//> using options -Yrangepos:true class A { def fn1 = List apply 1 def fn2 = List apply[Int] 2 diff --git a/test/files/pos/dotless-targs.scala b/test/files/pos/dotless-targs.scala index e88f7206dc6f..7e208d5198c5 100644 --- a/test/files/pos/dotless-targs.scala +++ b/test/files/pos/dotless-targs.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false +//> using options -Yrangepos:false class A { def fn1 = List apply 1 def fn2 = List apply[Int] 2 diff --git a/test/files/pos/exhaust_alternatives.scala b/test/files/pos/exhaust_alternatives.scala index 07bd1e01775e..dfa3e0919f23 100644 --- a/test/files/pos/exhaust_alternatives.scala +++ b/test/files/pos/exhaust_alternatives.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings sealed abstract class X sealed case class A(x: Boolean) extends X case object B extends X diff --git a/test/files/pos/existential-slow-compile1.scala b/test/files/pos/existential-slow-compile1.scala index 8d7007354624..4db352e85420 100644 --- a/test/files/pos/existential-slow-compile1.scala +++ b/test/files/pos/existential-slow-compile1.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:refchecks -Yrangepos +//> using options -Ystop-after:refchecks -Yrangepos class C { type L[+A] = scala.collection.immutable.List[A] def test = { diff --git a/test/files/pos/existential-slow-compile2.scala b/test/files/pos/existential-slow-compile2.scala index 901c06880d41..dcf2a526f365 100644 --- a/test/files/pos/existential-slow-compile2.scala +++ b/test/files/pos/existential-slow-compile2.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:refchecks -Yrangepos +//> using options -Ystop-after:refchecks -Yrangepos class C { class L[+A] def test = { diff --git a/test/files/pos/generic-sigs.scala b/test/files/pos/generic-sigs.scala index f1293f8da12f..841849e70c21 100644 --- a/test/files/pos/generic-sigs.scala +++ b/test/files/pos/generic-sigs.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings import language.existentials object A { diff --git a/test/files/pos/higherKinds.scala b/test/files/pos/higherKinds.scala index 083c3463f811..27f43ed0d061 100644 --- a/test/files/pos/higherKinds.scala +++ b/test/files/pos/higherKinds.scala @@ -1,4 +1,4 @@ -// scalac: -feature -Werror +//> using options -feature -Werror object Test { type F[A] <: List[A] def foo[G[X] <: List[X]](x: F[Int]): F[Int] = x diff --git a/test/files/pos/hk-existential-subtype.scala b/test/files/pos/hk-existential-subtype.scala index cc61b7deaa5d..9528c404545e 100644 --- a/test/files/pos/hk-existential-subtype.scala +++ b/test/files/pos/hk-existential-subtype.scala @@ -1,4 +1,4 @@ -// scalac: -language:higherKinds,existentials -Xfatal-warnings +//> using options -language:higherKinds,existentials -Xfatal-warnings class Functor[F[_]] object Functor { val someF: Functor[F] forSome { type F[_] } = new Functor[Option] diff --git a/test/files/pos/hkarray.scala b/test/files/pos/hkarray.scala index 11e7b50f53ca..93457452dbbb 100644 --- a/test/files/pos/hkarray.scala +++ b/test/files/pos/hkarray.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -language:higherKinds +//> using options -Xfatal-warnings -language:higherKinds trait Foo[CC[_]] { } class Bip { diff --git a/test/files/pos/i11371.scala b/test/files/pos/i11371.scala index 74156b777c9f..c895d83e6d20 100644 --- a/test/files/pos/i11371.scala +++ b/test/files/pos/i11371.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // object HelloWorld { def whileLoop: Int = { diff --git a/test/files/pos/ignore-wperf.scala b/test/files/pos/ignore-wperf.scala index 24c4e6a5c4ba..b63323bd07fb 100644 --- a/test/files/pos/ignore-wperf.scala +++ b/test/files/pos/ignore-wperf.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wperformance -Wconf:cat=lint-performance:s +//> using options -Werror -Wperformance -Wconf:cat=lint-performance:s class C { var x = 0 diff --git a/test/files/pos/import-future.scala b/test/files/pos/import-future.scala index 30e499ca0bb1..2443c33e9532 100644 --- a/test/files/pos/import-future.scala +++ b/test/files/pos/import-future.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // import java.io as jio diff --git a/test/files/pos/inline-access-levels/A_1.scala b/test/files/pos/inline-access-levels/A_1.scala index ff2620161c65..b8fa46ba6a71 100644 --- a/test/files/pos/inline-access-levels/A_1.scala +++ b/test/files/pos/inline-access-levels/A_1.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Wopt -Werror +//> using options -opt:inline:** -Wopt -Werror package test object A { diff --git a/test/files/pos/inline-access-levels/Test_2.scala b/test/files/pos/inline-access-levels/Test_2.scala index a9aedd61e0b8..97937c80b43d 100644 --- a/test/files/pos/inline-access-levels/Test_2.scala +++ b/test/files/pos/inline-access-levels/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Wopt -Werror +//> using options -opt:inline:** -Wopt -Werror package test object Test { diff --git a/test/files/pos/java-import-static-from-subclass/Test.scala b/test/files/pos/java-import-static-from-subclass/Test.scala index 7d2326b519e1..4b7e4a5d159e 100644 --- a/test/files/pos/java-import-static-from-subclass/Test.scala +++ b/test/files/pos/java-import-static-from-subclass/Test.scala @@ -1,2 +1,2 @@ -// scalac: -Ypickle-java +//> using options -Ypickle-java class Test diff --git a/test/files/pos/lazyref-autoapply.scala b/test/files/pos/lazyref-autoapply.scala index d255b95bfdc5..37642091d579 100644 --- a/test/files/pos/lazyref-autoapply.scala +++ b/test/files/pos/lazyref-autoapply.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xsource:3 -Xlint +//> using options -Werror -Xsource:3 -Xlint object Test { def doti(i: Int): Product = { diff --git a/test/files/pos/macro-annot/t12366.scala b/test/files/pos/macro-annot/t12366.scala index 9b75bb3c6d1f..885919ec411d 100644 --- a/test/files/pos/macro-annot/t12366.scala +++ b/test/files/pos/macro-annot/t12366.scala @@ -1,4 +1,4 @@ -// scalac: -Ymacro-annotations +//> using options -Ymacro-annotations object Test extends App { @deprecated diff --git a/test/files/pos/macro-deprecate-dont-touch-backquotedidents.scala b/test/files/pos/macro-deprecate-dont-touch-backquotedidents.scala index 204a41ca94b0..a32fc61e7311 100644 --- a/test/files/pos/macro-deprecate-dont-touch-backquotedidents.scala +++ b/test/files/pos/macro-deprecate-dont-touch-backquotedidents.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings object Test1 { val `macro` = ??? } diff --git a/test/files/pos/native-warning.scala b/test/files/pos/native-warning.scala index 7f47e94604a9..73a22ceaecc7 100644 --- a/test/files/pos/native-warning.scala +++ b/test/files/pos/native-warning.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -deprecation +//> using options -Xfatal-warnings -deprecation class A { @native def setup(): Unit diff --git a/test/files/pos/nonlocal-unchecked.scala b/test/files/pos/nonlocal-unchecked.scala index 818517aea8d5..62487c47f419 100644 --- a/test/files/pos/nonlocal-unchecked.scala +++ b/test/files/pos/nonlocal-unchecked.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings class A { def f: Boolean = { val xs = Nil map (_ => return false) diff --git a/test/files/pos/nullary-override-3.scala b/test/files/pos/nullary-override-3.scala index 171ed5be8edc..2ab5e5ce86c1 100644 --- a/test/files/pos/nullary-override-3.scala +++ b/test/files/pos/nullary-override-3.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:nowarn -Xsource:3 +//> using options -Werror -Wunused:nowarn -Xsource:3 // class C extends java.lang.CharSequence { def charAt(x$1: Int): Char = ??? diff --git a/test/files/pos/open-infix-future.scala b/test/files/pos/open-infix-future.scala index 8fee778d40cb..7b09cb54cf83 100644 --- a/test/files/pos/open-infix-future.scala +++ b/test/files/pos/open-infix-future.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // open class A diff --git a/test/files/pos/package-ob-case/A_1.scala b/test/files/pos/package-ob-case/A_1.scala index 39f68eef9dbb..7101da2092ed 100644 --- a/test/files/pos/package-ob-case/A_1.scala +++ b/test/files/pos/package-ob-case/A_1.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings package foo { package object foo { case class X(z: Int) { } diff --git a/test/files/pos/package-ob-case/B_2.scala b/test/files/pos/package-ob-case/B_2.scala index 39f68eef9dbb..7101da2092ed 100644 --- a/test/files/pos/package-ob-case/B_2.scala +++ b/test/files/pos/package-ob-case/B_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings package foo { package object foo { case class X(z: Int) { } diff --git a/test/files/pos/parens-for-params-silent.scala b/test/files/pos/parens-for-params-silent.scala index 6eb07a5c3c8a..b0ee04fd6bd9 100644 --- a/test/files/pos/parens-for-params-silent.scala +++ b/test/files/pos/parens-for-params-silent.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wconf:msg=lambda-parens:s -Xsource:3 +//> using options -Werror -Wconf:msg=lambda-parens:s -Xsource:3 class C { def f = { diff --git a/test/files/pos/patmat-hk.scala b/test/files/pos/patmat-hk.scala index 95f08e018d25..5e150da4695f 100644 --- a/test/files/pos/patmat-hk.scala +++ b/test/files/pos/patmat-hk.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 case class Foo[F[_]]() case class APair[F[_], G[_], A](f: F[A], g: G[A]) diff --git a/test/files/pos/patmat-suppress.scala b/test/files/pos/patmat-suppress.scala index 1e408db0a423..e144193b1316 100644 --- a/test/files/pos/patmat-suppress.scala +++ b/test/files/pos/patmat-suppress.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xno-patmat-analysis +//> using options -Xfatal-warnings -Xno-patmat-analysis // // test that none of these warn due to -Xno-patmat-analysis // tests taken from test/files/neg/patmatexhaust.scala, test/files/neg/pat_unreachable.scala diff --git a/test/files/pos/patmat_list_rewrite.scala b/test/files/pos/patmat_list_rewrite.scala index abd20fb910ab..693cf0a30b77 100644 --- a/test/files/pos/patmat_list_rewrite.scala +++ b/test/files/pos/patmat_list_rewrite.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // class C { def m(xs: List[String]) = xs match { diff --git a/test/files/pos/polymorphic-case-class.scala b/test/files/pos/polymorphic-case-class.scala index a7e8eb8bb0fd..f133ae8a1bf5 100644 --- a/test/files/pos/polymorphic-case-class.scala +++ b/test/files/pos/polymorphic-case-class.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // // no unchecked warnings case class Bippy[T, -U, +V](x: T, z: V) { } diff --git a/test/files/pos/rangepos-anonapply.scala b/test/files/pos/rangepos-anonapply.scala index 49e0e1f2ff9c..d6b8a11d8e3b 100644 --- a/test/files/pos/rangepos-anonapply.scala +++ b/test/files/pos/rangepos-anonapply.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos class Test { trait PropTraverser { def apply(x: Int): Unit = {} diff --git a/test/files/pos/rangepos-patmat.scala b/test/files/pos/rangepos-patmat.scala index 0c40266dab4e..3a90d1936a10 100644 --- a/test/files/pos/rangepos-patmat.scala +++ b/test/files/pos/rangepos-patmat.scala @@ -1,5 +1,5 @@ -// scalac: -Yrangepos +//> using options -Yrangepos class Foo { def test: PartialFunction[Any, String] = { case _ => "ok" } } diff --git a/test/files/pos/rangepos.scala b/test/files/pos/rangepos.scala index fc511a2f205a..ebebd32c137a 100644 --- a/test/files/pos/rangepos.scala +++ b/test/files/pos/rangepos.scala @@ -1,5 +1,5 @@ -// scalac: -Yrangepos +//> using options -Yrangepos class Foo(val x: Double) extends AnyVal { } object Pretty { diff --git a/test/files/pos/setter-not-implicit.scala b/test/files/pos/setter-not-implicit.scala index 4836cf6304c8..4cb6b5cd88bd 100644 --- a/test/files/pos/setter-not-implicit.scala +++ b/test/files/pos/setter-not-implicit.scala @@ -1,5 +1,5 @@ -// scalac: -feature -Xfatal-warnings +//> using options -feature -Xfatal-warnings object O { implicit var x: Int = 0 } diff --git a/test/files/pos/skunky-expansion.scala b/test/files/pos/skunky-expansion.scala index d3f26c83a210..15f84bb9234b 100644 --- a/test/files/pos/skunky-expansion.scala +++ b/test/files/pos/skunky-expansion.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wnonunit-statement +//> using options -Werror -Wnonunit-statement // import scala.reflect.macros._ import scala.reflect.api.TypeCreator diff --git a/test/files/pos/skunky.scala b/test/files/pos/skunky.scala index 1c5f5730a0ab..98a8604b2f43 100644 --- a/test/files/pos/skunky.scala +++ b/test/files/pos/skunky.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wnonunit-statement +//> using options -Werror -Wnonunit-statement import scala.reflect.macros._ diff --git a/test/files/pos/t10093.scala b/test/files/pos/t10093.scala index 82e7f860cf39..1f5da004680b 100644 --- a/test/files/pos/t10093.scala +++ b/test/files/pos/t10093.scala @@ -1,5 +1,5 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings class A[@specialized(Int) T](val value: T) { trait B def useValue(x:T): Unit = () diff --git a/test/files/pos/t10185.scala b/test/files/pos/t10185.scala index 36338d7576a0..5334a1c0177e 100644 --- a/test/files/pos/t10185.scala +++ b/test/files/pos/t10185.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 // sealed trait Foo[A, F[_ <: A]] case class Bar[A, F[_ <: A]]() extends Foo[A, F] diff --git a/test/files/pos/t10195.scala b/test/files/pos/t10195.scala index 86fe175bdcc1..58e23de346c0 100644 --- a/test/files/pos/t10195.scala +++ b/test/files/pos/t10195.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 // sealed trait Foo[F[_]] case class Bar[F[_]]() extends Foo[F] diff --git a/test/files/pos/t10195b.scala b/test/files/pos/t10195b.scala index 78272e523222..0bf710f97e49 100644 --- a/test/files/pos/t10195b.scala +++ b/test/files/pos/t10195b.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 // sealed trait Foo[F[_]] case class Bar[F[_]]() extends Foo[F] diff --git a/test/files/pos/t10197.scala b/test/files/pos/t10197.scala index 8ccb8dc73529..6c69aa0d2405 100644 --- a/test/files/pos/t10197.scala +++ b/test/files/pos/t10197.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 import scala.language.higherKinds final case class Getter[S, A](get: S => A) diff --git a/test/files/pos/t10213.scala b/test/files/pos/t10213.scala index f5d76d1e6aad..44b1cf521049 100644 --- a/test/files/pos/t10213.scala +++ b/test/files/pos/t10213.scala @@ -1,6 +1,6 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 import scala.language.higherKinds final case class Coproduct[F[_], G[_], A](run: Either[F[A], G[A]]) diff --git a/test/files/pos/t10238.scala b/test/files/pos/t10238.scala index 6ae974052f58..bfb6f23044ad 100644 --- a/test/files/pos/t10238.scala +++ b/test/files/pos/t10238.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 object Test { diff --git a/test/files/pos/t10270/Main_2.scala b/test/files/pos/t10270/Main_2.scala index 58d21e8e0c00..a0b7c5aff01a 100644 --- a/test/files/pos/t10270/Main_2.scala +++ b/test/files/pos/t10270/Main_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Ywarn-unused:imports +//> using options -Xfatal-warnings -Ywarn-unused:imports object Main extends App { diff --git a/test/files/pos/t10288.scala b/test/files/pos/t10288.scala index 59d8d96cf092..4b2b32bbb281 100644 --- a/test/files/pos/t10288.scala +++ b/test/files/pos/t10288.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 trait Target trait Unrelated diff --git a/test/files/pos/t10296-before/Unused_2.scala b/test/files/pos/t10296-before/Unused_2.scala index cdde22bb0d1f..5d00b5ba284e 100644 --- a/test/files/pos/t10296-before/Unused_2.scala +++ b/test/files/pos/t10296-before/Unused_2.scala @@ -1,5 +1,5 @@ -// scalac: -Xfatal-warnings -Xlint:unused -Ywarn-macros:before +//> using options -Xfatal-warnings -Xlint:unused -Ywarn-macros:before // import scala.language.experimental.macros diff --git a/test/files/pos/t10296/Unused_2.scala b/test/files/pos/t10296/Unused_2.scala index 7f1e2ec869a2..adca67fbf0bf 100644 --- a/test/files/pos/t10296/Unused_2.scala +++ b/test/files/pos/t10296/Unused_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint:unused +//> using options -Xfatal-warnings -Xlint:unused import scala.language.experimental.macros diff --git a/test/files/pos/t10372.scala b/test/files/pos/t10372.scala index 79003178775b..1a22e89c8d76 100644 --- a/test/files/pos/t10372.scala +++ b/test/files/pos/t10372.scala @@ -1,5 +1,5 @@ // -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 // import scala.language.higherKinds import scala.language.implicitConversions diff --git a/test/files/pos/t10373.scala b/test/files/pos/t10373.scala index f1c62ec0726b..f913cfe64fb7 100644 --- a/test/files/pos/t10373.scala +++ b/test/files/pos/t10373.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror sealed abstract class Foo { def bar(): Unit = this match { case Foo_1() => //do something diff --git a/test/files/pos/t10394.scala b/test/files/pos/t10394.scala index 3698595a681f..51ce1062b8bf 100644 --- a/test/files/pos/t10394.scala +++ b/test/files/pos/t10394.scala @@ -1,5 +1,5 @@ -// scalac: -Xfatal-warnings -Ywarn-unused:patvars +//> using options -Xfatal-warnings -Ywarn-unused:patvars trait T { def f = for (i: Int <- List(42)) yield i } diff --git a/test/files/pos/t10502.scala b/test/files/pos/t10502.scala index 38cd733e646a..0222e731211f 100644 --- a/test/files/pos/t10502.scala +++ b/test/files/pos/t10502.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings final class Box[A](val unwrap: A) diff --git a/test/files/pos/t10589-case-implicit-param/cc_2.scala b/test/files/pos/t10589-case-implicit-param/cc_2.scala index 17a1dce15ca9..48281f051bac 100644 --- a/test/files/pos/t10589-case-implicit-param/cc_2.scala +++ b/test/files/pos/t10589-case-implicit-param/cc_2.scala @@ -1,4 +1,4 @@ -// scalac: -Ymacro-annotations +//> using options -Ymacro-annotations trait T[A] @macid diff --git a/test/files/pos/t10589-case-implicit-param/macros_1.scala b/test/files/pos/t10589-case-implicit-param/macros_1.scala index 700c925d879c..d3eeb8bf05ce 100644 --- a/test/files/pos/t10589-case-implicit-param/macros_1.scala +++ b/test/files/pos/t10589-case-implicit-param/macros_1.scala @@ -1,4 +1,4 @@ -// scalac: -Ymacro-annotations +//> using options -Ymacro-annotations import scala.annotation.StaticAnnotation import scala.language.experimental.macros diff --git a/test/files/pos/t10623.scala b/test/files/pos/t10623.scala index d48273914f76..93cc77a4abd9 100644 --- a/test/files/pos/t10623.scala +++ b/test/files/pos/t10623.scala @@ -1,5 +1,5 @@ -// scalac: -Xfatal-warnings -Xlint:unused +//> using options -Xfatal-warnings -Xlint:unused // object `package` { diff --git a/test/files/pos/t10643.scala b/test/files/pos/t10643.scala index 99c4cf4c9302..689f2b5a8db0 100644 --- a/test/files/pos/t10643.scala +++ b/test/files/pos/t10643.scala @@ -1,5 +1,5 @@ -// scalac: -Yrangepos +//> using options -Yrangepos trait AA trait BB diff --git a/test/files/pos/t10644/Objs_1.scala b/test/files/pos/t10644/Objs_1.scala index 804cfa435c18..7f8649e5599f 100644 --- a/test/files/pos/t10644/Objs_1.scala +++ b/test/files/pos/t10644/Objs_1.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings case object A ; case object B object C { // inferred refinement type `Product with Serializable` of val `objs` has owner `C` diff --git a/test/files/pos/t10644/Test_2.scala b/test/files/pos/t10644/Test_2.scala index 029cee6ad301..0e5ba627e2ea 100644 --- a/test/files/pos/t10644/Test_2.scala +++ b/test/files/pos/t10644/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings object Test { // Should not result in the spurious warning: // comparing non-null values of types Product with Serializable diff --git a/test/files/pos/t10680.scala b/test/files/pos/t10680.scala index 7a2c64bfb0e1..d1ee3b3a5459 100644 --- a/test/files/pos/t10680.scala +++ b/test/files/pos/t10680.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings object MyEnum extends Enumeration { val e1 = Value("e1") val e2 = Value("e2") diff --git a/test/files/pos/t10763.scala b/test/files/pos/t10763.scala index a18f9cd8ccfc..f4c0bbbf3c25 100644 --- a/test/files/pos/t10763.scala +++ b/test/files/pos/t10763.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Wunused +//> using options -Werror -Wunused class Test { def xsUnused = { diff --git a/test/files/pos/t11303.scala b/test/files/pos/t11303.scala index d094bf900048..2998610eaab8 100644 --- a/test/files/pos/t11303.scala +++ b/test/files/pos/t11303.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test { sealed trait Gadt[F[_], O, R] diff --git a/test/files/pos/t11525.scala b/test/files/pos/t11525.scala index cc8727281810..94f63b23e1e5 100644 --- a/test/files/pos/t11525.scala +++ b/test/files/pos/t11525.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:refchecks -Ydebug -uniqid +//> using options -Ystop-after:refchecks -Ydebug -uniqid package java.lang /* This is a pretty random test that very indirectly tests `unique`ing of `ObjectTpeJavaRef` diff --git a/test/files/pos/t11534.scala b/test/files/pos/t11534.scala index bab4bd956d87..dd3808195b75 100644 --- a/test/files/pos/t11534.scala +++ b/test/files/pos/t11534.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test1 { val g: scala.tools.nsc.Global = ??? import g._ diff --git a/test/files/pos/t11538.scala b/test/files/pos/t11538.scala index 13101365d02d..0c02d81241b7 100644 --- a/test/files/pos/t11538.scala +++ b/test/files/pos/t11538.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -deprecation -stop:refchecks +//> using options -Werror -deprecation -stop:refchecks package t11538 @deprecated("not for you", since = "just now") diff --git a/test/files/pos/t11603.scala b/test/files/pos/t11603.scala index 01a59a532bac..8d943b1ae6fc 100644 --- a/test/files/pos/t11603.scala +++ b/test/files/pos/t11603.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror class C { def m(x: true) = x match { case true => println("the one true path") diff --git a/test/files/pos/t11663/B_2.scala b/test/files/pos/t11663/B_2.scala index 6426225f7a85..5c2513618f28 100644 --- a/test/files/pos/t11663/B_2.scala +++ b/test/files/pos/t11663/B_2.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Wopt:_ +//> using options -opt:inline:** -Wopt:_ class B { def bar(c: A) = c.m } diff --git a/test/files/pos/t11681.scala b/test/files/pos/t11681.scala index 0976e86fd7b1..68638b12e4ad 100644 --- a/test/files/pos/t11681.scala +++ b/test/files/pos/t11681.scala @@ -1,5 +1,5 @@ // -// scalac: -Wunused:privates -Werror +//> using options -Wunused:privates -Werror // package com diff --git a/test/files/pos/t11813.scala b/test/files/pos/t11813.scala index 0e827625c690..accc6b4e2377 100644 --- a/test/files/pos/t11813.scala +++ b/test/files/pos/t11813.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:implicit-recursion +//> using options -Werror -Xlint:implicit-recursion // package warner diff --git a/test/files/pos/t11856.scala b/test/files/pos/t11856.scala index 6c8b500c7245..69831172dc1d 100644 --- a/test/files/pos/t11856.scala +++ b/test/files/pos/t11856.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:params +//> using options -Werror -Wunused:params class C { def answer: 42 = 42 diff --git a/test/files/pos/t11895.scala b/test/files/pos/t11895.scala index 98230bc5797b..3f58faf1b246 100644 --- a/test/files/pos/t11895.scala +++ b/test/files/pos/t11895.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -deprecation +//> using options -Werror -deprecation // trait Bar { trait Foo diff --git a/test/files/pos/t11917/Z.scala b/test/files/pos/t11917/Z.scala index c2ca34faf005..13b19b20ec8e 100644 --- a/test/files/pos/t11917/Z.scala +++ b/test/files/pos/t11917/Z.scala @@ -1,4 +1,4 @@ -// scalac: -Ypickle-java +//> using options -Ypickle-java package bar diff --git a/test/files/pos/t11921b.scala b/test/files/pos/t11921b.scala index 38870f0cb53b..fd7a68fe0663 100644 --- a/test/files/pos/t11921b.scala +++ b/test/files/pos/t11921b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wconf:msg=legacy-binding:s -Xsource:3 +//> using options -Werror -Wconf:msg=legacy-binding:s -Xsource:3 object test1 { diff --git a/test/files/pos/t11921c.scala b/test/files/pos/t11921c.scala index d78439424f4e..d10aa603669a 100644 --- a/test/files/pos/t11921c.scala +++ b/test/files/pos/t11921c.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // test/scaladoc/resources/t5784.scala diff --git a/test/files/pos/t11952.scala b/test/files/pos/t11952.scala index 6b93cfb6f1e8..5da46f3e6c2b 100644 --- a/test/files/pos/t11952.scala +++ b/test/files/pos/t11952.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint -nowarn +//> using options -Werror -Xlint -nowarn // // nowarn should mean no warnings are emitted, // irrespective of other flags, and also no diff --git a/test/files/pos/t11964.scala b/test/files/pos/t11964.scala index 4f0bd8f73726..86b51f6ae33a 100644 --- a/test/files/pos/t11964.scala +++ b/test/files/pos/t11964.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint object Hmm { def zxc(b: Int*)(implicit x: Int = 3) = "" + b + x diff --git a/test/files/pos/t11966.scala b/test/files/pos/t11966.scala index b662e71322da..4802c8c602cf 100644 --- a/test/files/pos/t11966.scala +++ b/test/files/pos/t11966.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -deprecation +//> using options -Werror -deprecation // object Test { val original = """\/ \/ /\""" diff --git a/test/files/pos/t12006.scala b/test/files/pos/t12006.scala index a4abecfaf62f..013ba24a3e2f 100644 --- a/test/files/pos/t12006.scala +++ b/test/files/pos/t12006.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // see https://github.com/scala/bug/issues/12006 // java.io.InputStream looks like a SAM (read method), diff --git a/test/files/pos/t12159b/s_2.scala b/test/files/pos/t12159b/s_2.scala index 881204f4d830..e2d65134e159 100644 --- a/test/files/pos/t12159b/s_2.scala +++ b/test/files/pos/t12159b/s_2.scala @@ -1,5 +1,5 @@ // javaVersion: 17+ -// scalac: -Werror +//> using options -Werror package p class C { diff --git a/test/files/pos/t12186.scala b/test/files/pos/t12186.scala index b8a72238510f..a1ca8e05dc68 100644 --- a/test/files/pos/t12186.scala +++ b/test/files/pos/t12186.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // this is remodeling of the scala package object and scala.collection.immutable.{ List, ::, Nil } // in order to: diff --git a/test/files/pos/t12225.scala b/test/files/pos/t12225.scala index baae67d36bf8..76a8b9a2ffb4 100644 --- a/test/files/pos/t12225.scala +++ b/test/files/pos/t12225.scala @@ -1,4 +1,4 @@ -// scalac: -Ydebug +//> using options -Ydebug object Test { def foo(arr: Array[Int]): Unit = { val Array(x, y) = arr diff --git a/test/files/pos/t12240.scala b/test/files/pos/t12240.scala index a04ef0e734cf..7f34ab67408d 100644 --- a/test/files/pos/t12240.scala +++ b/test/files/pos/t12240.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint:strict-unsealed-patmat +//> using options -Xfatal-warnings -Xlint:strict-unsealed-patmat // object Test { diff --git a/test/files/pos/t12250.scala b/test/files/pos/t12250.scala index ec5be8411860..38add8ba16d6 100644 --- a/test/files/pos/t12250.scala +++ b/test/files/pos/t12250.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror final case class Foo(value: String) object Foo { diff --git a/test/files/pos/t12250b.scala b/test/files/pos/t12250b.scala index b47977512fd7..cf84e9bea5a6 100644 --- a/test/files/pos/t12250b.scala +++ b/test/files/pos/t12250b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror sealed case class Sub1(str: String) final case class Sup1(str: String) extends Sup0 diff --git a/test/files/pos/t12254.scala b/test/files/pos/t12254.scala index a44393063d60..e9d5c084164c 100644 --- a/test/files/pos/t12254.scala +++ b/test/files/pos/t12254.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint:strict-unsealed-patmat +//> using options -Xfatal-warnings -Xlint:strict-unsealed-patmat // object Test { diff --git a/test/files/pos/t12277.scala b/test/files/pos/t12277.scala index 6ec5050c9a1d..8737de45ad7e 100644 --- a/test/files/pos/t12277.scala +++ b/test/files/pos/t12277.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:strict-unsealed-patmat -Werror +//> using options -Xlint:strict-unsealed-patmat -Werror sealed trait A final case class B() extends A final case class C() extends A diff --git a/test/files/pos/t12304.scala b/test/files/pos/t12304.scala index 3b84224dd3ab..28160f2e7501 100644 --- a/test/files/pos/t12304.scala +++ b/test/files/pos/t12304.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror class Foo class Test { diff --git a/test/files/pos/t12326.scala b/test/files/pos/t12326.scala index 7a8eac907c32..464a63590de0 100644 --- a/test/files/pos/t12326.scala +++ b/test/files/pos/t12326.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:imports -Wconf:origin=scala.collection.mutable._:s,origin=scala.concurrent.ExecutionContext.Implicits._:s +//> using options -Werror -Wunused:imports -Wconf:origin=scala.collection.mutable._:s,origin=scala.concurrent.ExecutionContext.Implicits._:s import scala.collection.mutable._ diff --git a/test/files/pos/t12326b.scala b/test/files/pos/t12326b.scala index 93dfec40fdf3..1b6049edad3b 100644 --- a/test/files/pos/t12326b.scala +++ b/test/files/pos/t12326b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:imports +//> using options -Werror -Wunused:imports import annotation._ diff --git a/test/files/pos/t12392.scala b/test/files/pos/t12392.scala index 056fd1ae2d17..339c8898c0ea 100644 --- a/test/files/pos/t12392.scala +++ b/test/files/pos/t12392.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror import scala.reflect.api.Universe object Test { diff --git a/test/files/pos/t12398.scala b/test/files/pos/t12398.scala index ebd6bda4cf8e..2d2708d46cd7 100644 --- a/test/files/pos/t12398.scala +++ b/test/files/pos/t12398.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror import scala.reflect.api.Universe object Test { diff --git a/test/files/pos/t12398b.scala b/test/files/pos/t12398b.scala index 9337a6e8e0fd..546992be6d82 100644 --- a/test/files/pos/t12398b.scala +++ b/test/files/pos/t12398b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror import scala.reflect.api.Universe object Test { diff --git a/test/files/pos/t12554.scala b/test/files/pos/t12554.scala index ea5880d6779d..c18b46f6261d 100644 --- a/test/files/pos/t12554.scala +++ b/test/files/pos/t12554.scala @@ -1,4 +1,4 @@ -// scalac: -Yimports:java.lang,scala,scala.Predef,scala.util.chaining +//> using options -Yimports:java.lang,scala,scala.Predef,scala.util.chaining class C { def f = 42.tap(println) diff --git a/test/files/pos/t12554b/s_2.scala b/test/files/pos/t12554b/s_2.scala index c4338906d2e4..653d0442ccd8 100644 --- a/test/files/pos/t12554b/s_2.scala +++ b/test/files/pos/t12554b/s_2.scala @@ -1,5 +1,5 @@ -// scalac: -Yimports:java.lang,scala,scala.Predef,p,q,r.Z +//> using options -Yimports:java.lang,scala,scala.Predef,p,q,r.Z object Test extends App { println(X) diff --git a/test/files/pos/t12600.scala b/test/files/pos/t12600.scala index fc86c2a9fc28..41e9b33e8620 100644 --- a/test/files/pos/t12600.scala +++ b/test/files/pos/t12600.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused:_ +//> using options -Werror -Wunused:_ class Private { private type Curry[A] = { type T[B] = Either[A, B] } def m2[T[A]]: Unit = () diff --git a/test/files/pos/t12645/Macro_1.scala b/test/files/pos/t12645/Macro_1.scala index 827ba992fe77..870c84ef1549 100644 --- a/test/files/pos/t12645/Macro_1.scala +++ b/test/files/pos/t12645/Macro_1.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 import language.experimental.macros import scala.reflect.macros.whitebox.Context diff --git a/test/files/pos/t12645/Test_2.scala b/test/files/pos/t12645/Test_2.scala index 520bd7de7dd6..ab71fab4b2b6 100644 --- a/test/files/pos/t12645/Test_2.scala +++ b/test/files/pos/t12645/Test_2.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 object Test extends App { def f(s: String) = println(s) diff --git a/test/files/pos/t12645b/Test_2.scala b/test/files/pos/t12645b/Test_2.scala index eb9942baf848..8b5fa24c10c4 100644 --- a/test/files/pos/t12645b/Test_2.scala +++ b/test/files/pos/t12645b/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 object Test extends App { Foo.ctx.quote(42).ast.id diff --git a/test/files/pos/t12645b/macro_1.scala b/test/files/pos/t12645b/macro_1.scala index 732ae1fd7d20..888390bf8831 100644 --- a/test/files/pos/t12645b/macro_1.scala +++ b/test/files/pos/t12645b/macro_1.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 import scala.language.experimental.macros import scala.reflect.macros.whitebox.Context diff --git a/test/files/pos/t12646.scala b/test/files/pos/t12646.scala index 72118974d5fb..b0e3f66f5b9a 100644 --- a/test/files/pos/t12646.scala +++ b/test/files/pos/t12646.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Wunused:params +//> using options -Werror -Wunused:params trait T { private var x: String = _ diff --git a/test/files/pos/t12647/Macro_1.scala b/test/files/pos/t12647/Macro_1.scala index a808e46089a3..cbec50a79d11 100644 --- a/test/files/pos/t12647/Macro_1.scala +++ b/test/files/pos/t12647/Macro_1.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 import scala.reflect.macros.whitebox.Context diff --git a/test/files/pos/t12647/Resolve_2.scala b/test/files/pos/t12647/Resolve_2.scala index dab65c6a310b..97cc4c354007 100644 --- a/test/files/pos/t12647/Resolve_2.scala +++ b/test/files/pos/t12647/Resolve_2.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 import language.experimental.macros diff --git a/test/files/pos/t12647/Test_3.scala b/test/files/pos/t12647/Test_3.scala index 152e5ddc4aa4..e2fc19f46853 100644 --- a/test/files/pos/t12647/Test_3.scala +++ b/test/files/pos/t12647/Test_3.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 object Test extends App { val resolver = new ValueResolver diff --git a/test/files/pos/t12671.scala b/test/files/pos/t12671.scala index 9db7ec760751..65dfa3dcc7ec 100644 --- a/test/files/pos/t12671.scala +++ b/test/files/pos/t12671.scala @@ -1,5 +1,5 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 import scala.collection.{mutable, IterableOnce} import scala.collection.immutable.{AbstractSet, Set, SetOps} diff --git a/test/files/pos/t12712.scala b/test/files/pos/t12712.scala index 195743b46770..59d8f4504819 100644 --- a/test/files/pos/t12712.scala +++ b/test/files/pos/t12712.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object T { private sealed trait T private object O extends T diff --git a/test/files/pos/t12787.scala b/test/files/pos/t12787.scala index e32f880264c4..3d1f1be6fea4 100644 --- a/test/files/pos/t12787.scala +++ b/test/files/pos/t12787.scala @@ -1,5 +1,5 @@ -// scalac: -opt:inline: -Wopt -Werror +//> using options -opt:inline: -Wopt -Werror // skalac: -opt:inline: -Vopt:C -Wopt -Werror // > using scala 2.13.nightly diff --git a/test/files/pos/t12792.scala b/test/files/pos/t12792.scala index 120c68623635..6a6855325700 100644 --- a/test/files/pos/t12792.scala +++ b/test/files/pos/t12792.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint import annotation._ diff --git a/test/files/pos/t12800/matcher_1.scala b/test/files/pos/t12800/matcher_1.scala index e305f9717a6f..52912d2a97fa 100644 --- a/test/files/pos/t12800/matcher_1.scala +++ b/test/files/pos/t12800/matcher_1.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xsource:3 +//> using options -Werror -Xsource:3 import JetBrains.* diff --git a/test/files/pos/t12812.scala b/test/files/pos/t12812.scala index 79c35540b26e..e4b84fe79fbd 100644 --- a/test/files/pos/t12812.scala +++ b/test/files/pos/t12812.scala @@ -1,5 +1,5 @@ -// scalac: -Werror -Xsource:3 -language:postfixOps -Xlint +//> using options -Werror -Xsource:3 -language:postfixOps -Xlint class C { def foo(max: Int) = (1 to max).map(1 to).foreach(r => println(r.mkString(","))) diff --git a/test/files/pos/t12830.scala b/test/files/pos/t12830.scala index 2bce19c6d96d..90e1a8a7f237 100644 --- a/test/files/pos/t12830.scala +++ b/test/files/pos/t12830.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 class C { def i: Int = 42 diff --git a/test/files/pos/t12851/C_2.scala b/test/files/pos/t12851/C_2.scala index 4e5334029e13..859df816094c 100644 --- a/test/files/pos/t12851/C_2.scala +++ b/test/files/pos/t12851/C_2.scala @@ -1,2 +1,2 @@ -// scalac: -Werror +//> using options -Werror class C extends T2 diff --git a/test/files/pos/t12858/B.scala b/test/files/pos/t12858/B.scala index 36275173ecb6..3611602cbf1b 100644 --- a/test/files/pos/t12858/B.scala +++ b/test/files/pos/t12858/B.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror trait B1 extends A { def f: Int } trait C1 { def f = 2 } diff --git a/test/files/pos/t1439.scala b/test/files/pos/t1439.scala index baef9d60d031..df8fed01656a 100644 --- a/test/files/pos/t1439.scala +++ b/test/files/pos/t1439.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror // no unchecked warnings class View[C[A]] { } diff --git a/test/files/pos/t2030.scala b/test/files/pos/t2030.scala index 4a70cf662821..60260e5ae539 100644 --- a/test/files/pos/t2030.scala +++ b/test/files/pos/t2030.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3.0 +//> using options -Xsource:3.0 import scala.collection.immutable._ object Test extends App { diff --git a/test/files/pos/t2799.scala b/test/files/pos/t2799.scala index fb951471494f..9cefaefc38b2 100644 --- a/test/files/pos/t2799.scala +++ b/test/files/pos/t2799.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Werror +//> using options -Xlint -Werror @deprecated("hi mom", "") case class Bob () diff --git a/test/files/pos/t3234.scala b/test/files/pos/t3234.scala index bd2746ca941e..1b1769aadff3 100644 --- a/test/files/pos/t3234.scala +++ b/test/files/pos/t3234.scala @@ -1,5 +1,5 @@ -// scalac: -opt:inline:** -Wopt -Werror +//> using options -opt:inline:** -Wopt -Werror // trait Trait1 { @inline final def foo2(n: Int) = n*n diff --git a/test/files/pos/t3368.scala b/test/files/pos/t3368.scala index 4984f5b23990..ba9bf05117d9 100644 --- a/test/files/pos/t3368.scala +++ b/test/files/pos/t3368.scala @@ -1,5 +1,5 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // trait X { // error: in XML literal: name expected, but char '!' cannot start a name diff --git a/test/files/pos/t3420.scala b/test/files/pos/t3420.scala index 0d0bc9a0ab77..962a0ab437ff 100644 --- a/test/files/pos/t3420.scala +++ b/test/files/pos/t3420.scala @@ -1,5 +1,5 @@ -// scalac: -opt:inline:** -Wopt -Werror +//> using options -opt:inline:** -Wopt -Werror // class C { val cv = Map[Int, Int](1 -> 2) diff --git a/test/files/pos/t3420b.scala b/test/files/pos/t3420b.scala index 6b5f61019633..84471c995d08 100644 --- a/test/files/pos/t3420b.scala +++ b/test/files/pos/t3420b.scala @@ -1,5 +1,5 @@ -// scalac: --release 8 -opt:inline:** -Wopt -Werror +//> using options --release 8 -opt:inline:** -Wopt -Werror // class C { val cv = Map[Int, Int](1 -> 2) diff --git a/test/files/pos/t3495.scala b/test/files/pos/t3495.scala index bcbc3ebfdc98..5dfd28328ce6 100644 --- a/test/files/pos/t3495.scala +++ b/test/files/pos/t3495.scala @@ -1,5 +1,5 @@ -// scalac: -Dsoot.class.path=bin:. +//> using options -Dsoot.class.path=bin:. // // option parsing broke on colon // diff --git a/test/files/pos/t3960.scala b/test/files/pos/t3960.scala index ed3fd8d87651..6452a645ceee 100644 --- a/test/files/pos/t3960.scala +++ b/test/files/pos/t3960.scala @@ -1,5 +1,5 @@ -// scalac: -Ycheck:typer +//> using options -Ycheck:typer // class A { class C[x] diff --git a/test/files/pos/t3995.scala b/test/files/pos/t3995.scala index 8babe50baf33..3a4cdebbf007 100644 --- a/test/files/pos/t3995.scala +++ b/test/files/pos/t3995.scala @@ -1,5 +1,5 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // class Lift { def apply(f: F0): Unit = {} diff --git a/test/files/pos/t4020.scala b/test/files/pos/t4020.scala index daba560bed8a..fb620e98c897 100644 --- a/test/files/pos/t4020.scala +++ b/test/files/pos/t4020.scala @@ -1,5 +1,5 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class A { sealed trait Foo diff --git a/test/files/pos/t4225.scala b/test/files/pos/t4225.scala index 03bb01f9ad67..e6f82cd7d1ec 100644 --- a/test/files/pos/t4225.scala +++ b/test/files/pos/t4225.scala @@ -1,5 +1,5 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // object Test { class Foo { diff --git a/test/files/pos/t4225b.scala b/test/files/pos/t4225b.scala index 2c3133c33fcb..fc66213b2d45 100644 --- a/test/files/pos/t4225b.scala +++ b/test/files/pos/t4225b.scala @@ -1,5 +1,5 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // class Foo { class Bar diff --git a/test/files/pos/t4225c.scala b/test/files/pos/t4225c.scala index a5d3b9ae06a5..0868f5a226ac 100644 --- a/test/files/pos/t4225c.scala +++ b/test/files/pos/t4225c.scala @@ -1,5 +1,5 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // trait A trait B diff --git a/test/files/pos/t4494.scala b/test/files/pos/t4494.scala index 0e78f83a2b86..a90fc88e7440 100644 --- a/test/files/pos/t4494.scala +++ b/test/files/pos/t4494.scala @@ -1,5 +1,5 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // object A { List(1) diff --git a/test/files/pos/t4649.scala b/test/files/pos/t4649.scala index 4cfa8ac995ce..a00121f2eedf 100644 --- a/test/files/pos/t4649.scala +++ b/test/files/pos/t4649.scala @@ -1,5 +1,5 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { // @annotation.tailrec diff --git a/test/files/pos/t4744/Bar.scala b/test/files/pos/t4744/Bar.scala index 01182d0a9a9f..4d20c49eb561 100644 --- a/test/files/pos/t4744/Bar.scala +++ b/test/files/pos/t4744/Bar.scala @@ -1,2 +1,2 @@ -// scalac: -Ybreak-cycles +//> using options -Ybreak-cycles class Bar { val quux = new Foo[java.lang.Integer]() } diff --git a/test/files/pos/t4840.scala b/test/files/pos/t4840.scala index b31d37b1ab30..921da5e8ca68 100644 --- a/test/files/pos/t4840.scala +++ b/test/files/pos/t4840.scala @@ -1,5 +1,5 @@ -// scalac: -opt:inline:** -Wopt +//> using options -opt:inline:** -Wopt // class Crashy { def g(): Option[Any] = None diff --git a/test/files/pos/t4911.scala b/test/files/pos/t4911.scala index ba2daa367dd9..efae95df97d0 100644 --- a/test/files/pos/t4911.scala +++ b/test/files/pos/t4911.scala @@ -1,5 +1,5 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // import language._ diff --git a/test/files/pos/t5029.scala b/test/files/pos/t5029.scala index c8af164c1d16..d423d1ba1244 100644 --- a/test/files/pos/t5029.scala +++ b/test/files/pos/t5029.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { (Vector(): Seq[_]) match { case List() => true; case Nil => false; case x => throw new MatchError(x) } diff --git a/test/files/pos/t5165b/TestObject_3.scala b/test/files/pos/t5165b/TestObject_3.scala index fba846c0be65..68f85d53a47e 100644 --- a/test/files/pos/t5165b/TestObject_3.scala +++ b/test/files/pos/t5165b/TestObject_3.scala @@ -1,3 +1,3 @@ -// scalac: -Werror +//> using options -Werror object TestObject extends TestTrait diff --git a/test/files/pos/t5165b/TestTrait_2.scala b/test/files/pos/t5165b/TestTrait_2.scala index 1c1a560378c8..94a7e4b92624 100644 --- a/test/files/pos/t5165b/TestTrait_2.scala +++ b/test/files/pos/t5165b/TestTrait_2.scala @@ -1,3 +1,3 @@ -// scalac: -Werror +//> using options -Werror @TestAnnotation_1(one=TestAnnotation_1.TestEnumOne.A, two=TestAnnotation_1.TestEnumTwo.C, strVal="something") trait TestTrait diff --git a/test/files/pos/t5175.scala b/test/files/pos/t5175.scala index 37501ca52918..b3da323650d9 100644 --- a/test/files/pos/t5175.scala +++ b/test/files/pos/t5175.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { def ==(p: Phase): Int = 0 diff --git a/test/files/pos/t5265a.scala b/test/files/pos/t5265a.scala index 95db6ec743ed..b8c465d85e13 100644 --- a/test/files/pos/t5265a.scala +++ b/test/files/pos/t5265a.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wconf:cat=other-implicit-type:s +//> using options -Werror -Wconf:cat=other-implicit-type:s trait T[A] class C[A: T] diff --git a/test/files/pos/t5365-nonStrict.scala b/test/files/pos/t5365-nonStrict.scala index 3934ea7b7f6a..c71ff102b058 100644 --- a/test/files/pos/t5365-nonStrict.scala +++ b/test/files/pos/t5365-nonStrict.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xnon-strict-patmat-analysis +//> using options -Werror -Xnon-strict-patmat-analysis // // copy of neg/t5365.scala, which under -Xnon-strict-patmat-analysis gives no warnings class C { diff --git a/test/files/pos/t5542.scala b/test/files/pos/t5542.scala index 3f79d7e3f422..816d371dcf33 100644 --- a/test/files/pos/t5542.scala +++ b/test/files/pos/t5542.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class Test { Option(3) match { case Some(n) => n; case None => 0 } diff --git a/test/files/pos/t5809.scala b/test/files/pos/t5809.scala index ab8fa12969f7..ef41fd0db6e8 100644 --- a/test/files/pos/t5809.scala +++ b/test/files/pos/t5809.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Xfatal-warnings +//> using options -Xlint -Xfatal-warnings // package object foo { implicit class EnrichedInt(foo: Int) { diff --git a/test/files/pos/t5818.scala b/test/files/pos/t5818.scala index 6948c0d08f7d..cdea6899b8e7 100644 --- a/test/files/pos/t5818.scala +++ b/test/files/pos/t5818.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 // abstract class Abstract { type TypeMember diff --git a/test/files/pos/t5897.scala b/test/files/pos/t5897.scala index 64b7ce139ead..61599eff22e9 100644 --- a/test/files/pos/t5897.scala +++ b/test/files/pos/t5897.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // // no warning here // (strangely, if there's an unreachable code warning *anywhere in this compilation unit*, diff --git a/test/files/pos/t5899.scala b/test/files/pos/t5899.scala index f3e9dd002b16..b94f845605a6 100644 --- a/test/files/pos/t5899.scala +++ b/test/files/pos/t5899.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // import scala.tools.nsc._ diff --git a/test/files/pos/t5930.scala b/test/files/pos/t5930.scala index bdcb43ecd624..0abbcaf97091 100644 --- a/test/files/pos/t5930.scala +++ b/test/files/pos/t5930.scala @@ -1,4 +1,4 @@ -// scalac: -Ywarn-dead-code -Xfatal-warnings +//> using options -Ywarn-dead-code -Xfatal-warnings // // should not warn about dead code (`matchEnd(throw new MatchError)`) class Test { diff --git a/test/files/pos/t5932.scala b/test/files/pos/t5932.scala index 5c9630cd6c14..904ef3708c76 100644 --- a/test/files/pos/t5932.scala +++ b/test/files/pos/t5932.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class A diff --git a/test/files/pos/t5946.scala b/test/files/pos/t5946.scala index a06805468621..6c5008f7a185 100644 --- a/test/files/pos/t5946.scala +++ b/test/files/pos/t5946.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // object TestDep { class Ops(val g: scala.reflect.api.JavaUniverse) { diff --git a/test/files/pos/t5954c/A_1.scala b/test/files/pos/t5954c/A_1.scala index 2affe3b7cb17..f61fb978a569 100644 --- a/test/files/pos/t5954c/A_1.scala +++ b/test/files/pos/t5954c/A_1.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror package object A { // these used to should be prevented by the implementation restriction // but are now allowed diff --git a/test/files/pos/t5954c/B_2.scala b/test/files/pos/t5954c/B_2.scala index 2affe3b7cb17..f61fb978a569 100644 --- a/test/files/pos/t5954c/B_2.scala +++ b/test/files/pos/t5954c/B_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror package object A { // these used to should be prevented by the implementation restriction // but are now allowed diff --git a/test/files/pos/t5954d/A_1.scala b/test/files/pos/t5954d/A_1.scala index 57039b9767bf..cfd32660649a 100644 --- a/test/files/pos/t5954d/A_1.scala +++ b/test/files/pos/t5954d/A_1.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xdev +//> using options -Werror -Xdev package p { package object base { class B diff --git a/test/files/pos/t5954d/B_2.scala b/test/files/pos/t5954d/B_2.scala index e83f1fda2a9d..d89c7ceef104 100644 --- a/test/files/pos/t5954d/B_2.scala +++ b/test/files/pos/t5954d/B_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xdev +//> using options -Werror -Xdev package p { trait T { class B diff --git a/test/files/pos/t5968.scala b/test/files/pos/t5968.scala index 4b99bf476daf..ac59997ee294 100644 --- a/test/files/pos/t5968.scala +++ b/test/files/pos/t5968.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object X { def f(e: Either[Int, X.type]) = e match { diff --git a/test/files/pos/t6008.scala b/test/files/pos/t6008.scala index 3a815cb933c4..447d0a0ce714 100644 --- a/test/files/pos/t6008.scala +++ b/test/files/pos/t6008.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // // none of these should complain about exhaustivity class Test { diff --git a/test/files/pos/t6022.scala b/test/files/pos/t6022.scala index 8a1a8581af6f..a28bb7dabdab 100644 --- a/test/files/pos/t6022.scala +++ b/test/files/pos/t6022.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class Test { (null: Any) match { diff --git a/test/files/pos/t6091.scala b/test/files/pos/t6091.scala index 82d9a9c5b6f9..8ce694e643c1 100644 --- a/test/files/pos/t6091.scala +++ b/test/files/pos/t6091.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Xlint +//> using options -Xfatal-warnings -Xlint // object Foo { def eq(x: Int) = x } diff --git a/test/files/pos/t6123-explaintypes-implicits.scala b/test/files/pos/t6123-explaintypes-implicits.scala index 3d5c0e4ee2e8..38ba0cae3328 100644 --- a/test/files/pos/t6123-explaintypes-implicits.scala +++ b/test/files/pos/t6123-explaintypes-implicits.scala @@ -1,4 +1,4 @@ -// scalac: -explaintypes +//> using options -explaintypes // object ImplicitBugReport { trait Exp[+T] diff --git a/test/files/pos/t6146.scala b/test/files/pos/t6146.scala index adb8f760f831..9c7d37b5fef2 100644 --- a/test/files/pos/t6146.scala +++ b/test/files/pos/t6146.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // // No unreachable or exhaustiveness warnings, please. diff --git a/test/files/pos/t6159.scala b/test/files/pos/t6159.scala index 0863350323e1..af68e1ca3c52 100644 --- a/test/files/pos/t6159.scala +++ b/test/files/pos/t6159.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror trait A { sealed abstract class X private class X1 extends X with X2 { } diff --git a/test/files/pos/t6162-inheritance.scala b/test/files/pos/t6162-inheritance.scala index b83b3d16e12a..e0662833836f 100644 --- a/test/files/pos/t6162-inheritance.scala +++ b/test/files/pos/t6162-inheritance.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // package scala.t6126 diff --git a/test/files/pos/t6210.scala b/test/files/pos/t6210.scala index 3cbd7707f126..44ae23511dcb 100644 --- a/test/files/pos/t6210.scala +++ b/test/files/pos/t6210.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // abstract sealed trait AST abstract sealed trait AExpr extends AST diff --git a/test/files/pos/t6217.scala b/test/files/pos/t6217.scala index 45b19c6138c9..8695bf90b2ea 100644 --- a/test/files/pos/t6217.scala +++ b/test/files/pos/t6217.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings package p { package _root_ { package scala { diff --git a/test/files/pos/t6260.scala b/test/files/pos/t6260.scala index 80a70ec412e2..b09668f825ea 100644 --- a/test/files/pos/t6260.scala +++ b/test/files/pos/t6260.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:inline +//> using options -Ydelambdafy:inline // class Box[X](val x: X) extends AnyVal { def map[Y](f: X => Y): Box[Y] = diff --git a/test/files/pos/t6275.scala b/test/files/pos/t6275.scala index 00033b7fd935..1ba9fac14880 100644 --- a/test/files/pos/t6275.scala +++ b/test/files/pos/t6275.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed trait A[T] diff --git a/test/files/pos/t6450.scala b/test/files/pos/t6450.scala index 7dc6b36e491e..39aa6307f9f4 100644 --- a/test/files/pos/t6450.scala +++ b/test/files/pos/t6450.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object ExhaustivityWarnBugReportMinimal { //sealed is needed for the warning sealed trait FoundNode[T]/*presence of parameters is irrelevant*/ diff --git a/test/files/pos/t6537.scala b/test/files/pos/t6537.scala index 0320508b320a..0d5712b54526 100644 --- a/test/files/pos/t6537.scala +++ b/test/files/pos/t6537.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // package tester diff --git a/test/files/pos/t6675.scala b/test/files/pos/t6675.scala index ed16807b61d6..bd9624ff004c 100644 --- a/test/files/pos/t6675.scala +++ b/test/files/pos/t6675.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // object LeftOrRight { def unapply[A](value: Either[A, A]): Option[A] = value match { diff --git a/test/files/pos/t6771.scala b/test/files/pos/t6771.scala index d6781f640678..5e34b4baff40 100644 --- a/test/files/pos/t6771.scala +++ b/test/files/pos/t6771.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { type Id[X] = X diff --git a/test/files/pos/t6891.scala b/test/files/pos/t6891.scala index 696eb81a7eec..9884bf3bda1d 100644 --- a/test/files/pos/t6891.scala +++ b/test/files/pos/t6891.scala @@ -1,4 +1,4 @@ -// scalac: -Ycheck:extmethods -Xfatal-warnings +//> using options -Ycheck:extmethods -Xfatal-warnings // object O { implicit class Foo[A](val value: String) extends AnyVal { diff --git a/test/files/pos/t6896.scala b/test/files/pos/t6896.scala index 022bff5c2f34..404d343e0c78 100644 --- a/test/files/pos/t6896.scala +++ b/test/files/pos/t6896.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object TooManyMains { def main(args: Array[String]): Unit = { diff --git a/test/files/pos/t6942/t6942.scala b/test/files/pos/t6942/t6942.scala index 15874c90f1a7..9a7440e455dc 100644 --- a/test/files/pos/t6942/t6942.scala +++ b/test/files/pos/t6942/t6942.scala @@ -1,4 +1,4 @@ -// scalac: -nowarn +//> using options -nowarn // // not a peep out of the pattern matcher's unreachability analysis // its budget should suffice for these simple matches (they do have a large search space) diff --git a/test/files/pos/t6978/S.scala b/test/files/pos/t6978/S.scala index f5694c81d525..dad2d950a9a8 100644 --- a/test/files/pos/t6978/S.scala +++ b/test/files/pos/t6978/S.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Xfatal-warnings +//> using options -Xlint -Xfatal-warnings trait X { def f: Int } object Test extends J with X with App { diff --git a/test/files/pos/t6994.scala b/test/files/pos/t6994.scala index 34c65858fccd..143c75d329df 100644 --- a/test/files/pos/t6994.scala +++ b/test/files/pos/t6994.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { object NF { diff --git a/test/files/pos/t7011.scala b/test/files/pos/t7011.scala index c508bfd9e6b0..ff2b15e1bb2b 100644 --- a/test/files/pos/t7011.scala +++ b/test/files/pos/t7011.scala @@ -1,4 +1,4 @@ -// scalac: -Ydebug -Xfatal-warnings +//> using options -Ydebug -Xfatal-warnings // object bar { def foo: Unit = { diff --git a/test/files/pos/t7183.scala b/test/files/pos/t7183.scala index 38476f5c9ed9..488924f7d4cc 100644 --- a/test/files/pos/t7183.scala +++ b/test/files/pos/t7183.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class A object A { diff --git a/test/files/pos/t7232/Test.scala b/test/files/pos/t7232/Test.scala index 990989bffc69..798bb11235e3 100644 --- a/test/files/pos/t7232/Test.scala +++ b/test/files/pos/t7232/Test.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test { import pack._ Foo.okay().size() diff --git a/test/files/pos/t7232b/Test.scala b/test/files/pos/t7232b/Test.scala index 3832ca98fb48..6675688722cc 100644 --- a/test/files/pos/t7232b/Test.scala +++ b/test/files/pos/t7232b/Test.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test { import pack._ diff --git a/test/files/pos/t7232c/Test.scala b/test/files/pos/t7232c/Test.scala index 799701b85b3c..48ce66340185 100644 --- a/test/files/pos/t7232c/Test.scala +++ b/test/files/pos/t7232c/Test.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test { import pack._ Foo.innerList().isInnerList() diff --git a/test/files/pos/t7232d/Test.scala b/test/files/pos/t7232d/Test.scala index 88631c4bea0b..af3b5f05ded4 100644 --- a/test/files/pos/t7232d/Test.scala +++ b/test/files/pos/t7232d/Test.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test { import pack._ Foo.mapEntry().getKey() diff --git a/test/files/pos/t7232e/Test.scala b/test/files/pos/t7232e/Test.scala index 09edcabcbe07..aad5788927c3 100644 --- a/test/files/pos/t7232e/Test.scala +++ b/test/files/pos/t7232e/Test.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test { import pack._ diff --git a/test/files/pos/t7232g/Test.scala b/test/files/pos/t7232g/Test.scala index b8dde38e01d7..1f73d9edff61 100644 --- a/test/files/pos/t7232g/Test.scala +++ b/test/files/pos/t7232g/Test.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test { import pack._ diff --git a/test/files/pos/t7285a.scala b/test/files/pos/t7285a.scala index a17fe075a0c8..1f1c1e1c652a 100644 --- a/test/files/pos/t7285a.scala +++ b/test/files/pos/t7285a.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed abstract class Base diff --git a/test/files/pos/t7315.scala b/test/files/pos/t7315.scala index a593957fcd3a..bb59cf5b14a3 100644 --- a/test/files/pos/t7315.scala +++ b/test/files/pos/t7315.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation -Xfatal-warnings +//> using options -deprecation -Xfatal-warnings // package scala.pack diff --git a/test/files/pos/t7369.scala b/test/files/pos/t7369.scala index 55e138220619..8234eeb9d2e8 100644 --- a/test/files/pos/t7369.scala +++ b/test/files/pos/t7369.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { val X, Y = true diff --git a/test/files/pos/t7427.scala b/test/files/pos/t7427.scala index 15d5baba0595..2050702e4adc 100644 --- a/test/files/pos/t7427.scala +++ b/test/files/pos/t7427.scala @@ -1,4 +1,4 @@ -// scalac: -Ydebug +//> using options -Ydebug // // Compiles with no options // Compiles with -Ydebug -Ydisable-unreachable-prevention diff --git a/test/files/pos/t7433.scala b/test/files/pos/t7433.scala index 07b4dd2b7781..16015b178a41 100644 --- a/test/files/pos/t7433.scala +++ b/test/files/pos/t7433.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { def foo(): Unit = { diff --git a/test/files/pos/t7481.scala b/test/files/pos/t7481.scala index 0f9b012042a3..c419d1f20eba 100644 --- a/test/files/pos/t7481.scala +++ b/test/files/pos/t7481.scala @@ -1,5 +1,5 @@ -// scalac: -no-specialization +//> using options -no-specialization object Test { // val fixesCompile = Array(1, 2, 3) diff --git a/test/files/pos/t7551/T_1.scala b/test/files/pos/t7551/T_1.scala index ac41dceca61b..86e3d0d0ac2c 100644 --- a/test/files/pos/t7551/T_1.scala +++ b/test/files/pos/t7551/T_1.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror package p @A(subInterface = classOf[T.S]) diff --git a/test/files/pos/t7551/Test_2.scala b/test/files/pos/t7551/Test_2.scala index 2ca9c0c8d6bd..a8b0e508c497 100644 --- a/test/files/pos/t7551/Test_2.scala +++ b/test/files/pos/t7551/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror package p object Foo { diff --git a/test/files/pos/t7649.scala b/test/files/pos/t7649.scala index 3d7867536aac..58db3e8cf0f8 100644 --- a/test/files/pos/t7649.scala +++ b/test/files/pos/t7649.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // object Test { val c: scala.reflect.macros.blackbox.Context = ??? diff --git a/test/files/pos/t7683-stop-after-parser/sample_2.scala b/test/files/pos/t7683-stop-after-parser/sample_2.scala index 0547d7212a8e..bc08be642a68 100644 --- a/test/files/pos/t7683-stop-after-parser/sample_2.scala +++ b/test/files/pos/t7683-stop-after-parser/sample_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Xplugin-require:timebomb -Ystop-after:parser +//> using options -Xplugin:. -Xplugin-require:timebomb -Ystop-after:parser package sample // just a sample that is compiled with the explosive plugin disabled diff --git a/test/files/pos/t7707.scala b/test/files/pos/t7707.scala index f47d0b19ad79..fee40c2862af 100644 --- a/test/files/pos/t7707.scala +++ b/test/files/pos/t7707.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint // uses apply default, ctor default is unused object O { O() ; def f(): Unit = O() } diff --git a/test/files/pos/t7750.scala b/test/files/pos/t7750.scala index 29aad6461ec4..b0e509072f3d 100644 --- a/test/files/pos/t7750.scala +++ b/test/files/pos/t7750.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -feature +//> using options -Xfatal-warnings -feature // trait LazyCombiner[Elem, +To, Buff <: Growable[Elem] with Sizing] trait Growable[T] diff --git a/test/files/pos/t7864.scala b/test/files/pos/t7864.scala index 6ddec3120356..10f1b926e1b1 100644 --- a/test/files/pos/t7864.scala +++ b/test/files/pos/t7864.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint +//> using options -Xlint // object Test { val f = 0; diff --git a/test/files/pos/t8001/Test_2.scala b/test/files/pos/t8001/Test_2.scala index 10d9f9408b0c..9db1f4636be6 100644 --- a/test/files/pos/t8001/Test_2.scala +++ b/test/files/pos/t8001/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test extends App { Macros.foo (): Unit diff --git a/test/files/pos/t8040.scala b/test/files/pos/t8040.scala index 48ecbae192f7..f55ce3c166ea 100644 --- a/test/files/pos/t8040.scala +++ b/test/files/pos/t8040.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -Ywarn-unused:params +//> using options -Xfatal-warnings -Ywarn-unused:params // object Test { diff --git a/test/files/pos/t8064/Client_2.scala b/test/files/pos/t8064/Client_2.scala index 64ce75cbdee6..2604c0020dad 100644 --- a/test/files/pos/t8064/Client_2.scala +++ b/test/files/pos/t8064/Client_2.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos object Test { Macro { def s = "" diff --git a/test/files/pos/t8064/Macro_1.scala b/test/files/pos/t8064/Macro_1.scala index c8de31aad5c9..b67fcc34bbb1 100644 --- a/test/files/pos/t8064/Macro_1.scala +++ b/test/files/pos/t8064/Macro_1.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos import language.experimental.macros import scala.reflect.macros.blackbox.Context diff --git a/test/files/pos/t8064b/Client_2.scala b/test/files/pos/t8064b/Client_2.scala index 6eac7dc4184b..60433dab0f37 100644 --- a/test/files/pos/t8064b/Client_2.scala +++ b/test/files/pos/t8064b/Client_2.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos object Test { Macro { "".reverse diff --git a/test/files/pos/t8064b/Macro_1.scala b/test/files/pos/t8064b/Macro_1.scala index 941f7ffd2465..88b89d4946c7 100644 --- a/test/files/pos/t8064b/Macro_1.scala +++ b/test/files/pos/t8064b/Macro_1.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos import language.experimental.macros import scala.reflect.macros.blackbox.Context diff --git a/test/files/pos/t8121/B_2.scala b/test/files/pos/t8121/B_2.scala index a6e3792c6cac..660dfd6791e3 100644 --- a/test/files/pos/t8121/B_2.scala +++ b/test/files/pos/t8121/B_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror package b import a.Foo class Foo diff --git a/test/files/pos/t8363.scala b/test/files/pos/t8363.scala index e681bf2e7233..b076d5a6a461 100644 --- a/test/files/pos/t8363.scala +++ b/test/files/pos/t8363.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:method +//> using options -Ydelambdafy:method // class C(a: Any) class Test { diff --git a/test/files/pos/t8410.scala b/test/files/pos/t8410.scala index 6b420efd8946..e4e809367069 100644 --- a/test/files/pos/t8410.scala +++ b/test/files/pos/t8410.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Wopt:none -Werror -deprecation:false +//> using options -opt:inline:** -Wopt:none -Werror -deprecation:false // object Test extends App { diff --git a/test/files/pos/t8523.scala b/test/files/pos/t8523.scala index 6cc30b869772..b70a4cdc2ee6 100644 --- a/test/files/pos/t8523.scala +++ b/test/files/pos/t8523.scala @@ -1,4 +1,4 @@ -// scalac: -Ywarn-dead-code -Xfatal-warnings +//> using options -Ywarn-dead-code -Xfatal-warnings // import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context diff --git a/test/files/pos/t8546.scala b/test/files/pos/t8546.scala index d349f58d169c..da374f427f05 100644 --- a/test/files/pos/t8546.scala +++ b/test/files/pos/t8546.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // package test diff --git a/test/files/pos/t8578.scala b/test/files/pos/t8578.scala index 41ce9afc9e62..be5be85156bb 100644 --- a/test/files/pos/t8578.scala +++ b/test/files/pos/t8578.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:method +//> using options -Ydelambdafy:method // class DuplicateClassName { () => { diff --git a/test/files/pos/t8596.scala b/test/files/pos/t8596.scala index 41126bbb0ee7..d414dd0622a6 100644 --- a/test/files/pos/t8596.scala +++ b/test/files/pos/t8596.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // class TypeTreeObjects { class Container { diff --git a/test/files/pos/t8602.scala b/test/files/pos/t8602.scala index 3ab5e15a445e..b8502b646d88 100644 --- a/test/files/pos/t8602.scala +++ b/test/files/pos/t8602.scala @@ -1,4 +1,4 @@ -// scalac: -language:higherKinds +//> using options -language:higherKinds // object Test { case class Foo[CC[_], D <: CC[Int]](d: D, cc: CC[Int]) diff --git a/test/files/pos/t8617.scala b/test/files/pos/t8617.scala index df5508ff1caf..3f353fafe8bc 100644 --- a/test/files/pos/t8617.scala +++ b/test/files/pos/t8617.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // object Test { def foo[A] = implicitly[OptManifest[A]] // was "unpositioned tree" under -Yrangepos diff --git a/test/files/pos/t8736-b.scala b/test/files/pos/t8736-b.scala index 903292d23298..1c96b7fd30fa 100644 --- a/test/files/pos/t8736-b.scala +++ b/test/files/pos/t8736-b.scala @@ -1,4 +1,4 @@ -// scalac: -feature -language:_ -Xfatal-warnings +//> using options -feature -language:_ -Xfatal-warnings // showing that all are set class X { def hk[M[_]] = ??? diff --git a/test/files/pos/t8736.scala b/test/files/pos/t8736.scala index 46c0cdfd000e..5768f5f95333 100644 --- a/test/files/pos/t8736.scala +++ b/test/files/pos/t8736.scala @@ -1,4 +1,4 @@ -// scalac: -feature -language:implicitConversions -language:higherKinds -language:-implicitConversions -Xfatal-warnings +//> using options -feature -language:implicitConversions -language:higherKinds -language:-implicitConversions -Xfatal-warnings // showing that multiple settings are respected, and explicit enablement has precedence class X { def hk[M[_]] = ??? diff --git a/test/files/pos/t8781/Test_2.scala b/test/files/pos/t8781/Test_2.scala index d7237eb54c46..c67c7daab081 100644 --- a/test/files/pos/t8781/Test_2.scala +++ b/test/files/pos/t8781/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Ymacro-expand:discard -Ystop-after:typer +//> using options -Ymacro-expand:discard -Ystop-after:typer // object Test { implicit class RichT(t: T) { def augmented = "" } diff --git a/test/files/pos/t8828.scala b/test/files/pos/t8828.scala index 3058aa54383e..5015a785157b 100644 --- a/test/files/pos/t8828.scala +++ b/test/files/pos/t8828.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:inaccessible -Xfatal-warnings +//> using options -Xlint:inaccessible -Xfatal-warnings // package outer diff --git a/test/files/pos/t8861.scala b/test/files/pos/t8861.scala index 74d5a8be5497..a560bba1be96 100644 --- a/test/files/pos/t8861.scala +++ b/test/files/pos/t8861.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:infer-any -Xfatal-warnings +//> using options -Xlint:infer-any -Xfatal-warnings // trait Test { diff --git a/test/files/pos/t8934a/Test_2.scala b/test/files/pos/t8934a/Test_2.scala index ecc922db0859..6b25ad28c0ba 100644 --- a/test/files/pos/t8934a/Test_2.scala +++ b/test/files/pos/t8934a/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:typer -Ymacro-expand:discard -nowarn +//> using options -Ystop-after:typer -Ymacro-expand:discard -nowarn object Test { "" match { case Unapply(a, b) => diff --git a/test/files/pos/t8954/t1.scala b/test/files/pos/t8954/t1.scala index 1f015a7d48d0..ccd5cb71b280 100644 --- a/test/files/pos/t8954/t1.scala +++ b/test/files/pos/t8954/t1.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -deprecation +//> using options -Xfatal-warnings -deprecation package scala.foo // 1. a class about to be made final diff --git a/test/files/pos/t8954/t2.scala b/test/files/pos/t8954/t2.scala index 899ad407015d..5002a62a096b 100644 --- a/test/files/pos/t8954/t2.scala +++ b/test/files/pos/t8954/t2.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings -deprecation +//> using options -Xfatal-warnings -deprecation package scala.foo // 1.2 deprecated children should be fine... diff --git a/test/files/pos/t8965.scala b/test/files/pos/t8965.scala index 6386fd996865..729777049d10 100644 --- a/test/files/pos/t8965.scala +++ b/test/files/pos/t8965.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // class A { def f(x: Any with AnyRef, y: Any with AnyRef) = x eq y diff --git a/test/files/pos/t8999.scala b/test/files/pos/t8999.scala index 4ec64da9bb67..23b3870b812d 100644 --- a/test/files/pos/t8999.scala +++ b/test/files/pos/t8999.scala @@ -1,4 +1,4 @@ -// scalac: -nowarn +//> using options -nowarn // object Types { diff --git a/test/files/pos/t9020.scala b/test/files/pos/t9020.scala index 679af42f2aa8..a882772581af 100644 --- a/test/files/pos/t9020.scala +++ b/test/files/pos/t9020.scala @@ -1,4 +1,4 @@ -// scalac: -Ywarn-value-discard -Xfatal-warnings +//> using options -Ywarn-value-discard -Xfatal-warnings // trait ValueDiscard[@specialized U] { def u: U diff --git a/test/files/pos/t9111-inliner-workaround/Test_1.scala b/test/files/pos/t9111-inliner-workaround/Test_1.scala index dd9a7074be57..d8124076edc8 100644 --- a/test/files/pos/t9111-inliner-workaround/Test_1.scala +++ b/test/files/pos/t9111-inliner-workaround/Test_1.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Wopt +//> using options -opt:inline:** -Wopt // object Test extends App { println(new A_1.Inner()) diff --git a/test/files/pos/t9220.scala b/test/files/pos/t9220.scala index fc09b9a259ad..660791b6f940 100644 --- a/test/files/pos/t9220.scala +++ b/test/files/pos/t9220.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { trait Command diff --git a/test/files/pos/t9285.scala b/test/files/pos/t9285.scala index c9c17cbc1ea9..03e3f0e1691b 100644 --- a/test/files/pos/t9285.scala +++ b/test/files/pos/t9285.scala @@ -1,3 +1,3 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // case class C(placeholder: Unit) diff --git a/test/files/pos/t9369.scala b/test/files/pos/t9369.scala index 2e31eb31f247..15ecc7103216 100644 --- a/test/files/pos/t9369.scala +++ b/test/files/pos/t9369.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test { diff --git a/test/files/pos/t9370/sample_2.scala b/test/files/pos/t9370/sample_2.scala index 8326f3ad9e03..70ae0156aafc 100644 --- a/test/files/pos/t9370/sample_2.scala +++ b/test/files/pos/t9370/sample_2.scala @@ -1,5 +1,5 @@ -// scalac: -Xplugin:/tmp-fake -Xplugin:. -Xplugin-require:timebomb -Ystop-after:parser +//> using options -Xplugin:/tmp-fake -Xplugin:. -Xplugin-require:timebomb -Ystop-after:parser // package sample diff --git a/test/files/pos/t9399.scala b/test/files/pos/t9399.scala index 8de485baa44e..537717ed1df4 100644 --- a/test/files/pos/t9399.scala +++ b/test/files/pos/t9399.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed abstract class TA sealed abstract class TB extends TA diff --git a/test/files/pos/t9411a.scala b/test/files/pos/t9411a.scala index 9679150d5186..b28d5e17871b 100644 --- a/test/files/pos/t9411a.scala +++ b/test/files/pos/t9411a.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object OhNoes { diff --git a/test/files/pos/t9411b.scala b/test/files/pos/t9411b.scala index d15423705b26..77714d038e16 100644 --- a/test/files/pos/t9411b.scala +++ b/test/files/pos/t9411b.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object OhNoes { diff --git a/test/files/pos/t9490.scala b/test/files/pos/t9490.scala index e874724d092b..a7975257ec4c 100644 --- a/test/files/pos/t9490.scala +++ b/test/files/pos/t9490.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:inaccessible +//> using options -Werror -Xlint:inaccessible package ws { private[ws] trait Foo diff --git a/test/files/pos/t9630/t9630b.scala b/test/files/pos/t9630/t9630b.scala index fcd0f5ffc32c..980615abf6a4 100644 --- a/test/files/pos/t9630/t9630b.scala +++ b/test/files/pos/t9630/t9630b.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror class Test { def test(b: Base): Unit = b match { case Base_1(Some(_)) => diff --git a/test/files/pos/t9657.scala b/test/files/pos/t9657.scala index eb51a41b0f37..27aa7587a5e4 100644 --- a/test/files/pos/t9657.scala +++ b/test/files/pos/t9657.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror sealed trait PowerSource case object Petrol extends PowerSource case object Pedal extends PowerSource diff --git a/test/files/pos/t9717.scala b/test/files/pos/t9717.scala index 50cb30f0b0a4..fe3b72f9bb3e 100644 --- a/test/files/pos/t9717.scala +++ b/test/files/pos/t9717.scala @@ -1,4 +1,4 @@ -// scalac: -Yno-predef +//> using options -Yno-predef import scala.Predef.implicitly diff --git a/test/files/pos/unchecked-a.scala b/test/files/pos/unchecked-a.scala index 8bcc299c1dcb..d208f98df25e 100644 --- a/test/files/pos/unchecked-a.scala +++ b/test/files/pos/unchecked-a.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // trait Y trait Z extends Y diff --git a/test/files/pos/unsafe.scala b/test/files/pos/unsafe.scala index 97d769791f77..cbdf7ed218a7 100644 --- a/test/files/pos/unsafe.scala +++ b/test/files/pos/unsafe.scala @@ -1,5 +1,5 @@ -// scalac: --release:8 -Yrelease:sun.misc +//> using options --release:8 -Yrelease:sun.misc import sun.misc.Unsafe diff --git a/test/files/pos/value-class-override-no-spec.scala b/test/files/pos/value-class-override-no-spec.scala index a073503c4cd0..842418aefcd3 100644 --- a/test/files/pos/value-class-override-no-spec.scala +++ b/test/files/pos/value-class-override-no-spec.scala @@ -1,4 +1,4 @@ -// scalac: -no-specialization +//> using options -no-specialization // // There are two versions of this tests: one with and one without specialization. // The bug was only exposed *without* specialization. diff --git a/test/files/pos/varargs-future.scala b/test/files/pos/varargs-future.scala index 8b8c414b47b0..2f60b213e44d 100644 --- a/test/files/pos/varargs-future.scala +++ b/test/files/pos/varargs-future.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // class Test { diff --git a/test/files/pos/variant-placeholders-future.scala b/test/files/pos/variant-placeholders-future.scala index 383db8420f85..74dcc177c039 100644 --- a/test/files/pos/variant-placeholders-future.scala +++ b/test/files/pos/variant-placeholders-future.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:3 +//> using options -Xsource:3 // object Test { type `-_` = Int diff --git a/test/files/pos/virtpatmat_exhaust_unchecked.scala b/test/files/pos/virtpatmat_exhaust_unchecked.scala index 4e08038803e6..fb0a5efb0529 100644 --- a/test/files/pos/virtpatmat_exhaust_unchecked.scala +++ b/test/files/pos/virtpatmat_exhaust_unchecked.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed trait Option {} case class Choice(a: Option, b: Option) extends Option; diff --git a/test/files/pos/warn-unused-params-not-implicits.scala b/test/files/pos/warn-unused-params-not-implicits.scala index 4be45127b5e6..f8fa369d2ea5 100644 --- a/test/files/pos/warn-unused-params-not-implicits.scala +++ b/test/files/pos/warn-unused-params-not-implicits.scala @@ -1,4 +1,4 @@ -// scalac: -Ywarn-unused:params,-implicits -Xfatal-warnings +//> using options -Ywarn-unused:params,-implicits -Xfatal-warnings // trait InterFace { diff --git a/test/files/pos/xlint1.scala b/test/files/pos/xlint1.scala index 4d323c731cc6..4ac7706ba3c1 100644 --- a/test/files/pos/xlint1.scala +++ b/test/files/pos/xlint1.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Xfatal-warnings +//> using options -Xlint -Xfatal-warnings // package object foo { implicit class Bar[T](val x: T) extends AnyVal { diff --git a/test/files/pos/xml-attributes.scala b/test/files/pos/xml-attributes.scala index 715acf14a4df..dd50696fa01d 100644 --- a/test/files/pos/xml-attributes.scala +++ b/test/files/pos/xml-attributes.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // object foo { val bar = "baz" diff --git a/test/files/pos/xml-comments.scala b/test/files/pos/xml-comments.scala index 0ce2633ee7b4..a38dbe330acb 100644 --- a/test/files/pos/xml-comments.scala +++ b/test/files/pos/xml-comments.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // object foo { val bar = "baz" diff --git a/test/files/pos/xml-entityref.scala b/test/files/pos/xml-entityref.scala index 268cf860637b..1240dd5d7098 100644 --- a/test/files/pos/xml-entityref.scala +++ b/test/files/pos/xml-entityref.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // object foo { val bar = "baz" diff --git a/test/files/pos/xml-interpolation.scala b/test/files/pos/xml-interpolation.scala index 6230818a1edd..08a2081f3045 100644 --- a/test/files/pos/xml-interpolation.scala +++ b/test/files/pos/xml-interpolation.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // object foo { val bar = "baz" diff --git a/test/files/pos/xml-match.scala b/test/files/pos/xml-match.scala index 12a10e36fa18..ddc984aca46b 100644 --- a/test/files/pos/xml-match.scala +++ b/test/files/pos/xml-match.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // object foo { def bar(e: Elem) = e match { diff --git a/test/files/pos/xml-nodebuffer.scala b/test/files/pos/xml-nodebuffer.scala index a250636646ae..0aa3d97ada5d 100644 --- a/test/files/pos/xml-nodebuffer.scala +++ b/test/files/pos/xml-nodebuffer.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // import scala.xml.NodeBuffer diff --git a/test/files/pos/xml-ns-empty.scala b/test/files/pos/xml-ns-empty.scala index 4a3aa0c0231b..c74aa70dc4ab 100644 --- a/test/files/pos/xml-ns-empty.scala +++ b/test/files/pos/xml-ns-empty.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // object foo { val n = diff --git a/test/files/pos/xml-ns-text.scala b/test/files/pos/xml-ns-text.scala index 8718e1ebf014..6eed98e900b2 100644 --- a/test/files/pos/xml-ns-text.scala +++ b/test/files/pos/xml-ns-text.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // object foo { val xml = diff --git a/test/files/pos/xml-ns.scala b/test/files/pos/xml-ns.scala index 71f90143cc43..092b06d894e9 100644 --- a/test/files/pos/xml-ns.scala +++ b/test/files/pos/xml-ns.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // object foo { val bar = "baz" diff --git a/test/files/pos/xml-pcdata.scala b/test/files/pos/xml-pcdata.scala index d2e00e249a7b..f657e2d4166f 100644 --- a/test/files/pos/xml-pcdata.scala +++ b/test/files/pos/xml-pcdata.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // object foo { val bar = "baz" diff --git a/test/files/pos/xml-procinstr.scala b/test/files/pos/xml-procinstr.scala index 108ba8dc0c28..254de36885be 100644 --- a/test/files/pos/xml-procinstr.scala +++ b/test/files/pos/xml-procinstr.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // object foo { val bar = "baz" diff --git a/test/files/pos/xml-quasiquote.scala b/test/files/pos/xml-quasiquote.scala index 203d997e3edc..624a03cd74e9 100644 --- a/test/files/pos/xml-quasiquote.scala +++ b/test/files/pos/xml-quasiquote.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:typer +//> using options -Ystop-after:typer // import reflect.runtime.universe._ diff --git a/test/files/pos/xml-xmlns.scala b/test/files/pos/xml-xmlns.scala index 75d42f242b86..58c552283698 100644 --- a/test/files/pos/xml-xmlns.scala +++ b/test/files/pos/xml-xmlns.scala @@ -1,4 +1,4 @@ -// scalac: -Ystop-after:parser +//> using options -Ystop-after:parser // object foo { val html = diff --git a/test/files/pos/yimports-pkgobj/C_2.scala b/test/files/pos/yimports-pkgobj/C_2.scala index b0a418a6c69f..7f8c8bdaa3ed 100644 --- a/test/files/pos/yimports-pkgobj/C_2.scala +++ b/test/files/pos/yimports-pkgobj/C_2.scala @@ -1,4 +1,4 @@ -// scalac: -Yimports:scala,scala.Predef,hello.world +//> using options -Yimports:scala,scala.Predef,hello.world // import hello.world.{Numb => _, _} // no effect, world isPackage diff --git a/test/files/pos/yimports-pkgobj/minidef_1.scala b/test/files/pos/yimports-pkgobj/minidef_1.scala index 1681f4b62312..c0107f57d958 100644 --- a/test/files/pos/yimports-pkgobj/minidef_1.scala +++ b/test/files/pos/yimports-pkgobj/minidef_1.scala @@ -1,4 +1,4 @@ -// scalac: -Yimports:scala +//> using options -Yimports:scala // package hello diff --git a/test/files/pos/z1730.scala b/test/files/pos/z1730.scala index e4dcb8727f70..35adc7834684 100644 --- a/test/files/pos/z1730.scala +++ b/test/files/pos/z1730.scala @@ -1,4 +1,4 @@ -// scalac: -Ycheck:_ +//> using options -Ycheck:_ // // /scala/trac/z1730/a.scala // Wed May 23 07:41:25 PDT 2012 diff --git a/test/files/presentation/doc/doc.scala b/test/files/presentation/doc/doc.scala index 2051bad03ebb..761bcd9c96d3 100644 --- a/test/files/presentation/doc/doc.scala +++ b/test/files/presentation/doc/doc.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Werror +//> using options -Xlint -Werror import scala.reflect.internal.util.{ BatchSourceFile, SourceFile } import scala.tools.nsc.doc import scala.tools.nsc.doc.base._ diff --git a/test/files/run/abstype_implicits.scala b/test/files/run/abstype_implicits.scala index 7187e6c7de61..7283f6fb4cac 100644 --- a/test/files/run/abstype_implicits.scala +++ b/test/files/run/abstype_implicits.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 // trait Functor[F[_]] diff --git a/test/files/run/applydynamic_sip.scala b/test/files/run/applydynamic_sip.scala index cb87dbe1fb79..cdc16ac7f5ac 100644 --- a/test/files/run/applydynamic_sip.scala +++ b/test/files/run/applydynamic_sip.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false -language:dynamics +//> using options -Yrangepos:false -language:dynamics // object Test extends App { object stubUpdate { diff --git a/test/files/run/bcodeInlinerMixed/B_1.scala b/test/files/run/bcodeInlinerMixed/B_1.scala index bb6cf8220962..c80ef4b69067 100644 --- a/test/files/run/bcodeInlinerMixed/B_1.scala +++ b/test/files/run/bcodeInlinerMixed/B_1.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // // Since 1.0.18, partest does mixed compilation only in two stages // 1. scalac *.scala *.java diff --git a/test/files/run/bcodeInlinerMixed/Test_2.scala b/test/files/run/bcodeInlinerMixed/Test_2.scala index fe0ee721a7b1..91a005185c11 100644 --- a/test/files/run/bcodeInlinerMixed/Test_2.scala +++ b/test/files/run/bcodeInlinerMixed/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // import scala.tools.partest.BytecodeTest import scala.tools.testkit.ASMConverters diff --git a/test/files/run/bugs.scala b/test/files/run/bugs.scala index b210946dbbdc..1ab3ec0aae1a 100644 --- a/test/files/run/bugs.scala +++ b/test/files/run/bugs.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:deprecation +//> using options -Werror -Xlint:deprecation // import annotation.unused diff --git a/test/files/run/checked.scala b/test/files/run/checked.scala index 4d814e9a48f6..a7352e859832 100644 --- a/test/files/run/checked.scala +++ b/test/files/run/checked.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit -nowarn +//> using options -Xcheckinit -nowarn // /* Test checked initializers. Needs to be run with -checkinit */ diff --git a/test/files/run/checkinit.scala b/test/files/run/checkinit.scala index 2a37f2eef63e..7d13bdb05bda 100644 --- a/test/files/run/checkinit.scala +++ b/test/files/run/checkinit.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit +//> using options -Xcheckinit // class C(val x: AnyRef, val y: AnyRef) class D(val x: AnyRef, val y: AnyRef) { diff --git a/test/files/run/ctor-order.scala b/test/files/run/ctor-order.scala index 904dca107073..158eb320238f 100644 --- a/test/files/run/ctor-order.scala +++ b/test/files/run/ctor-order.scala @@ -1,4 +1,4 @@ -// scalac: -Xmaxwarns 0 +//> using options -Xmaxwarns 0 /** Test that constructor operations are reordered correctly. */ class Outer { diff --git a/test/files/run/defaults-serizaliable-no-forwarders.scala b/test/files/run/defaults-serizaliable-no-forwarders.scala index f49f526daec0..0c77afda79c6 100644 --- a/test/files/run/defaults-serizaliable-no-forwarders.scala +++ b/test/files/run/defaults-serizaliable-no-forwarders.scala @@ -1,4 +1,4 @@ -// scalac: -Xmixin-force-forwarders:false +//> using options -Xmixin-force-forwarders:false import java.io.{ByteArrayInputStream, ByteArrayOutputStream, ObjectInputStream, ObjectOutputStream} diff --git a/test/files/run/delambdafy-dependent-on-param-subst.scala b/test/files/run/delambdafy-dependent-on-param-subst.scala index 68f3b44d0ecc..77985f6dd2d4 100644 --- a/test/files/run/delambdafy-dependent-on-param-subst.scala +++ b/test/files/run/delambdafy-dependent-on-param-subst.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:method +//> using options -Ydelambdafy:method // trait M[-X] { def m(x: X): Boolean diff --git a/test/files/run/delay-bad.scala b/test/files/run/delay-bad.scala index fd32d9edf647..a743285791e3 100644 --- a/test/files/run/delay-bad.scala +++ b/test/files/run/delay-bad.scala @@ -1,4 +1,4 @@ -// scalac: -Xmaxwarns 0 +//> using options -Xmaxwarns 0 trait A extends DelayedInit { print("-A") diff --git a/test/files/run/delay-good.scala b/test/files/run/delay-good.scala index 5fe32194f412..5787db7b4b5f 100644 --- a/test/files/run/delay-good.scala +++ b/test/files/run/delay-good.scala @@ -1,4 +1,4 @@ -// scalac: -Xmaxwarns 0 +//> using options -Xmaxwarns 0 trait A { print("-A") diff --git a/test/files/run/deprecate-early-type-defs.scala b/test/files/run/deprecate-early-type-defs.scala index 8636e1d140f5..cc0a32bf18a8 100644 --- a/test/files/run/deprecate-early-type-defs.scala +++ b/test/files/run/deprecate-early-type-defs.scala @@ -1,3 +1,3 @@ -// scalac: -deprecation +//> using options -deprecation // object Test extends { type T = Int } with App diff --git a/test/files/run/disable-assertions.scala b/test/files/run/disable-assertions.scala index 3d77ce4fc92d..e00efd00e71e 100644 --- a/test/files/run/disable-assertions.scala +++ b/test/files/run/disable-assertions.scala @@ -1,4 +1,4 @@ -// scalac: -Xdisable-assertions +//> using options -Xdisable-assertions // object Elided { diff --git a/test/files/run/dotty-i11332b.scala b/test/files/run/dotty-i11332b.scala index 2627029541fa..3257f66bae84 100644 --- a/test/files/run/dotty-i11332b.scala +++ b/test/files/run/dotty-i11332b.scala @@ -1,5 +1,5 @@ // javaVersion: 11+ -// scalac: -release:11 +//> using options -release:11 import java.lang.invoke._, MethodType.methodType diff --git a/test/files/run/dotty-t12348.scala b/test/files/run/dotty-t12348.scala index b655da3012dc..0d3b6a0e2779 100644 --- a/test/files/run/dotty-t12348.scala +++ b/test/files/run/dotty-t12348.scala @@ -1,5 +1,5 @@ // javaVersion: 11+ -// scalac: -release:11 +//> using options -release:11 import java.lang.invoke._ import scala.runtime.IntRef diff --git a/test/files/run/elidable-opt.scala b/test/files/run/elidable-opt.scala index 672a1ab41035..efed09bd5af6 100644 --- a/test/files/run/elidable-opt.scala +++ b/test/files/run/elidable-opt.scala @@ -1,4 +1,4 @@ -// scalac: -Xelide-below 900 -deprecation -Xmaxwarns 0 +//> using options -Xelide-below 900 -deprecation -Xmaxwarns 0 // import annotation._ import elidable._ diff --git a/test/files/run/elidable.scala b/test/files/run/elidable.scala index 2a9edffd7057..1daa6a8acff3 100644 --- a/test/files/run/elidable.scala +++ b/test/files/run/elidable.scala @@ -1,4 +1,4 @@ -// scalac: -Xelide-below WARNING -deprecation +//> using options -Xelide-below WARNING -deprecation // import annotation._ import elidable._ diff --git a/test/files/run/hk-typevar-unification.scala b/test/files/run/hk-typevar-unification.scala index 2afd26c875f1..81d6ab4e0081 100644 --- a/test/files/run/hk-typevar-unification.scala +++ b/test/files/run/hk-typevar-unification.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 // trait Forall[F[_]] { diff --git a/test/files/run/inline-stack-map-frames/A_1.scala b/test/files/run/inline-stack-map-frames/A_1.scala index 942b8591271b..477835051395 100644 --- a/test/files/run/inline-stack-map-frames/A_1.scala +++ b/test/files/run/inline-stack-map-frames/A_1.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** class A { @noinline final def b: B = null @inline final def a: A = b diff --git a/test/files/run/inline-stack-map-frames/Test_2.scala b/test/files/run/inline-stack-map-frames/Test_2.scala index 3a904a6e940d..13ca041f45a2 100644 --- a/test/files/run/inline-stack-map-frames/Test_2.scala +++ b/test/files/run/inline-stack-map-frames/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** class C { def t(a: A): AnyRef = { // a.a is inlined, resulting in a.b, which has return type B diff --git a/test/files/run/inner-obj-auto.scala b/test/files/run/inner-obj-auto.scala index 3277d9f042ca..bac5dedc8944 100644 --- a/test/files/run/inner-obj-auto.scala +++ b/test/files/run/inner-obj-auto.scala @@ -1,4 +1,4 @@ -// scalac: -Xmaxwarns 0 +//> using options -Xmaxwarns 0 /* ================================================================================ Automatically generated on 2011-05-11. Do Not Edit (unless you have to). diff --git a/test/files/run/interop_typetags_are_manifests.scala b/test/files/run/interop_typetags_are_manifests.scala index 3eb36e292c2c..bc7f0840c37b 100644 --- a/test/files/run/interop_typetags_are_manifests.scala +++ b/test/files/run/interop_typetags_are_manifests.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false +//> using options -Yrangepos:false // import scala.reflect.runtime.universe._ import scala.reflect.ClassTag diff --git a/test/files/run/is-valid-num.scala b/test/files/run/is-valid-num.scala index ef2388f8baa3..5e0f17405c2e 100644 --- a/test/files/run/is-valid-num.scala +++ b/test/files/run/is-valid-num.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint -Werror +//> using options -Xlint -Werror @annotation.nowarn("cat=deprecation&msg=isWhole") object Test { def x = BigInt("10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") diff --git a/test/files/run/iterableonce-deprecations.scala b/test/files/run/iterableonce-deprecations.scala index 35bce673824a..5a8108368c23 100644 --- a/test/files/run/iterableonce-deprecations.scala +++ b/test/files/run/iterableonce-deprecations.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // // // diff --git a/test/files/run/lazy-locals.scala b/test/files/run/lazy-locals.scala index 11801fa96c1c..de4fff901bbb 100644 --- a/test/files/run/lazy-locals.scala +++ b/test/files/run/lazy-locals.scala @@ -1,4 +1,4 @@ -// scalac: -Xmaxwarns 0 +//> using options -Xmaxwarns 0 object Test extends App { lazy val w = 10 diff --git a/test/files/run/literals.scala b/test/files/run/literals.scala index 358c330138f1..06e6cacf4fb1 100644 --- a/test/files/run/literals.scala +++ b/test/files/run/literals.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // //############################################################################ // Literals diff --git a/test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala b/test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala index 03e9ae0c5fff..85857b8a17c6 100644 --- a/test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala +++ b/test/files/run/macro-expand-implicit-macro-is-view/Impls_1.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation import scala.reflect.macros.blackbox.Context object Impls { diff --git a/test/files/run/macro-expand-implicit-macro-is-view/Macros_Test_2.scala b/test/files/run/macro-expand-implicit-macro-is-view/Macros_Test_2.scala index 50bac1eedbfa..db8742b67eb1 100644 --- a/test/files/run/macro-expand-implicit-macro-is-view/Macros_Test_2.scala +++ b/test/files/run/macro-expand-implicit-macro-is-view/Macros_Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation object Macros { import scala.language.experimental.macros diff --git a/test/files/run/macro-openmacros/Impls_Macros_1.scala b/test/files/run/macro-openmacros/Impls_Macros_1.scala index 3ab0ed3720d2..2e2069c89411 100644 --- a/test/files/run/macro-openmacros/Impls_Macros_1.scala +++ b/test/files/run/macro-openmacros/Impls_Macros_1.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false +//> using options -Yrangepos:false import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context import scala.util.Properties.isWin diff --git a/test/files/run/macro-openmacros/Test_2.scala b/test/files/run/macro-openmacros/Test_2.scala index 8a085961570d..976a6c0011e3 100644 --- a/test/files/run/macro-openmacros/Test_2.scala +++ b/test/files/run/macro-openmacros/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false +//> using options -Yrangepos:false object Test extends App { Macros.foo } diff --git a/test/files/run/macro-parse-position/Impls_Macros_1.scala b/test/files/run/macro-parse-position/Impls_Macros_1.scala index a17f0cdbfa63..34a0e6ad2d70 100644 --- a/test/files/run/macro-parse-position/Impls_Macros_1.scala +++ b/test/files/run/macro-parse-position/Impls_Macros_1.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false +//> using options -Yrangepos:false import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context diff --git a/test/files/run/macro-parse-position/Test_2.scala b/test/files/run/macro-parse-position/Test_2.scala index db0bac2510ff..fcf7a1ef9210 100644 --- a/test/files/run/macro-parse-position/Test_2.scala +++ b/test/files/run/macro-parse-position/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false +//> using options -Yrangepos:false object Test extends App { println(Macros.foo) } diff --git a/test/files/run/macro-rangepos-subpatterns/Macros_1.scala b/test/files/run/macro-rangepos-subpatterns/Macros_1.scala index 9f0b7a5dc537..842cda745c2f 100644 --- a/test/files/run/macro-rangepos-subpatterns/Macros_1.scala +++ b/test/files/run/macro-rangepos-subpatterns/Macros_1.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos import scala.reflect.macros.whitebox.Context import language.experimental.macros diff --git a/test/files/run/macro-rangepos-subpatterns/Test_2.scala b/test/files/run/macro-rangepos-subpatterns/Test_2.scala index b2559e34eddc..3b6246ad5741 100644 --- a/test/files/run/macro-rangepos-subpatterns/Test_2.scala +++ b/test/files/run/macro-rangepos-subpatterns/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos object Test extends App { 42 match { case Extractor(a) => println(a) diff --git a/test/files/run/macro-settings/Test_2.scala b/test/files/run/macro-settings/Test_2.scala index 830b25335057..fc891cfc1dd6 100644 --- a/test/files/run/macro-settings/Test_2.scala +++ b/test/files/run/macro-settings/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xmacro-settings:hello=1 +//> using options -Xmacro-settings:hello=1 object Test extends App { Macros.foo } diff --git a/test/files/run/macro-term-declared-in-anonymous/Macros_Test_2.scala b/test/files/run/macro-term-declared-in-anonymous/Macros_Test_2.scala index 785e92873a96..4bb5879d9a9b 100644 --- a/test/files/run/macro-term-declared-in-anonymous/Macros_Test_2.scala +++ b/test/files/run/macro-term-declared-in-anonymous/Macros_Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -language:experimental.macros +//> using options -language:experimental.macros //import scala.language.experimental.macros import scala.language.reflectiveCalls diff --git a/test/files/run/macro-term-declared-in-refinement/Macros_Test_2.scala b/test/files/run/macro-term-declared-in-refinement/Macros_Test_2.scala index 738f7fc836d1..a00059ec44de 100644 --- a/test/files/run/macro-term-declared-in-refinement/Macros_Test_2.scala +++ b/test/files/run/macro-term-declared-in-refinement/Macros_Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -language:experimental.macros +//> using options -language:experimental.macros //import scala.language.experimental.macros import scala.language.reflectiveCalls diff --git a/test/files/run/macro-vampire-false-warning/Macros_1.scala b/test/files/run/macro-vampire-false-warning/Macros_1.scala index a2e31ba61b37..169506de2e5e 100644 --- a/test/files/run/macro-vampire-false-warning/Macros_1.scala +++ b/test/files/run/macro-vampire-false-warning/Macros_1.scala @@ -1,5 +1,5 @@ // As per https://meta.plasm.us/posts/2013/08/31/feeding-our-vampires/ -// scalac: -Werror +//> using options -Werror import scala.annotation.StaticAnnotation import scala.reflect.macros.whitebox.Context diff --git a/test/files/run/macro-vampire-false-warning/Test_2.scala b/test/files/run/macro-vampire-false-warning/Test_2.scala index 154cc430c855..a9dd906bbae5 100644 --- a/test/files/run/macro-vampire-false-warning/Test_2.scala +++ b/test/files/run/macro-vampire-false-warning/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test extends App { val foo = mkObject("x" -> "2", "y" -> 3) println(foo.x) diff --git a/test/files/run/macroPlugins-enterStats.scala b/test/files/run/macroPlugins-enterStats.scala index de1701640cbe..346f1fe01e82 100644 --- a/test/files/run/macroPlugins-enterStats.scala +++ b/test/files/run/macroPlugins-enterStats.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // import scala.tools.partest._ import scala.tools.nsc._ diff --git a/test/files/run/macroPlugins-isBlackbox/Test_3.scala b/test/files/run/macroPlugins-isBlackbox/Test_3.scala index 68eb05dc8eb5..d3397c023ddf 100644 --- a/test/files/run/macroPlugins-isBlackbox/Test_3.scala +++ b/test/files/run/macroPlugins-isBlackbox/Test_3.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. +//> using options -Xplugin:. object Test extends App { val x: Int = Macros.foo } diff --git a/test/files/run/macroPlugins-macroArgs/Test_3.scala b/test/files/run/macroPlugins-macroArgs/Test_3.scala index de0c68bb4c00..37440cdcccc6 100644 --- a/test/files/run/macroPlugins-macroArgs/Test_3.scala +++ b/test/files/run/macroPlugins-macroArgs/Test_3.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. +//> using options -Xplugin:. object Test extends App { Macros.foo("1") Macros.foo("2") diff --git a/test/files/run/macroPlugins-macroExpand/Test_3.scala b/test/files/run/macroPlugins-macroExpand/Test_3.scala index 178b2f6b57bc..5351095330c8 100644 --- a/test/files/run/macroPlugins-macroExpand/Test_3.scala +++ b/test/files/run/macroPlugins-macroExpand/Test_3.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. +//> using options -Xplugin:. object Test extends App { Macros.foo1 Macros.foo2 diff --git a/test/files/run/macroPlugins-macroRuntime/Test_3.scala b/test/files/run/macroPlugins-macroRuntime/Test_3.scala index de0c68bb4c00..37440cdcccc6 100644 --- a/test/files/run/macroPlugins-macroRuntime/Test_3.scala +++ b/test/files/run/macroPlugins-macroRuntime/Test_3.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. +//> using options -Xplugin:. object Test extends App { Macros.foo("1") Macros.foo("2") diff --git a/test/files/run/macroPlugins-typedMacroBody/Macros_2.scala b/test/files/run/macroPlugins-typedMacroBody/Macros_2.scala index 7dafd5bfac91..d92c4a257cfb 100644 --- a/test/files/run/macroPlugins-typedMacroBody/Macros_2.scala +++ b/test/files/run/macroPlugins-typedMacroBody/Macros_2.scala @@ -1,4 +1,4 @@ -// scalac: -Xplugin:. -Yrangepos:false +//> using options -Xplugin:. -Yrangepos:false import scala.language.experimental.macros import scala.reflect.macros.blackbox.Context diff --git a/test/files/run/macroPlugins-typedMacroBody/Plugin_1.scala b/test/files/run/macroPlugins-typedMacroBody/Plugin_1.scala index b9445dd9d30a..e9df77f49580 100644 --- a/test/files/run/macroPlugins-typedMacroBody/Plugin_1.scala +++ b/test/files/run/macroPlugins-typedMacroBody/Plugin_1.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false +//> using options -Yrangepos:false package typedMacroBody import scala.tools.nsc.Global diff --git a/test/files/run/macroPlugins-typedMacroBody/Test_3.scala b/test/files/run/macroPlugins-typedMacroBody/Test_3.scala index 360d9bbaa0f6..7ababf77324f 100644 --- a/test/files/run/macroPlugins-typedMacroBody/Test_3.scala +++ b/test/files/run/macroPlugins-typedMacroBody/Test_3.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false +//> using options -Yrangepos:false object Test extends App { Macros.foo1 Macros.foo2 diff --git a/test/files/run/manifests-undeprecated-in-2.10.0.scala b/test/files/run/manifests-undeprecated-in-2.10.0.scala index dc1b8373ed70..6cea26e304ab 100644 --- a/test/files/run/manifests-undeprecated-in-2.10.0.scala +++ b/test/files/run/manifests-undeprecated-in-2.10.0.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // object Test extends App { def m1a: scala.reflect.Manifest[Int] = scala.reflect.Manifest.Int diff --git a/test/files/run/module-serialization-proxy-class-unload.scala b/test/files/run/module-serialization-proxy-class-unload.scala index f6405d33a2c0..eb0d4daf8a40 100644 --- a/test/files/run/module-serialization-proxy-class-unload.scala +++ b/test/files/run/module-serialization-proxy-class-unload.scala @@ -1,4 +1,4 @@ -// scalac: -Ddummy=run-in-forked-process +//> using options -Ddummy=run-in-forked-process object Module { val data = new Array[Byte](32 * 1024 * 1024) } diff --git a/test/files/run/name-based-patmat.scala b/test/files/run/name-based-patmat.scala index b47c6f76d6f9..50693595b24f 100644 --- a/test/files/run/name-based-patmat.scala +++ b/test/files/run/name-based-patmat.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:stars-align +//> using options -Xlint:stars-align final class MiniSome[T](val get: T) extends AnyVal { def isEmpty = false } package p0 { diff --git a/test/files/run/names-defaults.scala b/test/files/run/names-defaults.scala index f2c3ac3e2f70..136d656f7a5d 100644 --- a/test/files/run/names-defaults.scala +++ b/test/files/run/names-defaults.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint +//> using options -Xlint import scala.language.existentials object Test extends App { diff --git a/test/files/run/nonlocalreturn.scala b/test/files/run/nonlocalreturn.scala index 0bc4a8d29a85..3d6b18507ada 100644 --- a/test/files/run/nonlocalreturn.scala +++ b/test/files/run/nonlocalreturn.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:-nonlocal-return +//> using options -Xlint:-nonlocal-return object Test { def wrap[K](body: => K): K = body diff --git a/test/files/run/nothingTypeDce.scala b/test/files/run/nothingTypeDce.scala index e2753f2e9a4a..e39efaf53b61 100644 --- a/test/files/run/nothingTypeDce.scala +++ b/test/files/run/nothingTypeDce.scala @@ -1,4 +1,4 @@ -// scalac: -opt:unreachable-code +//> using options -opt:unreachable-code // // See comment in BCodeBodyBuilder diff --git a/test/files/run/patmat-exprs.scala b/test/files/run/patmat-exprs.scala index 0f7b71803a3f..faa2b2b75d7b 100644 --- a/test/files/run/patmat-exprs.scala +++ b/test/files/run/patmat-exprs.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint +//> using options -Werror -Xlint // import scala.language.{ implicitConversions } diff --git a/test/files/run/patmat-mix-case-extractor.scala b/test/files/run/patmat-mix-case-extractor.scala index 55c101a3fab2..fac2c0a6320f 100644 --- a/test/files/run/patmat-mix-case-extractor.scala +++ b/test/files/run/patmat-mix-case-extractor.scala @@ -1,4 +1,4 @@ -// scalac: -Xmaxwarns 0 +//> using options -Xmaxwarns 0 trait CaseClass trait ProdCaseClass extends CaseClass { def x: Int } trait SeqCaseClass extends CaseClass { def xs: Seq[Int] } diff --git a/test/files/run/patmatnew.scala b/test/files/run/patmatnew.scala index 145eb7b55c4e..53addeb8ae27 100644 --- a/test/files/run/patmatnew.scala +++ b/test/files/run/patmatnew.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // import scala.language.{ postfixOps } diff --git a/test/files/run/primitive-sigs-2-new.scala b/test/files/run/primitive-sigs-2-new.scala index d76707cb00e9..00718a318fff 100644 --- a/test/files/run/primitive-sigs-2-new.scala +++ b/test/files/run/primitive-sigs-2-new.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:inline +//> using options -Ydelambdafy:inline // import scala.language.{ postfixOps } diff --git a/test/files/run/primitive-sigs-2-old.scala b/test/files/run/primitive-sigs-2-old.scala index faebedb25883..a3145e81fd25 100644 --- a/test/files/run/primitive-sigs-2-old.scala +++ b/test/files/run/primitive-sigs-2-old.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:inline +//> using options -Ydelambdafy:inline // import scala.language.{ postfixOps } diff --git a/test/files/run/pure-warning-post-macro/test_2.scala b/test/files/run/pure-warning-post-macro/test_2.scala index 328a0038195c..4b4934c08392 100644 --- a/test/files/run/pure-warning-post-macro/test_2.scala +++ b/test/files/run/pure-warning-post-macro/test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test { def main(args: Array[String]): Unit = { // We don't want a "pure expression discarded" warning here as the macro will diff --git a/test/files/run/reflection-valueclasses-magic.scala b/test/files/run/reflection-valueclasses-magic.scala index bc461f629359..07cd824283e6 100644 --- a/test/files/run/reflection-valueclasses-magic.scala +++ b/test/files/run/reflection-valueclasses-magic.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // import scala.reflect.runtime.universe._ import scala.reflect.runtime.universe.definitions._ diff --git a/test/files/run/sequenceComparisons.scala b/test/files/run/sequenceComparisons.scala index 7304745ea248..183b7257412a 100644 --- a/test/files/run/sequenceComparisons.scala +++ b/test/files/run/sequenceComparisons.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation import scala.collection.{ mutable, immutable } import collection.Seq diff --git a/test/files/run/sip23-rangepos.scala b/test/files/run/sip23-rangepos.scala index 69cf08b3c6d4..cf37ec0d019c 100644 --- a/test/files/run/sip23-rangepos.scala +++ b/test/files/run/sip23-rangepos.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // object Test extends App { val foo: "foo" = "foo" diff --git a/test/files/run/string-switch.scala b/test/files/run/string-switch.scala index 6a1522b416d9..fb1d5f9ffa7a 100644 --- a/test/files/run/string-switch.scala +++ b/test/files/run/string-switch.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror import annotation.switch import util.Try diff --git a/test/files/run/synchronized.scala b/test/files/run/synchronized.scala index 8cd024f60755..a8e0fb5375cd 100644 --- a/test/files/run/synchronized.scala +++ b/test/files/run/synchronized.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Wopt:none +//> using options -opt:inline:** -Wopt:none import java.lang.Thread.holdsLock import scala.collection.mutable.StringBuilder diff --git a/test/files/run/t10283.scala b/test/files/run/t10283.scala index a206aa010976..8a432fdec202 100644 --- a/test/files/run/t10283.scala +++ b/test/files/run/t10283.scala @@ -1,4 +1,4 @@ -// scalac: -Xsource:2.13 +//> using options -Xsource:2.13 // trait OpacityTypes { type T diff --git a/test/files/run/t10439.scala b/test/files/run/t10439.scala index 6b2f077cbdd2..a96a79095a04 100644 --- a/test/files/run/t10439.scala +++ b/test/files/run/t10439.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit +//> using options -Xcheckinit // object Test { private var s: String = _ diff --git a/test/files/run/t10539.scala b/test/files/run/t10539.scala index 00a0abe6b5ca..fe120eee956e 100644 --- a/test/files/run/t10539.scala +++ b/test/files/run/t10539.scala @@ -1,4 +1,4 @@ -// scalac: -Xdev +//> using options -Xdev // class A { def ==(a: A) = "LOL" diff --git a/test/files/run/t10692.scala b/test/files/run/t10692.scala index 23f2a8f1b779..de41e5d562d9 100644 --- a/test/files/run/t10692.scala +++ b/test/files/run/t10692.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit +//> using options -Xcheckinit // trait T { private var s: String = _ diff --git a/test/files/run/t11042.scala b/test/files/run/t11042.scala index c0acbcbed328..cdb7fca04e7f 100644 --- a/test/files/run/t11042.scala +++ b/test/files/run/t11042.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation +//> using options -Xlint:deprecation object Test extends App { def f(xs: Array[Int]): Boolean = xs.isInstanceOf[scala.collection.immutable.Seq[_]] def g(xs: Int*): Boolean = xs.isInstanceOf[scala.collection.immutable.Seq[_]] diff --git a/test/files/run/t11255/A_1.scala b/test/files/run/t11255/A_1.scala index ad879d0c16f8..2c7eef1fa0d2 100644 --- a/test/files/run/t11255/A_1.scala +++ b/test/files/run/t11255/A_1.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** class K(val f: Int => Int) extends Serializable class A { @inline final def f = new K(x => x + 1) diff --git a/test/files/run/t11255/Test_2.scala b/test/files/run/t11255/Test_2.scala index 3a257086c6a4..eec0b877a672 100644 --- a/test/files/run/t11255/Test_2.scala +++ b/test/files/run/t11255/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** object Test { def serializeDeserialize(obj: Object): Object = { import java.io._ diff --git a/test/files/run/t11534c.scala b/test/files/run/t11534c.scala index a1fbaf0d72e6..1563a6dfac44 100644 --- a/test/files/run/t11534c.scala +++ b/test/files/run/t11534c.scala @@ -1,4 +1,4 @@ -// scalac: -unchecked +//> using options -unchecked import scala.util.Try object Test { diff --git a/test/files/run/t1167.scala b/test/files/run/t1167.scala index 13d715e3f3f3..d1cb83be67f8 100644 --- a/test/files/run/t1167.scala +++ b/test/files/run/t1167.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:inline +//> using options -Ydelambdafy:inline /** Tests for compatible InnerClasses attribute between trait and * impl classes, as well as anonymous classes. */ diff --git a/test/files/run/t11938.scala b/test/files/run/t11938.scala index e52cfd50e54a..cf48c82fdf1a 100644 --- a/test/files/run/t11938.scala +++ b/test/files/run/t11938.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Wunused +//> using options -Werror -Wunused object Test extends App { for (x @ 1 <- List(1.0)) { assert(x.isInstanceOf[Double]) diff --git a/test/files/run/t12348.scala b/test/files/run/t12348.scala index eddac0626950..3e06c20dc9cd 100644 --- a/test/files/run/t12348.scala +++ b/test/files/run/t12348.scala @@ -1,5 +1,5 @@ // javaVersion: 11+ -// scalac: -release:11 +//> using options -release:11 // this a sequel to t7965. that one only tests MethodHandle. JDK 11 added // signature polymorphic methods to VarHandle, so let's test that too diff --git a/test/files/run/t12799/Test_2.scala b/test/files/run/t12799/Test_2.scala index 030b48e35068..8463af1e831f 100644 --- a/test/files/run/t12799/Test_2.scala +++ b/test/files/run/t12799/Test_2.scala @@ -1,5 +1,5 @@ -// scalac: -Xlint +//> using options -Xlint import example._ diff --git a/test/files/run/t1980.scala b/test/files/run/t1980.scala index 62375005b771..228d7c92b083 100644 --- a/test/files/run/t1980.scala +++ b/test/files/run/t1980.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // class LazyList[+A](expr: => LazyList.Evaluated[A]) { def #:: [B >: A](elem: => B): LazyList[B] = new LazyList(Some((elem, this))) diff --git a/test/files/run/t1987.scala b/test/files/run/t1987.scala index e826911b9388..e3531e579a8c 100644 --- a/test/files/run/t1987.scala +++ b/test/files/run/t1987.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // // a.scala // Fri Jan 13 11:31:47 PST 2012 diff --git a/test/files/run/t2106.scala b/test/files/run/t2106.scala index 4699ef662796..43d660acde22 100644 --- a/test/files/run/t2106.scala +++ b/test/files/run/t2106.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Wopt +//> using options -opt:inline:** -Wopt // class A extends Cloneable { @inline final def foo = clone() diff --git a/test/files/run/t2318.scala b/test/files/run/t2318.scala index c7592037842a..f62d7562723e 100644 --- a/test/files/run/t2318.scala +++ b/test/files/run/t2318.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation +//> using options -Xlint:deprecation // java: -Ddummy=fresh_jvm_needed_to_test_security_manager // filter: WARNING.* // for now, ignore warnings due to reflective invocation diff --git a/test/files/run/t3038b.scala b/test/files/run/t3038b.scala index 6f1c055837a9..16a7ef86228a 100644 --- a/test/files/run/t3038b.scala +++ b/test/files/run/t3038b.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit +//> using options -Xcheckinit // class A { val a1 = 1 diff --git a/test/files/run/t3038d.scala b/test/files/run/t3038d.scala index fe2820d2542c..ac73e0b6f539 100644 --- a/test/files/run/t3038d.scala +++ b/test/files/run/t3038d.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit +//> using options -Xcheckinit // trait Foo { @transient protected var load = 1 diff --git a/test/files/run/t3194.scala b/test/files/run/t3194.scala index c6e0cd53f85d..982a9f40c1db 100644 --- a/test/files/run/t3194.scala +++ b/test/files/run/t3194.scala @@ -1,4 +1,4 @@ -// scalac: -language:_ +//> using options -language:_ import scala.util.chaining._ class A(var x: Int) diff --git a/test/files/run/t3220-213.scala b/test/files/run/t3220-213.scala index a33d94ffefc6..ba8380e8df05 100644 --- a/test/files/run/t3220-213.scala +++ b/test/files/run/t3220-213.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // object Literals { diff --git a/test/files/run/t3235-minimal.scala b/test/files/run/t3235-minimal.scala index 9a95dad59d11..5154a126da66 100644 --- a/test/files/run/t3235-minimal.scala +++ b/test/files/run/t3235-minimal.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // object Test { def main(args: Array[String]): Unit = { diff --git a/test/files/run/t3326.scala b/test/files/run/t3326.scala index 2c9b3f40ac75..cbed2a4c4858 100644 --- a/test/files/run/t3326.scala +++ b/test/files/run/t3326.scala @@ -1,4 +1,4 @@ -// scalac: -Wopt +//> using options -Wopt import scala.math.Ordering /** The heart of the problem - we want to retain the ordering when diff --git a/test/files/run/t3509.scala b/test/files/run/t3509.scala index 1d89a838c580..dbd6a17b022f 100644 --- a/test/files/run/t3509.scala +++ b/test/files/run/t3509.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // object Test { diff --git a/test/files/run/t3569.scala b/test/files/run/t3569.scala index b393e9dcf6a1..4e77df08e49f 100644 --- a/test/files/run/t3569.scala +++ b/test/files/run/t3569.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // object Test { final val bippy1 = 1 diff --git a/test/files/run/t3895.scala b/test/files/run/t3895.scala index d19100dfd0bf..b353aa7d24a3 100644 --- a/test/files/run/t3895.scala +++ b/test/files/run/t3895.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit +//> using options -Xcheckinit // class C extends A{ diff --git a/test/files/run/t3897/a_1.scala b/test/files/run/t3897/a_1.scala index ceabeb450427..9c31837bcef8 100644 --- a/test/files/run/t3897/a_1.scala +++ b/test/files/run/t3897/a_1.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:inline +//> using options -Ydelambdafy:inline class One { private val messages = new collection.mutable.ListBuffer[String] List("a") foreach { messages += _ } diff --git a/test/files/run/t3897/a_2.scala b/test/files/run/t3897/a_2.scala index d9ef2e353dbf..59477c574055 100644 --- a/test/files/run/t3897/a_2.scala +++ b/test/files/run/t3897/a_2.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:inline +//> using options -Ydelambdafy:inline object Test { def f1(clazz: Class[_]) = ( clazz.getDeclaredFields.toList diff --git a/test/files/run/t4072.scala b/test/files/run/t4072.scala index 9cc12e130428..05cf85748914 100644 --- a/test/files/run/t4072.scala +++ b/test/files/run/t4072.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit +//> using options -Xcheckinit // import scala.tools.nsc._ diff --git a/test/files/run/t4225d.scala b/test/files/run/t4225d.scala index 4b506b911415..a6e3fd9e6c0d 100644 --- a/test/files/run/t4225d.scala +++ b/test/files/run/t4225d.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // import scala.language.implicitConversions diff --git a/test/files/run/t4225e.scala b/test/files/run/t4225e.scala index 0b1455c1a0e0..e85e5c5e90cb 100644 --- a/test/files/run/t4225e.scala +++ b/test/files/run/t4225e.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // import scala.language.implicitConversions diff --git a/test/files/run/t4285.scala b/test/files/run/t4285.scala index 3a369235510d..3b8464c5a412 100644 --- a/test/files/run/t4285.scala +++ b/test/files/run/t4285.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // import scala.tools.partest.ReplTest object Test extends ReplTest { diff --git a/test/files/run/t4317/S_1.scala b/test/files/run/t4317/S_1.scala index af40b4f6f4e2..93cf4c053c88 100644 --- a/test/files/run/t4317/S_1.scala +++ b/test/files/run/t4317/S_1.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror import language.existentials object S_1 { diff --git a/test/files/run/t4317/S_3.scala b/test/files/run/t4317/S_3.scala index 8ddf3068e074..065ebaceb3f9 100644 --- a/test/files/run/t4317/S_3.scala +++ b/test/files/run/t4317/S_3.scala @@ -1,4 +1,4 @@ -// scalac: -Werror +//> using options -Werror object Test { def main(args: Array[String]): Unit = { val j = new J_2() diff --git a/test/files/run/t4536.scala b/test/files/run/t4536.scala index 926037695f78..87b349e331b3 100644 --- a/test/files/run/t4536.scala +++ b/test/files/run/t4536.scala @@ -1,4 +1,4 @@ -// scalac: -language:dynamics +//> using options -language:dynamics // diff --git a/test/files/run/t4742.scala b/test/files/run/t4742.scala index da407ace100c..258130df2dad 100644 --- a/test/files/run/t4742.scala +++ b/test/files/run/t4742.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit +//> using options -Xcheckinit // trait T { val x: Int = 0 } object O extends T { override final val x = 1 } diff --git a/test/files/run/t4935.scala b/test/files/run/t4935.scala index 0b3a9a72ad55..c18517cb62b5 100644 --- a/test/files/run/t4935.scala +++ b/test/files/run/t4935.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // object Test extends App { for (i <- 0 to 1) { diff --git a/test/files/run/t5040.scala b/test/files/run/t5040.scala index 5ea3386f2387..507dfedd0915 100644 --- a/test/files/run/t5040.scala +++ b/test/files/run/t5040.scala @@ -1,4 +1,4 @@ -// scalac: -language:dynamics +//> using options -language:dynamics // abstract class Prova2 extends Dynamic { def applyDynamic(m: String)(): Unit diff --git a/test/files/run/t5568.scala b/test/files/run/t5568.scala index 040db3b12975..3c086cde9eeb 100644 --- a/test/files/run/t5568.scala +++ b/test/files/run/t5568.scala @@ -1,4 +1,4 @@ -// scalac: -nowarn +//> using options -nowarn // object Test { def main(args: Array[String]): Unit = { diff --git a/test/files/run/t5648.scala b/test/files/run/t5648.scala index 1c3cd6f2a17c..e87595b8d793 100644 --- a/test/files/run/t5648.scala +++ b/test/files/run/t5648.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // case class C(val s: Int*) diff --git a/test/files/run/t5704.scala b/test/files/run/t5704.scala index 6297fa97bac5..48fccf851a3d 100644 --- a/test/files/run/t5704.scala +++ b/test/files/run/t5704.scala @@ -1,4 +1,4 @@ -// scalac: -language:experimental.macros +//> using options -language:experimental.macros // import scala.reflect.runtime.universe._ import scala.reflect.runtime.{universe => ru} diff --git a/test/files/run/t5830.scala b/test/files/run/t5830.scala index 296651f439de..2d5523bf449f 100644 --- a/test/files/run/t5830.scala +++ b/test/files/run/t5830.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // import scala.annotation.switch diff --git a/test/files/run/t5857.scala b/test/files/run/t5857.scala index 4812e494529a..6ea10db6362a 100644 --- a/test/files/run/t5857.scala +++ b/test/files/run/t5857.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // import scala.math.Ordering.Double.IeeeOrdering diff --git a/test/files/run/t5903a/Macros_1.scala b/test/files/run/t5903a/Macros_1.scala index 0b1380af89f9..2e66800e9630 100644 --- a/test/files/run/t5903a/Macros_1.scala +++ b/test/files/run/t5903a/Macros_1.scala @@ -1,4 +1,4 @@ -// scalac: -Vreflective-calls +//> using options -Vreflective-calls import scala.reflect.macros.whitebox.Context import language.experimental.macros diff --git a/test/files/run/t5903a/Test_2.scala b/test/files/run/t5903a/Test_2.scala index 74e8c6660552..5fc374c0f393 100644 --- a/test/files/run/t5903a/Test_2.scala +++ b/test/files/run/t5903a/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Vreflective-calls +//> using options -Vreflective-calls object Test extends App { import NewQuasiquotes._ SomeTree match { diff --git a/test/files/run/t5903c/Macros_1.scala b/test/files/run/t5903c/Macros_1.scala index 41b77eba18eb..474fcb2b723d 100644 --- a/test/files/run/t5903c/Macros_1.scala +++ b/test/files/run/t5903c/Macros_1.scala @@ -1,4 +1,4 @@ -// scalac: -Vreflective-calls +//> using options -Vreflective-calls import scala.reflect.macros.whitebox.Context import language.experimental.macros diff --git a/test/files/run/t5903c/Test_2.scala b/test/files/run/t5903c/Test_2.scala index 5a1e7c54e744..db705fcf352b 100644 --- a/test/files/run/t5903c/Test_2.scala +++ b/test/files/run/t5903c/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Vreflective-calls +//> using options -Vreflective-calls object Test extends App { import Interpolation._ 2 match { diff --git a/test/files/run/t5903d/Macros_1.scala b/test/files/run/t5903d/Macros_1.scala index f0fd4801296f..feedf6eccd69 100644 --- a/test/files/run/t5903d/Macros_1.scala +++ b/test/files/run/t5903d/Macros_1.scala @@ -1,4 +1,4 @@ -// scalac: -Vreflective-calls +//> using options -Vreflective-calls import scala.reflect.macros.whitebox.Context import language.experimental.macros diff --git a/test/files/run/t5903d/Test_2.scala b/test/files/run/t5903d/Test_2.scala index 1871197c1662..a64890fd8b58 100644 --- a/test/files/run/t5903d/Test_2.scala +++ b/test/files/run/t5903d/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -Vreflective-calls +//> using options -Vreflective-calls object Test extends App { import Interpolation._ 42 match { diff --git a/test/files/run/t5905-features.scala b/test/files/run/t5905-features.scala index d411f7d92148..a00d988a3a0b 100644 --- a/test/files/run/t5905-features.scala +++ b/test/files/run/t5905-features.scala @@ -1,4 +1,4 @@ -// scalac: -nowarn +//> using options -nowarn // import tools.partest.DirectTest diff --git a/test/files/run/t6102.scala b/test/files/run/t6102.scala index edcdf439b857..b5dbb970b22f 100644 --- a/test/files/run/t6102.scala +++ b/test/files/run/t6102.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Werror +//> using options -opt:inline:** -Werror // // scala/bug#6102 Wrong bytecode in lazyval + no-op finally clause diff --git a/test/files/run/t6146b.scala b/test/files/run/t6146b.scala index 62e9ebf50124..c28754be5031 100644 --- a/test/files/run/t6146b.scala +++ b/test/files/run/t6146b.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation +//> using options -Xlint:deprecation // import scala.tools.partest.ReplTest diff --git a/test/files/run/t6188.scala b/test/files/run/t6188.scala index 26dde6ea1d53..c1529b26cbc6 100644 --- a/test/files/run/t6188.scala +++ b/test/files/run/t6188.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // // scala/bug#6188 Optimizer incorrectly removes method invocations containing throw expressions diff --git a/test/files/run/t6327.scala b/test/files/run/t6327.scala index 7ebba247b871..698cc5fdf66d 100644 --- a/test/files/run/t6327.scala +++ b/test/files/run/t6327.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false +//> using options -Yrangepos:false // import language._ diff --git a/test/files/run/t6541.scala b/test/files/run/t6541.scala index 4f193e3a15c3..c422e91b255e 100644 --- a/test/files/run/t6541.scala +++ b/test/files/run/t6541.scala @@ -1,4 +1,4 @@ -// scalac: -feature -Werror +//> using options -feature -Werror // class A class B[T](x: T) diff --git a/test/files/run/t657.scala b/test/files/run/t657.scala index 882c9bf3fb71..9c30c12adde8 100644 --- a/test/files/run/t657.scala +++ b/test/files/run/t657.scala @@ -1,4 +1,4 @@ -// scalac: -Werror -Xlint:deprecation +//> using options -Werror -Xlint:deprecation // import scala.language.{ implicitConversions } diff --git a/test/files/run/t6663.scala b/test/files/run/t6663.scala index e93dca2afdbd..a30a45c7a06b 100644 --- a/test/files/run/t6663.scala +++ b/test/files/run/t6663.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false +//> using options -Yrangepos:false // import language.dynamics diff --git a/test/files/run/t6677b.scala b/test/files/run/t6677b.scala index 764f5ac4a0cb..a68623ff3bdf 100644 --- a/test/files/run/t6677b.scala +++ b/test/files/run/t6677b.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation +//> using options -Xlint:deprecation // trait U { diff --git a/test/files/run/t6714.scala b/test/files/run/t6714.scala index f778ecaf17f9..18f1dabc3c2d 100644 --- a/test/files/run/t6714.scala +++ b/test/files/run/t6714.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos +//> using options -Yrangepos // case class A(a: Int, index: Int) { diff --git a/test/files/run/t6731.scala b/test/files/run/t6731.scala index 8ea4962558dc..8fc224a75138 100644 --- a/test/files/run/t6731.scala +++ b/test/files/run/t6731.scala @@ -1,4 +1,4 @@ -// scalac: -Yrangepos:false -deprecation +//> using options -Yrangepos:false -deprecation // import scala.language.dynamics import scala.reflect.{ ClassTag, classTag } diff --git a/test/files/run/t7341.scala b/test/files/run/t7341.scala index a03e8e853462..d0b85377c256 100644 --- a/test/files/run/t7341.scala +++ b/test/files/run/t7341.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit +//> using options -Xcheckinit // object Obj { private var cache: Any = () diff --git a/test/files/run/t744.scala b/test/files/run/t744.scala index e5b4407284a1..549362c92dc6 100644 --- a/test/files/run/t744.scala +++ b/test/files/run/t744.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:deprecation +//> using options -Xlint:deprecation // trait Linked { diff --git a/test/files/run/t7448.scala b/test/files/run/t7448.scala index 5bf74ee85a77..ae8143413382 100644 --- a/test/files/run/t7448.scala +++ b/test/files/run/t7448.scala @@ -1,4 +1,4 @@ -// scalac: -nowarn +//> using options -nowarn import util.chaining._ object Test { diff --git a/test/files/run/t7459b-optimize.scala b/test/files/run/t7459b-optimize.scala index ececda96b499..225723b1dc11 100644 --- a/test/files/run/t7459b-optimize.scala +++ b/test/files/run/t7459b-optimize.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // class LM { class Node[B1] diff --git a/test/files/run/t7582/InlineHolder_2.scala b/test/files/run/t7582/InlineHolder_2.scala index 82eb737299e1..7fc43890bdd6 100644 --- a/test/files/run/t7582/InlineHolder_2.scala +++ b/test/files/run/t7582/InlineHolder_2.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Wopt +//> using options -opt:inline:** -Wopt package p1 { object InlineHolder { @inline def inlinable = (p1.PackageProtectedJava_1.protectedMethod(): @noinline) + 1 diff --git a/test/files/run/t7582b/InlineHolder_2.scala b/test/files/run/t7582b/InlineHolder_2.scala index 82eb737299e1..7fc43890bdd6 100644 --- a/test/files/run/t7582b/InlineHolder_2.scala +++ b/test/files/run/t7582b/InlineHolder_2.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** -Wopt +//> using options -opt:inline:** -Wopt package p1 { object InlineHolder { @inline def inlinable = (p1.PackageProtectedJava_1.protectedMethod(): @noinline) + 1 diff --git a/test/files/run/t7584.scala b/test/files/run/t7584.scala index a830cbf735b7..9b7bf8f4abe3 100644 --- a/test/files/run/t7584.scala +++ b/test/files/run/t7584.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // // Test case added to show the behaviour of functions with // by-name parameters. The evaluation behaviour was already correct. diff --git a/test/files/run/t7974/Test.scala b/test/files/run/t7974/Test.scala index 879313f45fc5..675b9907bf16 100644 --- a/test/files/run/t7974/Test.scala +++ b/test/files/run/t7974/Test.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit:false +//> using options -Xcheckinit:false import java.io.PrintWriter import scala.tools.partest.BytecodeTest diff --git a/test/files/run/t8017/value-class-lambda.scala b/test/files/run/t8017/value-class-lambda.scala index 212a772c221b..a3b34b1ba93c 100644 --- a/test/files/run/t8017/value-class-lambda.scala +++ b/test/files/run/t8017/value-class-lambda.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:method +//> using options -Ydelambdafy:method object Test { def testC: Unit = { val f1 = (c: C) => c.value diff --git a/test/files/run/t8570.scala b/test/files/run/t8570.scala index a7d6c449bcb6..9b9a1e3d0fe5 100644 --- a/test/files/run/t8570.scala +++ b/test/files/run/t8570.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit +//> using options -Xcheckinit // trait Trait40_1 { val value37_2 = () diff --git a/test/files/run/t8570a.scala b/test/files/run/t8570a.scala index cc0ea4012457..1b78ec0fcc0d 100644 --- a/test/files/run/t8570a.scala +++ b/test/files/run/t8570a.scala @@ -1,4 +1,4 @@ -// scalac: -Xcheckinit +//> using options -Xcheckinit // trait Trait40_1 { val value37_2 = () diff --git a/test/files/run/t8601-closure-elim.scala b/test/files/run/t8601-closure-elim.scala index d65a0876b11b..1f7f445f7098 100644 --- a/test/files/run/t8601-closure-elim.scala +++ b/test/files/run/t8601-closure-elim.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:method -opt:inline:** +//> using options -Ydelambdafy:method -opt:inline:** // import scala.tools.partest.BytecodeTest import scala.tools.testkit.ASMConverters.instructionsFromMethod diff --git a/test/files/run/t8601.scala b/test/files/run/t8601.scala index 9858f6220094..1fc36c2f1255 100644 --- a/test/files/run/t8601.scala +++ b/test/files/run/t8601.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // object Test { def idiv(x: Int): Unit = x / 0 diff --git a/test/files/run/t8601b.scala b/test/files/run/t8601b.scala index d8daece4e25f..8f0312a34324 100644 --- a/test/files/run/t8601b.scala +++ b/test/files/run/t8601b.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // object Test { def len(x: Array[String]): Unit = x.length diff --git a/test/files/run/t8601c.scala b/test/files/run/t8601c.scala index 403e506ddf98..55566a8e8ffb 100644 --- a/test/files/run/t8601c.scala +++ b/test/files/run/t8601c.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // object Test { def loadField(x: scala.runtime.IntRef): Unit = x.elem diff --git a/test/files/run/t8601d.scala b/test/files/run/t8601d.scala index c567abcd434a..46d35e60152a 100644 --- a/test/files/run/t8601d.scala +++ b/test/files/run/t8601d.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // object Test { def monitor(x: AnyRef): Unit = {x.synchronized(()); ()} diff --git a/test/files/run/t8601e/Test.scala b/test/files/run/t8601e/Test.scala index 44a8eb18b756..99667f24b8ff 100644 --- a/test/files/run/t8601e/Test.scala +++ b/test/files/run/t8601e/Test.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** class C { def foo: Unit = {StaticInit.fld} } diff --git a/test/files/run/t8610.scala b/test/files/run/t8610.scala index 932b7bab5dd5..0bcca528f2d0 100644 --- a/test/files/run/t8610.scala +++ b/test/files/run/t8610.scala @@ -1,4 +1,4 @@ -// scalac: -Xlint:adapted-args +//> using options -Xlint:adapted-args // // flags don't warn on u diff --git a/test/files/run/t8611a.scala b/test/files/run/t8611a.scala index b4895bbaf85d..69ae2ba167bf 100644 --- a/test/files/run/t8611a.scala +++ b/test/files/run/t8611a.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // trait K trait L diff --git a/test/files/run/t8611b.scala b/test/files/run/t8611b.scala index 3ababcdc9062..fd091be8a1dc 100644 --- a/test/files/run/t8611b.scala +++ b/test/files/run/t8611b.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // sealed trait KrafsDescription diff --git a/test/files/run/t8611c.scala b/test/files/run/t8611c.scala index c216d30c4a3f..44f6708a96c8 100644 --- a/test/files/run/t8611c.scala +++ b/test/files/run/t8611c.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // trait K trait L diff --git a/test/files/run/t8888.scala b/test/files/run/t8888.scala index 1ac421625fff..301af0e26801 100644 --- a/test/files/run/t8888.scala +++ b/test/files/run/t8888.scala @@ -1,4 +1,4 @@ -// scalac: -Ydelambdafy:method +//> using options -Ydelambdafy:method // class C { final def resume: Any = (this: Any) match { diff --git a/test/files/run/t9003.scala b/test/files/run/t9003.scala index b5dc21027476..f84137c75b5e 100644 --- a/test/files/run/t9003.scala +++ b/test/files/run/t9003.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** // object Single { var i = 0 diff --git a/test/files/run/t9029.scala b/test/files/run/t9029.scala index 52dbc58378e3..538b9b14c817 100644 --- a/test/files/run/t9029.scala +++ b/test/files/run/t9029.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // class Y(val _2: Int, val _1: String) diff --git a/test/files/run/t9403/C_1.scala b/test/files/run/t9403/C_1.scala index e3b5c6d75b28..3ca2955ffa90 100644 --- a/test/files/run/t9403/C_1.scala +++ b/test/files/run/t9403/C_1.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** package p class C { @inline final def f(x: Int): Long = 10L / (if (x < 0) -2 else 2) diff --git a/test/files/run/t9403/Test_2.scala b/test/files/run/t9403/Test_2.scala index be56f42073b8..54bc0a805d93 100644 --- a/test/files/run/t9403/Test_2.scala +++ b/test/files/run/t9403/Test_2.scala @@ -1,4 +1,4 @@ -// scalac: -opt:inline:** +//> using options -opt:inline:** import p.C import scala.tools.asm.Opcodes import scala.tools.partest.BytecodeTest diff --git a/test/files/run/t9656.scala b/test/files/run/t9656.scala index 3b97bc72a3c6..28a8cc05638f 100644 --- a/test/files/run/t9656.scala +++ b/test/files/run/t9656.scala @@ -1,4 +1,4 @@ -// scalac: -deprecation +//> using options -deprecation // import scala.math.BigDecimal diff --git a/test/files/run/virtpatmat_extends_product.scala b/test/files/run/virtpatmat_extends_product.scala index de1a4970483c..95fac8941796 100644 --- a/test/files/run/virtpatmat_extends_product.scala +++ b/test/files/run/virtpatmat_extends_product.scala @@ -1,4 +1,4 @@ -// scalac: +//> using options // object Test extends App { case class AnnotationInfo(a: String, b: Int) extends Product2[String, Int] { diff --git a/test/files/run/virtpatmat_nested_lists.scala b/test/files/run/virtpatmat_nested_lists.scala index 58f36b642303..73223d3b7b09 100644 --- a/test/files/run/virtpatmat_nested_lists.scala +++ b/test/files/run/virtpatmat_nested_lists.scala @@ -1,4 +1,4 @@ -// scalac: -Ypatmat-exhaust-depth off +//> using options -Ypatmat-exhaust-depth off object Test extends App { List(List(1), List(2)) match { case x :: (y :: Nil) :: Nil => println(y) } } diff --git a/test/files/run/virtpatmat_opt_sharing.scala b/test/files/run/virtpatmat_opt_sharing.scala index 988f963c8ec7..90afce4071d9 100644 --- a/test/files/run/virtpatmat_opt_sharing.scala +++ b/test/files/run/virtpatmat_opt_sharing.scala @@ -1,4 +1,4 @@ -// scalac: -Ypatmat-exhaust-depth off +//> using options -Ypatmat-exhaust-depth off object Test extends App { virtMatch() def virtMatch() = { diff --git a/test/files/run/virtpatmat_typetag.scala b/test/files/run/virtpatmat_typetag.scala index 0cf409fd3350..7af79a703ffe 100644 --- a/test/files/run/virtpatmat_typetag.scala +++ b/test/files/run/virtpatmat_typetag.scala @@ -1,4 +1,4 @@ -// scalac: -Xfatal-warnings +//> using options -Xfatal-warnings // import reflect.{ClassTag, classTag} diff --git a/test/files/run/wacky-value-classes.scala b/test/files/run/wacky-value-classes.scala index c62c70873aa0..74d5b3e52587 100644 --- a/test/files/run/wacky-value-classes.scala +++ b/test/files/run/wacky-value-classes.scala @@ -1,4 +1,4 @@ -// scalac: -Xverify +//> using options -Xverify // // scala/bug#10361 final class AnyValNothing(val self: Nothing) extends AnyVal