Skip to content

Commit

Permalink
Tag experimental API tests (#19895)
Browse files Browse the repository at this point in the history
Followup of #19811
  • Loading branch information
nicolasstucki authored Mar 11, 2024
2 parents f6e4e65 + f806ed8 commit 9e608ce
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 8 deletions.
2 changes: 2 additions & 0 deletions tests/init-global/pos/global-region1.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//> using options -experimental -Yno-experimental

import scala.annotation.init.region

trait B { def foo(): Int }
Expand Down
2 changes: 2 additions & 0 deletions tests/init-global/warn/i18628_3.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//> using options -experimental -Yno-experimental

import scala.annotation.init.widen

object Test:
Expand Down
1 change: 1 addition & 0 deletions tests/neg-macros/i19842/Macro.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//> using options -experimental -Yno-experimental

import scala.annotation.{experimental, targetName}
import scala.quoted.*
Expand Down
2 changes: 1 addition & 1 deletion tests/neg/inline-unstable-accessors.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//> using options -Werror -WunstableInlineAccessors -explain
//> using options -experimental -Yno-experimental -Werror -WunstableInlineAccessors -explain

package foo
import scala.annotation.publicInBinary
Expand Down
10 changes: 5 additions & 5 deletions tests/neg/publicInBinaryOverride.check
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- [E164] Declaration Error: tests/neg/publicInBinaryOverride.scala:8:15 -----------------------------------------------
8 | override def f(): Unit = () // error
| ^
| error overriding method f in class A of type (): Unit;
| method f of type (): Unit also needs to be declared with @publicInBinary
-- [E164] Declaration Error: tests/neg/publicInBinaryOverride.scala:10:15 ----------------------------------------------
10 | override def f(): Unit = () // error
| ^
| error overriding method f in class A of type (): Unit;
| method f of type (): Unit also needs to be declared with @publicInBinary
2 changes: 2 additions & 0 deletions tests/neg/publicInBinaryOverride.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//> using options -experimental -Yno-experimental

import scala.annotation.publicInBinary

class A:
Expand Down
3 changes: 3 additions & 0 deletions tests/pos/TupleReverseOnto.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
//> using options -experimental -Yno-experimental

import scala.Tuple.*

def test[T1, T2, T3, T4] =
summon[ReverseOnto[(T1, T2), (T3, T4)] =:= ReverseOnto[(T1, T2), (T3, T4)]]
summon[ReverseOnto[(T1, T2), (T3, T4)] =:= (T2, T1, T3, T4)]
Expand Down
2 changes: 2 additions & 0 deletions tests/pos/i7851.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//> using options -experimental -Yno-experimental

trait Wrappable[T] { }
given Wrappable[Float] with { }

Expand Down
2 changes: 2 additions & 0 deletions tests/pos/tupled-function-instances.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//> using options -experimental -Yno-experimental

import scala.util.TupledFunction
object Test {
def main(args: Array[String]): Unit = {
Expand Down
2 changes: 2 additions & 0 deletions tests/run-deep-subtype/Tuple-reverse.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//> using options -experimental -Yno-experimental

import scala.reflect.ClassTag

object Test {
Expand Down
2 changes: 2 additions & 0 deletions tests/run-macros/i12021/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//> using options -experimental -Yno-experimental

import scala.quoted.*

inline def inspect[A]: String =
Expand Down
2 changes: 1 addition & 1 deletion tests/run/i13215.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//> using options -Werror -WunstableInlineAccessors
//> using options -experimental -Yno-experimental -Werror -WunstableInlineAccessors

import scala.annotation.publicInBinary

Expand Down
2 changes: 2 additions & 0 deletions tests/run/noProtectedSuper.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//> using options -experimental -Yno-experimental

import scala.annotation.publicInBinary

package p {
Expand Down
2 changes: 1 addition & 1 deletion tests/run/publicInBinary/Lib_1.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//> using options -Werror -WunstableInlineAccessors
//> using options -experimental -Yno-experimental -Werror -WunstableInlineAccessors

package foo

Expand Down
2 changes: 2 additions & 0 deletions tests/run/quotes-add-erased/Macro_1.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//> using options -experimental -Yno-experimental

import scala.annotation.MacroAnnotation
import scala.annotation.internal.ErasedParam
import scala.quoted._
Expand Down
2 changes: 2 additions & 0 deletions tests/run/quotes-reflection/Macros_1.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//> using options -experimental -Yno-experimental

import scala.quoted.*

inline def inspect[A]: String =
Expand Down

0 comments on commit 9e608ce

Please sign in to comment.