diff --git a/tests/neg-macros/i18677-a.check b/tests/neg-macros/i18677-a.check index 976ff7bddda2..963affc47181 100644 --- a/tests/neg-macros/i18677-a.check +++ b/tests/neg-macros/i18677-a.check @@ -7,10 +7,10 @@ |The tree does not conform to the compiler's tree invariants. | |Macro was: - |@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-a/Test_2.scala") @extendFoo class AFoo() + |@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-a/Test_2.scala") @scala.annotation.experimental @extendFoo class AFoo() | |The macro returned: - |@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-a/Test_2.scala") @extendFoo class AFoo() extends Foo + |@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-a/Test_2.scala") @scala.annotation.experimental @extendFoo class AFoo() extends Foo | |Error: |assertion failed: Parents of class symbol differs from the parents in the tree for class AFoo diff --git a/tests/neg-macros/i18677-a/Macro_1.scala b/tests/neg-macros/i18677-a/Macro_1.scala index f624d2d15782..c3df616ed4e6 100644 --- a/tests/neg-macros/i18677-a/Macro_1.scala +++ b/tests/neg-macros/i18677-a/Macro_1.scala @@ -1,4 +1,4 @@ -//> using -expermiental +//> using options -experimental -Yno-experimental import annotation.MacroAnnotation import quoted.* diff --git a/tests/neg-macros/i18677-a/Test_2.scala b/tests/neg-macros/i18677-a/Test_2.scala index 486d7e09a4bc..5fb6680df0ca 100644 --- a/tests/neg-macros/i18677-a/Test_2.scala +++ b/tests/neg-macros/i18677-a/Test_2.scala @@ -1,4 +1,4 @@ -//> using -expermiental +//> using options -experimental -Yno-experimental @extendFoo class AFoo // error \ No newline at end of file diff --git a/tests/neg-macros/i18677-b.check b/tests/neg-macros/i18677-b.check index b6d817a53706..b8fecde2e36d 100644 --- a/tests/neg-macros/i18677-b.check +++ b/tests/neg-macros/i18677-b.check @@ -7,10 +7,10 @@ |The tree does not conform to the compiler's tree invariants. | |Macro was: - |@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-b/Test_2.scala") @extendFoo class AFoo() + |@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-b/Test_2.scala") @scala.annotation.experimental @extendFoo class AFoo() | |The macro returned: - |@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-b/Test_2.scala") @extendFoo class AFoo() extends Foo + |@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-b/Test_2.scala") @scala.annotation.experimental @extendFoo class AFoo() extends Foo | |Error: |assertion failed: Parents of class symbol differs from the parents in the tree for class AFoo diff --git a/tests/neg-macros/i18677-b/Macro_1.scala b/tests/neg-macros/i18677-b/Macro_1.scala index b2ff946ad302..9e1b9be5e696 100644 --- a/tests/neg-macros/i18677-b/Macro_1.scala +++ b/tests/neg-macros/i18677-b/Macro_1.scala @@ -1,4 +1,4 @@ -//> using -expermiental +//> using options -experimental -Yno-experimental import annotation.MacroAnnotation import quoted.* diff --git a/tests/neg-macros/i18677-b/Test_2.scala b/tests/neg-macros/i18677-b/Test_2.scala index 486d7e09a4bc..5fb6680df0ca 100644 --- a/tests/neg-macros/i18677-b/Test_2.scala +++ b/tests/neg-macros/i18677-b/Test_2.scala @@ -1,4 +1,4 @@ -//> using -expermiental +//> using options -experimental -Yno-experimental @extendFoo class AFoo // error \ No newline at end of file diff --git a/tests/neg-macros/newClassExtendsNoParents/Macro_1.scala b/tests/neg-macros/newClassExtendsNoParents/Macro_1.scala index 5280ffba0f53..663e5e959e87 100644 --- a/tests/neg-macros/newClassExtendsNoParents/Macro_1.scala +++ b/tests/neg-macros/newClassExtendsNoParents/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.quoted.* inline def makeClass(inline name: String): Any = ${ makeClassExpr('name) } diff --git a/tests/neg-macros/newClassExtendsNoParents/Test_2.scala b/tests/neg-macros/newClassExtendsNoParents/Test_2.scala index eada3ba7e67a..733879441e91 100644 --- a/tests/neg-macros/newClassExtendsNoParents/Test_2.scala +++ b/tests/neg-macros/newClassExtendsNoParents/Test_2.scala @@ -1 +1,3 @@ +//> using options -experimental -Yno-experimental + def test: Any = makeClass("foo") // error diff --git a/tests/neg-macros/newClassExtendsOnlyTrait/Macro_1.scala b/tests/neg-macros/newClassExtendsOnlyTrait/Macro_1.scala index d1fd45399157..a6a4753185ba 100644 --- a/tests/neg-macros/newClassExtendsOnlyTrait/Macro_1.scala +++ b/tests/neg-macros/newClassExtendsOnlyTrait/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.quoted.* inline def makeClass(inline name: String): Foo = ${ makeClassExpr('name) } diff --git a/tests/neg-macros/newClassExtendsOnlyTrait/Test_2.scala b/tests/neg-macros/newClassExtendsOnlyTrait/Test_2.scala index d8636c811214..b9aaa2a87c60 100644 --- a/tests/neg-macros/newClassExtendsOnlyTrait/Test_2.scala +++ b/tests/neg-macros/newClassExtendsOnlyTrait/Test_2.scala @@ -1 +1,3 @@ +//> using options -experimental -Yno-experimental + def test: Foo = makeClass("foo") // error diff --git a/tests/pos-macros/annot-in-object/Macro_1.scala b/tests/pos-macros/annot-in-object/Macro_1.scala index 52c5daec1f29..143bd46b8ecc 100644 --- a/tests/pos-macros/annot-in-object/Macro_1.scala +++ b/tests/pos-macros/annot-in-object/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ diff --git a/tests/pos-macros/annot-in-object/Test_2.scala b/tests/pos-macros/annot-in-object/Test_2.scala index 4fc43d4f2e41..146b426b0bf8 100644 --- a/tests/pos-macros/annot-in-object/Test_2.scala +++ b/tests/pos-macros/annot-in-object/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @Foo.void @Foo.Bar.void def test = 0 diff --git a/tests/pos-macros/annot-suspend/Macro_1.scala b/tests/pos-macros/annot-suspend/Macro_1.scala index afbf05e568c7..3c391a1a041f 100644 --- a/tests/pos-macros/annot-suspend/Macro_1.scala +++ b/tests/pos-macros/annot-suspend/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ diff --git a/tests/pos-macros/annot-suspend/Test_2.scala b/tests/pos-macros/annot-suspend/Test_2.scala index ee8529fa4414..8014af03235c 100644 --- a/tests/pos-macros/annot-suspend/Test_2.scala +++ b/tests/pos-macros/annot-suspend/Test_2.scala @@ -1,2 +1,4 @@ +//> using options -experimental -Yno-experimental + @void def test = 0 diff --git a/tests/pos-macros/annot-then-inline/Macro_1.scala b/tests/pos-macros/annot-then-inline/Macro_1.scala index 8e966be862cd..99fece18299a 100644 --- a/tests/pos-macros/annot-then-inline/Macro_1.scala +++ b/tests/pos-macros/annot-then-inline/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ diff --git a/tests/pos-macros/annot-then-inline/Test_2.scala b/tests/pos-macros/annot-then-inline/Test_2.scala index 3e72fcaaae1d..99cb2e4e4d5b 100644 --- a/tests/pos-macros/annot-then-inline/Test_2.scala +++ b/tests/pos-macros/annot-then-inline/Test_2.scala @@ -1,2 +1,4 @@ +//> using options -experimental -Yno-experimental + @useInlinedIdentity def test = 0 diff --git a/tests/pos-macros/i15413/Macro_1.scala b/tests/pos-macros/i15413/Macro_1.scala index 56fd4f0f0887..6166a5d6f55d 100644 --- a/tests/pos-macros/i15413/Macro_1.scala +++ b/tests/pos-macros/i15413/Macro_1.scala @@ -1,4 +1,4 @@ -//> using options -Werror -WunstableInlineAccessors +//> using options -experimental -Yno-experimental -Werror -WunstableInlineAccessors import scala.quoted.* import scala.annotation.publicInBinary diff --git a/tests/pos-macros/i15413/Test_2.scala b/tests/pos-macros/i15413/Test_2.scala index a8310a8970fd..7f8c90161c66 100644 --- a/tests/pos-macros/i15413/Test_2.scala +++ b/tests/pos-macros/i15413/Test_2.scala @@ -1,2 +1,4 @@ +//> using options -experimental -Yno-experimental + def test = new Macro().foo diff --git a/tests/pos-macros/i15413b/Macro_1.scala b/tests/pos-macros/i15413b/Macro_1.scala index c1e9bab422f8..b8a91eaba0fe 100644 --- a/tests/pos-macros/i15413b/Macro_1.scala +++ b/tests/pos-macros/i15413b/Macro_1.scala @@ -1,4 +1,4 @@ -//> using options -Werror -WunstableInlineAccessors +//> using options -experimental -Yno-experimental -Werror -WunstableInlineAccessors package bar diff --git a/tests/pos-macros/i15413b/Test_2.scala b/tests/pos-macros/i15413b/Test_2.scala index 5fc688c79b68..f03559b9adb9 100644 --- a/tests/pos-macros/i15413b/Test_2.scala +++ b/tests/pos-macros/i15413b/Test_2.scala @@ -1 +1,3 @@ +//> using options -experimental -Yno-experimental + def test = bar.foo diff --git a/tests/pos-macros/i19526b/Test.scala b/tests/pos-macros/i19526b/Test.scala index 1cc037298e01..ede2db53c5b0 100644 --- a/tests/pos-macros/i19526b/Test.scala +++ b/tests/pos-macros/i19526b/Test.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + package crash.test case class Stack private[crash] ( diff --git a/tests/run-macros/Xmacro-settings-compileTimeEnv/Test.scala b/tests/run-macros/Xmacro-settings-compileTimeEnv/Test.scala index 620d2b85d185..aee87a46ce81 100644 --- a/tests/run-macros/Xmacro-settings-compileTimeEnv/Test.scala +++ b/tests/run-macros/Xmacro-settings-compileTimeEnv/Test.scala @@ -1,4 +1,4 @@ -//> using options -Xmacro-settings:a,b=1,c.b.a=x.y.z=1,myLogger.level=INFO +//> using options -experimental -Yno-experimental -Xmacro-settings:a,b=1,c.b.a=x.y.z=1,myLogger.level=INFO import scala.compiletime.* diff --git a/tests/run-macros/Xmacro-settings-simple/M1.scala b/tests/run-macros/Xmacro-settings-simple/M1.scala index 1210d1abe05e..57a8be886ba1 100644 --- a/tests/run-macros/Xmacro-settings-simple/M1.scala +++ b/tests/run-macros/Xmacro-settings-simple/M1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + package x import scala.quoted.* diff --git a/tests/run-macros/annot-add-global-class/Macro_1.scala b/tests/run-macros/annot-add-global-class/Macro_1.scala index 128b66bd6eb1..6ac77913e3ab 100644 --- a/tests/run-macros/annot-add-global-class/Macro_1.scala +++ b/tests/run-macros/annot-add-global-class/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + package mymacro import scala.annotation.{experimental, MacroAnnotation} diff --git a/tests/run-macros/annot-add-global-class/Test_2.scala b/tests/run-macros/annot-add-global-class/Test_2.scala index 11386bcc0bc5..824dd2381760 100644 --- a/tests/run-macros/annot-add-global-class/Test_2.scala +++ b/tests/run-macros/annot-add-global-class/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import mymacro.addClass @addClass def foo(): Unit = diff --git a/tests/run-macros/annot-add-global-object/Macro_1.scala b/tests/run-macros/annot-add-global-object/Macro_1.scala index b8d1dfd7dc42..f7c901a49aa5 100644 --- a/tests/run-macros/annot-add-global-object/Macro_1.scala +++ b/tests/run-macros/annot-add-global-object/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-add-global-object/Test_2.scala b/tests/run-macros/annot-add-global-object/Test_2.scala index 2007c751bbec..181bc4e935ea 100644 --- a/tests/run-macros/annot-add-global-object/Test_2.scala +++ b/tests/run-macros/annot-add-global-object/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @addClass def foo(): Unit = println("macro generated main") println("executed in: " + (new Throwable().getStackTrace().head.getClassName)) diff --git a/tests/run-macros/annot-add-local-class/Macro_1.scala b/tests/run-macros/annot-add-local-class/Macro_1.scala index 8cbf30dfc923..57a2d543ffbc 100644 --- a/tests/run-macros/annot-add-local-class/Macro_1.scala +++ b/tests/run-macros/annot-add-local-class/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-add-local-class/Test_2.scala b/tests/run-macros/annot-add-local-class/Test_2.scala index e52ca30f8d9f..8fe4f9db5656 100644 --- a/tests/run-macros/annot-add-local-class/Test_2.scala +++ b/tests/run-macros/annot-add-local-class/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @main def Test(): Unit = @addClass def foo(): Unit = println("macro generated main") diff --git a/tests/run-macros/annot-add-local-object/Macro_1.scala b/tests/run-macros/annot-add-local-object/Macro_1.scala index d02ee7600194..6f6e11e7361c 100644 --- a/tests/run-macros/annot-add-local-object/Macro_1.scala +++ b/tests/run-macros/annot-add-local-object/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-add-local-object/Test_2.scala b/tests/run-macros/annot-add-local-object/Test_2.scala index a7f6d74a02e2..0ff7862fb338 100644 --- a/tests/run-macros/annot-add-local-object/Test_2.scala +++ b/tests/run-macros/annot-add-local-object/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @main def Test(): Unit = @addClass def foo(): Unit = println("macro generated main") diff --git a/tests/run-macros/annot-add-nested-class/Macro_1.scala b/tests/run-macros/annot-add-nested-class/Macro_1.scala index 2edbe5e48cd3..e13e3841501a 100644 --- a/tests/run-macros/annot-add-nested-class/Macro_1.scala +++ b/tests/run-macros/annot-add-nested-class/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-add-nested-class/Test_2.scala b/tests/run-macros/annot-add-nested-class/Test_2.scala index f363cf58c3a4..b92225b7f107 100644 --- a/tests/run-macros/annot-add-nested-class/Test_2.scala +++ b/tests/run-macros/annot-add-nested-class/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + class Foo(): @addClass def foo(): Unit = println("macro generated main") diff --git a/tests/run-macros/annot-add-nested-object/Macro_1.scala b/tests/run-macros/annot-add-nested-object/Macro_1.scala index e10455e88678..f8cde8de5bf0 100644 --- a/tests/run-macros/annot-add-nested-object/Macro_1.scala +++ b/tests/run-macros/annot-add-nested-object/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-add-nested-object/Test_2.scala b/tests/run-macros/annot-add-nested-object/Test_2.scala index 2bf54d73d0e6..cf6b3a8400fe 100644 --- a/tests/run-macros/annot-add-nested-object/Test_2.scala +++ b/tests/run-macros/annot-add-nested-object/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + class Foo(): @addClass def foo(): Unit = println("macro generated main") diff --git a/tests/run-macros/annot-annot-order/Macro_1.scala b/tests/run-macros/annot-annot-order/Macro_1.scala index 0e1e71488aae..9d3e8e40c01a 100644 --- a/tests/run-macros/annot-annot-order/Macro_1.scala +++ b/tests/run-macros/annot-annot-order/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ diff --git a/tests/run-macros/annot-annot-order/Test_2.scala b/tests/run-macros/annot-annot-order/Test_2.scala index a112c0a2e096..2c073bdcbb7b 100644 --- a/tests/run-macros/annot-annot-order/Test_2.scala +++ b/tests/run-macros/annot-annot-order/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @print("foo") def foo(): Unit = () diff --git a/tests/run-macros/annot-bind/Macro_1.scala b/tests/run-macros/annot-bind/Macro_1.scala index a0aa69ca356f..0997f35ccf4a 100644 --- a/tests/run-macros/annot-bind/Macro_1.scala +++ b/tests/run-macros/annot-bind/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ diff --git a/tests/run-macros/annot-bind/Test_2.scala b/tests/run-macros/annot-bind/Test_2.scala index e30ead520721..60895adabc24 100644 --- a/tests/run-macros/annot-bind/Test_2.scala +++ b/tests/run-macros/annot-bind/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @bind("a") val foo: String = "foo" diff --git a/tests/run-macros/annot-changeVal/Macro_1.scala b/tests/run-macros/annot-changeVal/Macro_1.scala index 8f865afade5b..d55282f8c390 100644 --- a/tests/run-macros/annot-changeVal/Macro_1.scala +++ b/tests/run-macros/annot-changeVal/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.experimental import scala.quoted.* import scala.annotation.MacroAnnotation diff --git a/tests/run-macros/annot-changeVal/Test_2.scala b/tests/run-macros/annot-changeVal/Test_2.scala index 6e0e44ad8885..8e048e885651 100644 --- a/tests/run-macros/annot-changeVal/Test_2.scala +++ b/tests/run-macros/annot-changeVal/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import ChangeVal._ class Bar: diff --git a/tests/run-macros/annot-concrete-class/Macro_1.scala b/tests/run-macros/annot-concrete-class/Macro_1.scala index 54d1bc7c20ce..e91f9c1ccafe 100644 --- a/tests/run-macros/annot-concrete-class/Macro_1.scala +++ b/tests/run-macros/annot-concrete-class/Macro_1.scala @@ -1,16 +1,18 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.MacroAnnotation import scala.quoted.* class implementAFoo extends MacroAnnotation: - def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = + def transform(using Quotes)(tree: quotes.reflect.Definition): List[quotes.reflect.Definition] = import quotes.reflect.* tree match - case ClassDef(name, cstr, parents, self, body) => + case ClassDef(name, cstr, parents, self, body) => val owner = tree.symbol val sym = Symbol.newMethod(tree.symbol, "foo", ByNameType.apply(TypeRepr.of[String])) val mtd = DefDef.apply(sym, _ => Some(Literal(StringConstant("Hello, I was added by a MacroAnnotation and without being defined in the class.")))) List(ClassDef.copy(tree)(name, cstr, parents, self, mtd :: body)) case _ => report.errorAndAbort(s"@implementAFoo can only be applied to classes that extend AFoo") - + end implementAFoo diff --git a/tests/run-macros/annot-concrete-class/Test_2.scala b/tests/run-macros/annot-concrete-class/Test_2.scala index 713b0d814813..7b8fc5cd0f94 100644 --- a/tests/run-macros/annot-concrete-class/Test_2.scala +++ b/tests/run-macros/annot-concrete-class/Test_2.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental trait AFoo: def foo: String @@ -5,7 +6,6 @@ trait AFoo: @implementAFoo class Foo extends AFoo -@main def Test = +@main def Test = val foo = new Foo println(foo.foo) - \ No newline at end of file diff --git a/tests/run-macros/annot-export/Macro_1.scala b/tests/run-macros/annot-export/Macro_1.scala index 9a8267bfae4b..fbe97684079b 100644 --- a/tests/run-macros/annot-export/Macro_1.scala +++ b/tests/run-macros/annot-export/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable.Map diff --git a/tests/run-macros/annot-export/Test_2.scala b/tests/run-macros/annot-export/Test_2.scala index abae5716bc5d..86bbee9c93fd 100644 --- a/tests/run-macros/annot-export/Test_2.scala +++ b/tests/run-macros/annot-export/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + object Bar: @returnClassName def f(): String = ??? // def f(): String = "Bar" diff --git a/tests/run-macros/annot-gen2/Macro_1.scala b/tests/run-macros/annot-gen2/Macro_1.scala index 169dda5eec0f..05428aac7375 100644 --- a/tests/run-macros/annot-gen2/Macro_1.scala +++ b/tests/run-macros/annot-gen2/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ diff --git a/tests/run-macros/annot-gen2/Macro_2.scala b/tests/run-macros/annot-gen2/Macro_2.scala index 4182caf8113e..3e2e228abb3e 100644 --- a/tests/run-macros/annot-gen2/Macro_2.scala +++ b/tests/run-macros/annot-gen2/Macro_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ diff --git a/tests/run-macros/annot-gen2/Test_3.scala b/tests/run-macros/annot-gen2/Test_3.scala index 1a7ca80f6479..08abafdb2741 100644 --- a/tests/run-macros/annot-gen2/Test_3.scala +++ b/tests/run-macros/annot-gen2/Test_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + class Bar: @foo def bar(s: String) = s diff --git a/tests/run-macros/annot-generate/Macro_1.scala b/tests/run-macros/annot-generate/Macro_1.scala index 8679edcfc0c3..b88cc62afb06 100644 --- a/tests/run-macros/annot-generate/Macro_1.scala +++ b/tests/run-macros/annot-generate/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ diff --git a/tests/run-macros/annot-generate/Macro_2.scala b/tests/run-macros/annot-generate/Macro_2.scala index b37f62f70da5..911625eac645 100644 --- a/tests/run-macros/annot-generate/Macro_2.scala +++ b/tests/run-macros/annot-generate/Macro_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ diff --git a/tests/run-macros/annot-generate/Test_3.scala b/tests/run-macros/annot-generate/Test_3.scala index 7077fd544111..591b3e864f31 100644 --- a/tests/run-macros/annot-generate/Test_3.scala +++ b/tests/run-macros/annot-generate/Test_3.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + class Bar: @foo def bar(x: Int) = x + 1 diff --git a/tests/run-macros/annot-macro-main/Macro_1.scala b/tests/run-macros/annot-macro-main/Macro_1.scala index 0de1a69f81a5..2a585bee2bc1 100644 --- a/tests/run-macros/annot-macro-main/Macro_1.scala +++ b/tests/run-macros/annot-macro-main/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-macro-main/Test_2.scala b/tests/run-macros/annot-macro-main/Test_2.scala index cdf7f6fd78da..a6733ec1c220 100644 --- a/tests/run-macros/annot-macro-main/Test_2.scala +++ b/tests/run-macros/annot-macro-main/Test_2.scala @@ -1 +1,3 @@ +//> using options -experimental -Yno-experimental + @mainMacro def Test(): Unit = println("macro generated main") diff --git a/tests/run-macros/annot-memo/Macro_1.scala b/tests/run-macros/annot-memo/Macro_1.scala index 5672bd6358c1..c18260cc0f95 100644 --- a/tests/run-macros/annot-memo/Macro_1.scala +++ b/tests/run-macros/annot-memo/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-memo/Test_2.scala b/tests/run-macros/annot-memo/Test_2.scala index 10afee3fa8bc..da58e550adda 100644 --- a/tests/run-macros/annot-memo/Test_2.scala +++ b/tests/run-macros/annot-memo/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + class Bar: @memoize def fib(n: Int): Int = diff --git a/tests/run-macros/annot-mod-class-add-def/Macro_1.scala b/tests/run-macros/annot-mod-class-add-def/Macro_1.scala index cec3a60350bc..855dce06f279 100644 --- a/tests/run-macros/annot-mod-class-add-def/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-add-def/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-mod-class-add-def/Test_2.scala b/tests/run-macros/annot-mod-class-add-def/Test_2.scala index 05596baee900..d6aae4e90cf3 100644 --- a/tests/run-macros/annot-mod-class-add-def/Test_2.scala +++ b/tests/run-macros/annot-mod-class-add-def/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @addIndirectToString("This is Foo") class Foo //> private def string$macro$1: String = "This is Foo" diff --git a/tests/run-macros/annot-mod-class-add-inner-class/Macro_1.scala b/tests/run-macros/annot-mod-class-add-inner-class/Macro_1.scala index cb98fc75ea74..395bfd7a28db 100644 --- a/tests/run-macros/annot-mod-class-add-inner-class/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-add-inner-class/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-mod-class-add-inner-class/Test_2.scala b/tests/run-macros/annot-mod-class-add-inner-class/Test_2.scala index d06d13c439e6..b90d237b60d4 100644 --- a/tests/run-macros/annot-mod-class-add-inner-class/Test_2.scala +++ b/tests/run-macros/annot-mod-class-add-inner-class/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @addInnerClass class Foo //> class Show: diff --git a/tests/run-macros/annot-mod-class-add-lazy-val/Macro_1.scala b/tests/run-macros/annot-mod-class-add-lazy-val/Macro_1.scala index ff2f67a41bab..f72f28b610d6 100644 --- a/tests/run-macros/annot-mod-class-add-lazy-val/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-add-lazy-val/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-mod-class-add-lazy-val/Test_2.scala b/tests/run-macros/annot-mod-class-add-lazy-val/Test_2.scala index 657b40b42fc8..5aa0601e037e 100644 --- a/tests/run-macros/annot-mod-class-add-lazy-val/Test_2.scala +++ b/tests/run-macros/annot-mod-class-add-lazy-val/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @addMemoToString("This is Foo") class Foo //> private lazy val string$macro$1: String = "This is Foo" diff --git a/tests/run-macros/annot-mod-class-add-local-class/Macro_1.scala b/tests/run-macros/annot-mod-class-add-local-class/Macro_1.scala index e9a1baec44bd..0156812adeb1 100644 --- a/tests/run-macros/annot-mod-class-add-local-class/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-add-local-class/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-mod-class-add-local-class/Test_2.scala b/tests/run-macros/annot-mod-class-add-local-class/Test_2.scala index 60aa28ffaf2a..db4c975992d0 100644 --- a/tests/run-macros/annot-mod-class-add-local-class/Test_2.scala +++ b/tests/run-macros/annot-mod-class-add-local-class/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @addInnerClass class Foo //> def toString(): String = diff --git a/tests/run-macros/annot-mod-class-add-val/Macro_1.scala b/tests/run-macros/annot-mod-class-add-val/Macro_1.scala index 34b7cd879abe..fc0294dcb051 100644 --- a/tests/run-macros/annot-mod-class-add-val/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-add-val/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-mod-class-add-val/Test_2.scala b/tests/run-macros/annot-mod-class-add-val/Test_2.scala index 40816f5c8c84..f6ea732f3084 100644 --- a/tests/run-macros/annot-mod-class-add-val/Test_2.scala +++ b/tests/run-macros/annot-mod-class-add-val/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @addMemoToString("This is Foo") class Foo //> private val string$macro$1: String = "This is Foo" diff --git a/tests/run-macros/annot-mod-class-add-var/Macro_1.scala b/tests/run-macros/annot-mod-class-add-var/Macro_1.scala index d1cc26102ff3..be38689613e7 100644 --- a/tests/run-macros/annot-mod-class-add-var/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-add-var/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-mod-class-add-var/Test_2.scala b/tests/run-macros/annot-mod-class-add-var/Test_2.scala index 5058e826b863..c2ee86fbced5 100644 --- a/tests/run-macros/annot-mod-class-add-var/Test_2.scala +++ b/tests/run-macros/annot-mod-class-add-var/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @addCountToString("This is Foo: ") class Foo: //> private var count$macro$1: Int = 0 diff --git a/tests/run-macros/annot-mod-class-data/Macro_1.scala b/tests/run-macros/annot-mod-class-data/Macro_1.scala index 05f63165e1b6..a175eb274268 100644 --- a/tests/run-macros/annot-mod-class-data/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-data/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted.* diff --git a/tests/run-macros/annot-mod-class-data/Test_2.scala b/tests/run-macros/annot-mod-class-data/Test_2.scala index 23e5191a3aeb..5def49c2daf8 100644 --- a/tests/run-macros/annot-mod-class-data/Test_2.scala +++ b/tests/run-macros/annot-mod-class-data/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @data class Foo(val a: String, val b: Int) //> override def toString(): String = Seq(this.a, this.b).mkString("Foo(", ", ", ")") //> override def equals(that: Any): Boolean = diff --git a/tests/run-macros/annot-mod-class-equals/Macro_1.scala b/tests/run-macros/annot-mod-class-equals/Macro_1.scala index 3527ec3289c6..10184eada1e2 100644 --- a/tests/run-macros/annot-mod-class-equals/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-equals/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted.* diff --git a/tests/run-macros/annot-mod-class-equals/Test_2.scala b/tests/run-macros/annot-mod-class-equals/Test_2.scala index a4b3b406c4ce..1e5287743c8b 100644 --- a/tests/run-macros/annot-mod-class-equals/Test_2.scala +++ b/tests/run-macros/annot-mod-class-equals/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @equals class Foo(val a: String, val b: Int) //> override def equals(that: Any): Boolean = //> that match diff --git a/tests/run-macros/annot-mod-class-mod-def/Macro_1.scala b/tests/run-macros/annot-mod-class-mod-def/Macro_1.scala index 98fc91f31322..7a73b0a773e9 100644 --- a/tests/run-macros/annot-mod-class-mod-def/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-mod-def/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-mod-class-mod-def/Test_2.scala b/tests/run-macros/annot-mod-class-mod-def/Test_2.scala index 7e5da4d7b31d..b0f2b4531986 100644 --- a/tests/run-macros/annot-mod-class-mod-def/Test_2.scala +++ b/tests/run-macros/annot-mod-class-mod-def/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @modToString("This is Foo") class Foo: override def toString(): String = "?" //> override def toString(): String = "This is Foo" diff --git a/tests/run-macros/annot-mod-class-mod-val/Macro_1.scala b/tests/run-macros/annot-mod-class-mod-val/Macro_1.scala index 036703a8a374..fda7b5f037d8 100644 --- a/tests/run-macros/annot-mod-class-mod-val/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-mod-val/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-mod-class-mod-val/Test_2.scala b/tests/run-macros/annot-mod-class-mod-val/Test_2.scala index d75138f0dc41..862977e2aa31 100644 --- a/tests/run-macros/annot-mod-class-mod-val/Test_2.scala +++ b/tests/run-macros/annot-mod-class-mod-val/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @setValue("valDef", "a") @setValue("varDef", "b") @setValue("lazyVarDef", "c") diff --git a/tests/run-macros/annot-mod-class-override-def/Macro_1.scala b/tests/run-macros/annot-mod-class-override-def/Macro_1.scala index 7d591a39b091..e6d7bba79d54 100644 --- a/tests/run-macros/annot-mod-class-override-def/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-override-def/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-mod-class-override-def/Test_2.scala b/tests/run-macros/annot-mod-class-override-def/Test_2.scala index 0fca75ba9d6a..8c6121664208 100644 --- a/tests/run-macros/annot-mod-class-override-def/Test_2.scala +++ b/tests/run-macros/annot-mod-class-override-def/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @genToString("This is Foo") class Foo //> override def toString(): String = "This is Foo" diff --git a/tests/run-macros/annot-mod-class-override-val/Macro_1.scala b/tests/run-macros/annot-mod-class-override-val/Macro_1.scala index c64e06686fa0..d7409a649427 100644 --- a/tests/run-macros/annot-mod-class-override-val/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-override-val/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-mod-class-override-val/Test_2.scala b/tests/run-macros/annot-mod-class-override-val/Test_2.scala index 52d56723980d..f067ba678af8 100644 --- a/tests/run-macros/annot-mod-class-override-val/Test_2.scala +++ b/tests/run-macros/annot-mod-class-override-val/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + class Foo: val val1: String = "?" def def1: String = "?" diff --git a/tests/run-macros/annot-mod-class-unused-new-sym/Macro_1.scala b/tests/run-macros/annot-mod-class-unused-new-sym/Macro_1.scala index 0da1e4106e8e..fbcb9049d947 100644 --- a/tests/run-macros/annot-mod-class-unused-new-sym/Macro_1.scala +++ b/tests/run-macros/annot-mod-class-unused-new-sym/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable diff --git a/tests/run-macros/annot-mod-class-unused-new-sym/Test_2.scala b/tests/run-macros/annot-mod-class-unused-new-sym/Test_2.scala index dd93d0df2917..340b7503ff71 100644 --- a/tests/run-macros/annot-mod-class-unused-new-sym/Test_2.scala +++ b/tests/run-macros/annot-mod-class-unused-new-sym/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @newUnusedSymbol class Foo diff --git a/tests/run-macros/annot-result-order/Macro_1.scala b/tests/run-macros/annot-result-order/Macro_1.scala index 5976e27965ef..c81641037b67 100644 --- a/tests/run-macros/annot-result-order/Macro_1.scala +++ b/tests/run-macros/annot-result-order/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ diff --git a/tests/run-macros/annot-result-order/Test_2.scala b/tests/run-macros/annot-result-order/Test_2.scala index fce105f3cc6c..06b050d11c29 100644 --- a/tests/run-macros/annot-result-order/Test_2.scala +++ b/tests/run-macros/annot-result-order/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @print("foo") def foo(): Unit = () diff --git a/tests/run-macros/annot-simple-fib/Macro_1.scala b/tests/run-macros/annot-simple-fib/Macro_1.scala index 1740f922b63e..e5852d5ce73c 100644 --- a/tests/run-macros/annot-simple-fib/Macro_1.scala +++ b/tests/run-macros/annot-simple-fib/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.annotation.{experimental, MacroAnnotation} import scala.quoted._ import scala.collection.mutable.Map diff --git a/tests/run-macros/annot-simple-fib/Test_2.scala b/tests/run-macros/annot-simple-fib/Test_2.scala index 7e22982553ac..534f4569b619 100644 --- a/tests/run-macros/annot-simple-fib/Test_2.scala +++ b/tests/run-macros/annot-simple-fib/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + class Bar: @memoize def fib(n: Int): Int = diff --git a/tests/run-macros/i11685/Macro_1.scala b/tests/run-macros/i11685/Macro_1.scala index 08920854a813..72965266dddd 100644 --- a/tests/run-macros/i11685/Macro_1.scala +++ b/tests/run-macros/i11685/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + package test import scala.quoted.* diff --git a/tests/run-macros/i11685/Test_2.scala b/tests/run-macros/i11685/Test_2.scala index f8531376dcd8..eaab3af7acb5 100644 --- a/tests/run-macros/i11685/Test_2.scala +++ b/tests/run-macros/i11685/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import test.MyMacro trait Command { diff --git a/tests/run-macros/i16734b/Macro_1.scala b/tests/run-macros/i16734b/Macro_1.scala index f1e8e12d308d..e080193c398a 100644 --- a/tests/run-macros/i16734b/Macro_1.scala +++ b/tests/run-macros/i16734b/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.quoted.* inline def typeVariances[A <: AnyKind]: String = diff --git a/tests/run-macros/i16734b/Test_2.scala b/tests/run-macros/i16734b/Test_2.scala index f5481aaf96cf..81316875d561 100644 --- a/tests/run-macros/i16734b/Test_2.scala +++ b/tests/run-macros/i16734b/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + type F1Inv[A] type F1Cov[+A] type F1Con[-A] diff --git a/tests/run-macros/newClass/Macro_1.scala b/tests/run-macros/newClass/Macro_1.scala index e7ae59c5331b..75f757c038dc 100644 --- a/tests/run-macros/newClass/Macro_1.scala +++ b/tests/run-macros/newClass/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.quoted.* inline def makeClass(inline name: String): Any = ${ makeClassExpr('name) } diff --git a/tests/run-macros/newClass/Test_2.scala b/tests/run-macros/newClass/Test_2.scala index 6868674547fe..b126e90a5e41 100644 --- a/tests/run-macros/newClass/Test_2.scala +++ b/tests/run-macros/newClass/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @main def Test: Unit = { val foo = makeClass("foo") println(foo.getClass) diff --git a/tests/run-macros/newClassExtends/Macro_1.scala b/tests/run-macros/newClassExtends/Macro_1.scala index 99f639158761..d23b8fba88b6 100644 --- a/tests/run-macros/newClassExtends/Macro_1.scala +++ b/tests/run-macros/newClassExtends/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.quoted.* inline def makeClass(inline name: String): Foo = ${ makeClassExpr('name) } diff --git a/tests/run-macros/newClassExtends/Test_2.scala b/tests/run-macros/newClassExtends/Test_2.scala index 1db791749bab..8d782e346a68 100644 --- a/tests/run-macros/newClassExtends/Test_2.scala +++ b/tests/run-macros/newClassExtends/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @main def Test: Unit = { val foo: Foo = makeClass("foo") foo.foo() diff --git a/tests/run-macros/newClassExtendsClassParams/Macro_1.scala b/tests/run-macros/newClassExtendsClassParams/Macro_1.scala index f6eebc9487e5..e5d28c0ceb9b 100644 --- a/tests/run-macros/newClassExtendsClassParams/Macro_1.scala +++ b/tests/run-macros/newClassExtendsClassParams/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.quoted.* inline def makeClass(inline name: String): Foo = ${ makeClassExpr('name) } diff --git a/tests/run-macros/newClassExtendsClassParams/Test_2.scala b/tests/run-macros/newClassExtendsClassParams/Test_2.scala index 1db791749bab..8d782e346a68 100644 --- a/tests/run-macros/newClassExtendsClassParams/Test_2.scala +++ b/tests/run-macros/newClassExtendsClassParams/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @main def Test: Unit = { val foo: Foo = makeClass("foo") foo.foo() diff --git a/tests/run-macros/newClassSelf/Macro_1.scala b/tests/run-macros/newClassSelf/Macro_1.scala index 864015c896f0..46871d4d6b4c 100644 --- a/tests/run-macros/newClassSelf/Macro_1.scala +++ b/tests/run-macros/newClassSelf/Macro_1.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.quoted.* inline def makeClass(inline name: String): Bar = ${ makeClassExpr('name) } diff --git a/tests/run-macros/newClassSelf/Test_2.scala b/tests/run-macros/newClassSelf/Test_2.scala index 0c6d522de58f..437be3ca519d 100644 --- a/tests/run-macros/newClassSelf/Test_2.scala +++ b/tests/run-macros/newClassSelf/Test_2.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + @main def Test: Unit = { val a: Bar = makeClass("A") a.bar() diff --git a/tests/run/main-annotation-birthday.scala b/tests/run/main-annotation-birthday.scala index 563bb2628e62..32cf28784ced 100644 --- a/tests/run/main-annotation-birthday.scala +++ b/tests/run/main-annotation-birthday.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-dash-dash.scala b/tests/run/main-annotation-dash-dash.scala index bf4a1a4e238c..3fe0f47983d5 100644 --- a/tests/run/main-annotation-dash-dash.scala +++ b/tests/run/main-annotation-dash-dash.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-default-value-1.scala b/tests/run/main-annotation-default-value-1.scala index 40888c947bb6..cf4ba79e1aff 100644 --- a/tests/run/main-annotation-default-value-1.scala +++ b/tests/run/main-annotation-default-value-1.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-default-value-2.scala b/tests/run/main-annotation-default-value-2.scala index 76ee1bb5cc9f..8b60e6197405 100644 --- a/tests/run/main-annotation-default-value-2.scala +++ b/tests/run/main-annotation-default-value-2.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-example.scala b/tests/run/main-annotation-example.scala index 478ab6baeb4b..926496e595e7 100644 --- a/tests/run/main-annotation-example.scala +++ b/tests/run/main-annotation-example.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.* diff --git a/tests/run/main-annotation-flags.scala b/tests/run/main-annotation-flags.scala index 7e502585489d..8a579e6e2d00 100644 --- a/tests/run/main-annotation-flags.scala +++ b/tests/run/main-annotation-flags.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-help-override.scala b/tests/run/main-annotation-help-override.scala index d174e13ac891..bfff85c5a353 100644 --- a/tests/run/main-annotation-help-override.scala +++ b/tests/run/main-annotation-help-override.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-help.scala b/tests/run/main-annotation-help.scala index e7fdf7c362de..d68bb0d7e874 100644 --- a/tests/run/main-annotation-help.scala +++ b/tests/run/main-annotation-help.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-homemade-annot-1.scala b/tests/run/main-annotation-homemade-annot-1.scala index 3caa2c7e6b00..3106dae4006f 100644 --- a/tests/run/main-annotation-homemade-annot-1.scala +++ b/tests/run/main-annotation-homemade-annot-1.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.concurrent._ diff --git a/tests/run/main-annotation-homemade-annot-2.scala b/tests/run/main-annotation-homemade-annot-2.scala index a131aa336d47..980241ff93d3 100644 --- a/tests/run/main-annotation-homemade-annot-2.scala +++ b/tests/run/main-annotation-homemade-annot-2.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.collection.mutable diff --git a/tests/run/main-annotation-homemade-annot-3.scala b/tests/run/main-annotation-homemade-annot-3.scala index d024ba300665..4a894777c562 100644 --- a/tests/run/main-annotation-homemade-annot-3.scala +++ b/tests/run/main-annotation-homemade-annot-3.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.* diff --git a/tests/run/main-annotation-homemade-annot-4.scala b/tests/run/main-annotation-homemade-annot-4.scala index b4ea510aa677..b50e89523475 100644 --- a/tests/run/main-annotation-homemade-annot-4.scala +++ b/tests/run/main-annotation-homemade-annot-4.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.* diff --git a/tests/run/main-annotation-homemade-annot-5.scala b/tests/run/main-annotation-homemade-annot-5.scala index fc5e34e41d6c..a129a51da7eb 100644 --- a/tests/run/main-annotation-homemade-annot-5.scala +++ b/tests/run/main-annotation-homemade-annot-5.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.* diff --git a/tests/run/main-annotation-homemade-annot-6.scala b/tests/run/main-annotation-homemade-annot-6.scala index 39d258803901..5a92e6382d3d 100644 --- a/tests/run/main-annotation-homemade-annot-6.scala +++ b/tests/run/main-annotation-homemade-annot-6.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.* diff --git a/tests/run/main-annotation-homemade-parser-1.scala b/tests/run/main-annotation-homemade-parser-1.scala index be2adc4a5f72..94d43bf19cc5 100644 --- a/tests/run/main-annotation-homemade-parser-1.scala +++ b/tests/run/main-annotation-homemade-parser-1.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-homemade-parser-2.scala b/tests/run/main-annotation-homemade-parser-2.scala index 1a51400d9f37..4f40f9b42b27 100644 --- a/tests/run/main-annotation-homemade-parser-2.scala +++ b/tests/run/main-annotation-homemade-parser-2.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-homemade-parser-3.scala b/tests/run/main-annotation-homemade-parser-3.scala index 1e5a4c0dae00..066e40f1b3a0 100644 --- a/tests/run/main-annotation-homemade-parser-3.scala +++ b/tests/run/main-annotation-homemade-parser-3.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-homemade-parser-4.scala b/tests/run/main-annotation-homemade-parser-4.scala index fc087354c16e..668aa040380c 100644 --- a/tests/run/main-annotation-homemade-parser-4.scala +++ b/tests/run/main-annotation-homemade-parser-4.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-homemade-parser-5.scala b/tests/run/main-annotation-homemade-parser-5.scala index f7443f34cab3..123631312ef7 100644 --- a/tests/run/main-annotation-homemade-parser-5.scala +++ b/tests/run/main-annotation-homemade-parser-5.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-multiple.scala b/tests/run/main-annotation-multiple.scala index 62a5fa04cc18..dbc66d0df9ca 100644 --- a/tests/run/main-annotation-multiple.scala +++ b/tests/run/main-annotation-multiple.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-named-params.scala b/tests/run/main-annotation-named-params.scala index 8d677d65978d..4cfa2c8049b4 100644 --- a/tests/run/main-annotation-named-params.scala +++ b/tests/run/main-annotation-named-params.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-newMain.scala b/tests/run/main-annotation-newMain.scala index a28e9d2ab96a..5b00a46ce7e9 100644 --- a/tests/run/main-annotation-newMain.scala +++ b/tests/run/main-annotation-newMain.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.* diff --git a/tests/run/main-annotation-no-parameters-no-parens.scala b/tests/run/main-annotation-no-parameters-no-parens.scala index 7ba87c82c745..b62fd55538de 100644 --- a/tests/run/main-annotation-no-parameters-no-parens.scala +++ b/tests/run/main-annotation-no-parameters-no-parens.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-no-parameters.scala b/tests/run/main-annotation-no-parameters.scala index 951254f07bf7..fc92a5680e07 100644 --- a/tests/run/main-annotation-no-parameters.scala +++ b/tests/run/main-annotation-no-parameters.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-overload.scala b/tests/run/main-annotation-overload.scala index 939f2044f227..60f9b68a58a2 100644 --- a/tests/run/main-annotation-overload.scala +++ b/tests/run/main-annotation-overload.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-param-annot-1.scala b/tests/run/main-annotation-param-annot-1.scala index d16e4fac8848..5cf29b9f4efb 100644 --- a/tests/run/main-annotation-param-annot-1.scala +++ b/tests/run/main-annotation-param-annot-1.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-param-annot-2.scala b/tests/run/main-annotation-param-annot-2.scala index 0ee99038910a..76033f24e614 100644 --- a/tests/run/main-annotation-param-annot-2.scala +++ b/tests/run/main-annotation-param-annot-2.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-param-annot-invalid-params.scala b/tests/run/main-annotation-param-annot-invalid-params.scala index 076c7ff80750..46bc812863b1 100644 --- a/tests/run/main-annotation-param-annot-invalid-params.scala +++ b/tests/run/main-annotation-param-annot-invalid-params.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-return-type-1.scala b/tests/run/main-annotation-return-type-1.scala index 641786661613..1366cceeba8a 100644 --- a/tests/run/main-annotation-return-type-1.scala +++ b/tests/run/main-annotation-return-type-1.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-return-type-2.scala b/tests/run/main-annotation-return-type-2.scala index 986c1f0eae94..e2dc6b8ae4e6 100644 --- a/tests/run/main-annotation-return-type-2.scala +++ b/tests/run/main-annotation-return-type-2.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-short-name.scala b/tests/run/main-annotation-short-name.scala index 72e37acdce5c..4a179fb793e1 100644 --- a/tests/run/main-annotation-short-name.scala +++ b/tests/run/main-annotation-short-name.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-simple.scala b/tests/run/main-annotation-simple.scala index 47407c85e36c..7d2fd501849b 100644 --- a/tests/run/main-annotation-simple.scala +++ b/tests/run/main-annotation-simple.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-top-level.scala b/tests/run/main-annotation-top-level.scala index 52ca42205d9e..3e2bb7bb2fb4 100644 --- a/tests/run/main-annotation-top-level.scala +++ b/tests/run/main-annotation-top-level.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-types.scala b/tests/run/main-annotation-types.scala index 249c9d010268..0ee6220a1196 100644 --- a/tests/run/main-annotation-types.scala +++ b/tests/run/main-annotation-types.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-vararg-1.scala b/tests/run/main-annotation-vararg-1.scala index a1b99cd5b150..0227054e0189 100644 --- a/tests/run/main-annotation-vararg-1.scala +++ b/tests/run/main-annotation-vararg-1.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-vararg-2.scala b/tests/run/main-annotation-vararg-2.scala index becb5958ad8e..8521795388b2 100644 --- a/tests/run/main-annotation-vararg-2.scala +++ b/tests/run/main-annotation-vararg-2.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-wrong-param-1.scala b/tests/run/main-annotation-wrong-param-1.scala index ef6ada37b9e3..6c9e9e991136 100644 --- a/tests/run/main-annotation-wrong-param-1.scala +++ b/tests/run/main-annotation-wrong-param-1.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-wrong-param-names.scala b/tests/run/main-annotation-wrong-param-names.scala index c428c955b5cd..90622d543bf1 100644 --- a/tests/run/main-annotation-wrong-param-names.scala +++ b/tests/run/main-annotation-wrong-param-names.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-wrong-param-number.scala b/tests/run/main-annotation-wrong-param-number.scala index e607a85e4dc2..b8ef8c0ea9e7 100644 --- a/tests/run/main-annotation-wrong-param-number.scala +++ b/tests/run/main-annotation-wrong-param-number.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-annotation-wrong-param-type.scala b/tests/run/main-annotation-wrong-param-type.scala index 2228a8faf7df..0fbae70a48a5 100644 --- a/tests/run/main-annotation-wrong-param-type.scala +++ b/tests/run/main-annotation-wrong-param-type.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip import scala.annotation.newMain diff --git a/tests/run/main-calculator-example.scala b/tests/run/main-calculator-example.scala index 857792f11967..fc2e1397009b 100644 --- a/tests/run/main-calculator-example.scala +++ b/tests/run/main-calculator-example.scala @@ -1,3 +1,4 @@ +//> using options -experimental -Yno-experimental // scalajs: --skip sealed trait Expression: @@ -23,7 +24,7 @@ import scala.annotation.{ MainAnnotation, experimental } import scala.annotation.MainAnnotation.{ Info, Parameter } import scala.util.CommandLineParser.FromString -@experimental class showAndEval extends MainAnnotation[FromString, Expression]: +class showAndEval extends MainAnnotation[FromString, Expression]: def command(info: Info, args: Seq[String]): Option[Seq[String]] = assert(info.parameters.forall(param => param.typeName == "Number"), "Only Number parameters allowed") println(s"executing ${info.name} with inputs: ${args.mkString(" ")}") diff --git a/tests/run/tupled-function-andThen.scala b/tests/run/tupled-function-andThen.scala index 94236e9267e1..0068143f9d3f 100644 --- a/tests/run/tupled-function-andThen.scala +++ b/tests/run/tupled-function-andThen.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.util.TupledFunction object Test { diff --git a/tests/run/tupled-function-apply.scala b/tests/run/tupled-function-apply.scala index 7d2162a565ac..69cfeef91dd1 100644 --- a/tests/run/tupled-function-apply.scala +++ b/tests/run/tupled-function-apply.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.util.TupledFunction object Test { diff --git a/tests/run/tupled-function-compose.scala b/tests/run/tupled-function-compose.scala index 4cf83563274d..d984b8a9184a 100644 --- a/tests/run/tupled-function-compose.scala +++ b/tests/run/tupled-function-compose.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.util.TupledFunction object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run/tupled-function-extension-method.scala b/tests/run/tupled-function-extension-method.scala index be5ccbd5ca17..fc3319aa4c15 100644 --- a/tests/run/tupled-function-extension-method.scala +++ b/tests/run/tupled-function-extension-method.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.util.TupledFunction object Test { def main(args: Array[String]): Unit = { diff --git a/tests/run/tupled-function-tupled.scala b/tests/run/tupled-function-tupled.scala index 6e7d94b3ac3d..5a799be167c3 100644 --- a/tests/run/tupled-function-tupled.scala +++ b/tests/run/tupled-function-tupled.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.util.TupledFunction object Test { diff --git a/tests/run/tupled-function-untupled.scala b/tests/run/tupled-function-untupled.scala index e5e3d8c29c3a..34b81c74c4f6 100644 --- a/tests/run/tupled-function-untupled.scala +++ b/tests/run/tupled-function-untupled.scala @@ -1,3 +1,5 @@ +//> using options -experimental -Yno-experimental + import scala.util.TupledFunction object Test { def main(args: Array[String]): Unit = {