Skip to content

Commit

Permalink
Deprecate 3-arg FunctionClass constructor (#18472)
Browse files Browse the repository at this point in the history
Also, make two new constructors no longer experimental.

Followup to #16849
  • Loading branch information
nicolasstucki authored Aug 30, 2023
2 parents b0a3dd9 + 232efb6 commit 6e45dd7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions library/src/scala/quoted/Quotes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4318,16 +4318,14 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
* - ...
* - Nth element is `FunctionN`
*/
// TODO: deprecate in 3.4 and stabilize FunctionClass(Int)/FunctionClass(Int,Boolean)
// @deprecated("Use overload of `FunctionClass` with 1 or 2 arguments","3.4")
@deprecated("Use overload of `FunctionClass` with 1 or 2 arguments","3.4")
def FunctionClass(arity: Int, isImplicit: Boolean = false, isErased: Boolean = false): Symbol

/** Class symbol of a function class `scala.FunctionN`.
*
* @param arity the arity of the function where `0 <= arity`
* @return class symbol of `scala.FunctionN` where `N == arity`
*/
@experimental
def FunctionClass(arity: Int): Symbol

/** Class symbol of a context function class `scala.FunctionN` or `scala.ContextFunctionN`.
Expand All @@ -4336,7 +4334,6 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
* @param isContextual if it is a `scala.ContextFunctionN`
* @return class symbol of `scala.FunctionN` or `scala.ContextFunctionN` where `N == arity`
*/
@experimental
def FunctionClass(arity: Int, isContextual: Boolean): Symbol

/** The `scala.PolyFunction` built-in trait. */
Expand Down
1 change: 1 addition & 0 deletions project/MiMaFilters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ object MiMaFilters {
// New API in 3.4.X
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule.ValOrDefDefTypeTest"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule.ValOrDefDefMethods"),
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#defnModule.FunctionClass")
// New API in 3.4.X
)
val TastyCore: Seq[ProblemFilter] = Seq(
Expand Down
2 changes: 0 additions & 2 deletions tests/run-tasty-inspector/stdlibExperimentalDefinitions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ val experimentalDefinitionInLibrary = Set(
"scala.annotation.init$.region",

//// New APIs: Quotes
// Should be stabilized in 3.4.0
"scala.quoted.Quotes.reflectModule.defnModule.FunctionClass",
"scala.quoted.Quotes.reflectModule.FlagsModule.AbsOverride",
// Can be stabilized in 3.4.0 (unsure) or later
"scala.quoted.Quotes.reflectModule.CompilationInfoModule.XmacroSettings",
Expand Down

0 comments on commit 6e45dd7

Please sign in to comment.