Skip to content

Commit e746116

Browse files
committed
Tag experimental API tests
Add explicitly `-experimental -Yno-experimental` to tests that use definitions that are `@experimental` in the standard library. `-Yno-experimental` disables the experimental mode from nightly builds and `-experimental` adds `@experimental` to all top-level definitions.
1 parent e994cf0 commit e746116

File tree

144 files changed

+244
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+244
-17
lines changed

tests/neg-macros/i18677-a.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
|The tree does not conform to the compiler's tree invariants.
88
|
99
|Macro was:
10-
|@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-a/Test_2.scala") @extendFoo class AFoo()
10+
|@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-a/Test_2.scala") @scala.annotation.experimental @extendFoo class AFoo()
1111
|
1212
|The macro returned:
13-
|@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-a/Test_2.scala") @extendFoo class AFoo() extends Foo
13+
|@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-a/Test_2.scala") @scala.annotation.experimental @extendFoo class AFoo() extends Foo
1414
|
1515
|Error:
1616
|assertion failed: Parents of class symbol differs from the parents in the tree for class AFoo

tests/neg-macros/i18677-a/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using -expermiental
1+
//> using options -experimental -Yno-experimental
22

33
import annotation.MacroAnnotation
44
import quoted.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using -expermiental
1+
//> using options -experimental -Yno-experimental
22

33
@extendFoo
44
class AFoo // error

tests/neg-macros/i18677-b.check

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
|The tree does not conform to the compiler's tree invariants.
88
|
99
|Macro was:
10-
|@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-b/Test_2.scala") @extendFoo class AFoo()
10+
|@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-b/Test_2.scala") @scala.annotation.experimental @extendFoo class AFoo()
1111
|
1212
|The macro returned:
13-
|@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-b/Test_2.scala") @extendFoo class AFoo() extends Foo
13+
|@scala.annotation.internal.SourceFile("tests/neg-macros/i18677-b/Test_2.scala") @scala.annotation.experimental @extendFoo class AFoo() extends Foo
1414
|
1515
|Error:
1616
|assertion failed: Parents of class symbol differs from the parents in the tree for class AFoo

tests/neg-macros/i18677-b/Macro_1.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using -expermiental
1+
//> using options -experimental -Yno-experimental
22

33
import annotation.MacroAnnotation
44
import quoted.*
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//> using -expermiental
1+
//> using options -experimental -Yno-experimental
22

33
@extendFoo
44
class AFoo // error

tests/neg-macros/newClassExtendsNoParents/Macro_1.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//> using options -experimental -Yno-experimental
2+
13
import scala.quoted.*
24

35
inline def makeClass(inline name: String): Any = ${ makeClassExpr('name) }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
//> using options -experimental -Yno-experimental
2+
13
def test: Any = makeClass("foo") // error

tests/neg-macros/newClassExtendsOnlyTrait/Macro_1.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
//> using options -experimental -Yno-experimental
2+
13
import scala.quoted.*
24

35
inline def makeClass(inline name: String): Foo = ${ makeClassExpr('name) }
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
//> using options -experimental -Yno-experimental
2+
13
def test: Foo = makeClass("foo") // error

0 commit comments

Comments
 (0)