Skip to content

Commit 05114dd

Browse files
Stabilize reflect SymbolMethods.isSuperAccessor (#20198)
2 parents 2ca0ce7 + 80a0cb5 commit 05114dd

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

library/src/scala/quoted/Quotes.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4032,7 +4032,6 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
40324032
def isClassConstructor: Boolean
40334033

40344034
/** Is this the super accessor? */
4035-
@experimental // TODO when stable, remove `dotty.tools.scaladoc.tasty.ClassLikeSupport.isSuperBridgeMethod` and use this method
40364035
def isSuperAccessor: Boolean
40374036

40384037
/** Is this the definition of a type? */

project/MiMaFilters.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ object MiMaFilters {
4848
// Only exceptional cases should be added here.
4949

5050
// Breaking changes since last reference version
51-
Build.mimaPreviousDottyVersion -> Seq.empty, // We should never break backwards compatibility
51+
Build.mimaPreviousDottyVersion -> // Seq.empty, // We should never break backwards compatibility
52+
Seq(
53+
ProblemFilters.exclude[ReversedMissingMethodProblem]("scala.quoted.Quotes#reflectModule#SymbolMethods.isSuperAccessor"), // This change is acceptable. See comment in `Breaking changes since last LTS`.
54+
),
5255

5356
// Breaking changes since last LTS
5457
Build.mimaPreviousLTSDottyVersion -> Seq(

scaladoc/src/dotty/tools/scaladoc/tasty/ClassLikeSupport.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ trait ClassLikeSupport:
235235
extension (c: ClassDef)
236236
def extractMembers: Seq[Member] = {
237237
val inherited = c.getNonTrivialInheritedMemberTrees.collect {
238-
case dd: DefDef if !dd.symbol.isClassConstructor && !(dd.symbol.isSuperBridgeMethod || dd.symbol.isDefaultHelperMethod) => dd
238+
case dd: DefDef if !dd.symbol.isClassConstructor && !(dd.symbol.isSuperAccessor || dd.symbol.isDefaultHelperMethod) => dd
239239
case other => other
240240
}
241241
c.membersToDocument.flatMap(parseMember(c)) ++

scaladoc/src/dotty/tools/scaladoc/tasty/SyntheticSupport.scala

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ object SyntheticsSupport:
1010
import reflect._
1111
s.flags.is(Flags.Synthetic) || s.flags.is(Flags.FieldAccessor) || s.isDefaultHelperMethod
1212

13-
// TODO remove and use `SymbolMethods.isSuperAccessor`
14-
def isSuperBridgeMethod: Boolean = s.name.contains("$super$")
15-
1613
def isDefaultHelperMethod: Boolean = ".*\\$default\\$\\d+$".r.matches(s.name)
1714

1815
def isOpaque: Boolean =

tests/run-tasty-inspector/stdlibExperimentalDefinitions.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,7 @@ val experimentalDefinitionInLibrary = Set(
5151
"scala.annotation.init$.widen",
5252
"scala.annotation.init$.region",
5353

54-
//// New APIs: Quotes
55-
// Can be stabilized in 3.5.0 or later
56-
"scala.quoted.Quotes.reflectModule.SymbolMethods.isSuperAccessor",
54+
//// New APIs: Quotes
5755
// Can be stabilized in 3.5.0 (unsure) or later
5856
"scala.quoted.Quotes.reflectModule.CompilationInfoModule.XmacroSettings",
5957
// Cant be stabilized yet.

0 commit comments

Comments
 (0)