Skip to content

Commit fb65458

Browse files
committed
Revert "Add reflect defn.FunctionClass overloads"
This reverts commit 9571b42.
1 parent 5f8485e commit fb65458

File tree

5 files changed

+0
-52
lines changed

5 files changed

+0
-52
lines changed

compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2811,10 +2811,6 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
28112811
if isErased then
28122812
throw new Exception("Erased function classes are not supported. Use a refined `scala.runtime.ErasedFunction`")
28132813
else dotc.core.Symbols.defn.FunctionSymbol(arity, isImplicit)
2814-
def FunctionClass(arity: Int): Symbol =
2815-
FunctionClass(arity, false, false)
2816-
def FunctionClass(arity: Int, isContextual: Boolean): Symbol =
2817-
FunctionClass(arity, isContextual, false)
28182814
def ErasedFunctionClass = dotc.core.Symbols.defn.ErasedFunctionClass
28192815
def TupleClass(arity: Int): Symbol =
28202816
dotc.core.Symbols.defn.TupleType(arity).nn.classSymbol.asClass

library/src/scala/quoted/Quotes.scala

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4295,27 +4295,8 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
42954295
* - ...
42964296
* - Nth element is `FunctionN`
42974297
*/
4298-
// TODO: deprecate in 3.4 and stabilize FunctionClass(Int)/FunctionClass(Int,Boolean)
4299-
// @deprecated("Use overload of `FunctionClass` with 1 or 2 arguments","3.4")
43004298
def FunctionClass(arity: Int, isImplicit: Boolean = false, isErased: Boolean = false): Symbol
43014299

4302-
/** Class symbol of a function class `scala.FunctionN`.
4303-
*
4304-
* @param arity the arity of the function where `0 <= arity`
4305-
* @return class symbol of `scala.FunctionN` where `N == arity`
4306-
*/
4307-
@experimental
4308-
def FunctionClass(arity: Int): Symbol
4309-
4310-
/** Class symbol of a context function class `scala.FunctionN` or `scala.ContextFunctionN`.
4311-
*
4312-
* @param arity the arity of the function where `0 <= arity`
4313-
* @param isContextual if it is a `scala.ContextFunctionN`
4314-
* @return class symbol of `scala.FunctionN` or `scala.ContextFunctionN` where `N == arity`
4315-
*/
4316-
@experimental
4317-
def FunctionClass(arity: Int, isContextual: Boolean): Symbol
4318-
43194300
/** The `scala.runtime.ErasedFunction` built-in trait. */
43204301
@experimental
43214302
def ErasedFunctionClass: Symbol

tests/run-custom-args/tasty-inspector/stdlibExperimentalDefinitions.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ val experimentalDefinitionInLibrary = Set(
6363
"scala.annotation.MacroAnnotation",
6464

6565
//// New APIs: Quotes
66-
// Should be stabilized in 3.4.0
67-
"scala.quoted.Quotes.reflectModule.defnModule.FunctionClass",
6866
"scala.quoted.Quotes.reflectModule.FlagsModule.AbsOverride",
6967
// Can be stabilized in 3.4.0 (unsure) or later
7068
"scala.quoted.Quotes.reflectModule.CompilationInfoModule.XmacroSettings",

tests/run-macros/tasty-definitions-1.check

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -57,57 +57,31 @@ Function23
5757
Function24
5858
Function25
5959
ContextFunction0
60-
ContextFunction0
61-
ContextFunction1
6260
ContextFunction1
6361
ContextFunction2
64-
ContextFunction2
65-
ContextFunction3
6662
ContextFunction3
6763
ContextFunction4
68-
ContextFunction4
69-
ContextFunction5
7064
ContextFunction5
7165
ContextFunction6
72-
ContextFunction6
7366
ContextFunction7
74-
ContextFunction7
75-
ContextFunction8
7667
ContextFunction8
7768
ContextFunction9
78-
ContextFunction9
7969
ContextFunction10
80-
ContextFunction10
81-
ContextFunction11
8270
ContextFunction11
8371
ContextFunction12
84-
ContextFunction12
8572
ContextFunction13
86-
ContextFunction13
87-
ContextFunction14
8873
ContextFunction14
8974
ContextFunction15
90-
ContextFunction15
91-
ContextFunction16
9275
ContextFunction16
9376
ContextFunction17
94-
ContextFunction17
95-
ContextFunction18
9677
ContextFunction18
9778
ContextFunction19
98-
ContextFunction19
9979
ContextFunction20
100-
ContextFunction20
101-
ContextFunction21
10280
ContextFunction21
10381
ContextFunction22
104-
ContextFunction22
10582
ContextFunction23
106-
ContextFunction23
107-
ContextFunction24
10883
ContextFunction24
10984
ContextFunction25
110-
ContextFunction25
11185
class java.lang.Exception: Erased function classes are not supported. Use a refined `scala.runtime.ErasedFunction`
11286
ErasedFunction
11387
Tuple2

tests/run-macros/tasty-definitions-1/quoted_1.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ object Macros {
6060
printout(defn.FunctionClass(i).name)
6161

6262
for (i <- 0 to 25)
63-
printout(defn.FunctionClass(i, isContextual = true).name)
6463
printout(defn.FunctionClass(i, isImplicit = true).name)
6564

6665
// should fail

0 commit comments

Comments
 (0)