Skip to content

Commit 6e45dd7

Browse files
Deprecate 3-arg FunctionClass constructor (#18472)
Also, make two new constructors no longer experimental. Followup to #16849
2 parents b0a3dd9 + 232efb6 commit 6e45dd7

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

library/src/scala/quoted/Quotes.scala

+1-4
Original file line numberDiff line numberDiff line change
@@ -4318,16 +4318,14 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
43184318
* - ...
43194319
* - Nth element is `FunctionN`
43204320
*/
4321-
// TODO: deprecate in 3.4 and stabilize FunctionClass(Int)/FunctionClass(Int,Boolean)
4322-
// @deprecated("Use overload of `FunctionClass` with 1 or 2 arguments","3.4")
4321+
@deprecated("Use overload of `FunctionClass` with 1 or 2 arguments","3.4")
43234322
def FunctionClass(arity: Int, isImplicit: Boolean = false, isErased: Boolean = false): Symbol
43244323

43254324
/** Class symbol of a function class `scala.FunctionN`.
43264325
*
43274326
* @param arity the arity of the function where `0 <= arity`
43284327
* @return class symbol of `scala.FunctionN` where `N == arity`
43294328
*/
4330-
@experimental
43314329
def FunctionClass(arity: Int): Symbol
43324330

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

43424339
/** The `scala.PolyFunction` built-in trait. */

project/MiMaFilters.scala

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ object MiMaFilters {
66
// New API in 3.4.X
77
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule.ValOrDefDefTypeTest"),
88
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule.ValOrDefDefMethods"),
9+
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#defnModule.FunctionClass")
910
// New API in 3.4.X
1011
)
1112
val TastyCore: Seq[ProblemFilter] = Seq(

tests/run-tasty-inspector/stdlibExperimentalDefinitions.scala

-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ val experimentalDefinitionInLibrary = Set(
6868
"scala.annotation.init$.region",
6969

7070
//// New APIs: Quotes
71-
// Should be stabilized in 3.4.0
72-
"scala.quoted.Quotes.reflectModule.defnModule.FunctionClass",
7371
"scala.quoted.Quotes.reflectModule.FlagsModule.AbsOverride",
7472
// Can be stabilized in 3.4.0 (unsure) or later
7573
"scala.quoted.Quotes.reflectModule.CompilationInfoModule.XmacroSettings",

0 commit comments

Comments
 (0)