Skip to content

Stabilize reflect SymbolMethods.isSuperAccessor #20198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion library/src/scala/quoted/Quotes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4032,7 +4032,6 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
def isClassConstructor: Boolean

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

/** Is this the definition of a type? */
Expand Down
5 changes: 4 additions & 1 deletion project/MiMaFilters.scala
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ object MiMaFilters {
// Only exceptional cases should be added here.

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

// Breaking changes since last LTS
Build.mimaPreviousLTSDottyVersion -> Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ trait ClassLikeSupport:
extension (c: ClassDef)
def extractMembers: Seq[Member] = {
val inherited = c.getNonTrivialInheritedMemberTrees.collect {
case dd: DefDef if !dd.symbol.isClassConstructor && !(dd.symbol.isSuperBridgeMethod || dd.symbol.isDefaultHelperMethod) => dd
case dd: DefDef if !dd.symbol.isClassConstructor && !(dd.symbol.isSuperAccessor || dd.symbol.isDefaultHelperMethod) => dd
case other => other
}
c.membersToDocument.flatMap(parseMember(c)) ++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ object SyntheticsSupport:
import reflect._
s.flags.is(Flags.Synthetic) || s.flags.is(Flags.FieldAccessor) || s.isDefaultHelperMethod

// TODO remove and use `SymbolMethods.isSuperAccessor`
def isSuperBridgeMethod: Boolean = s.name.contains("$super$")

def isDefaultHelperMethod: Boolean = ".*\\$default\\$\\d+$".r.matches(s.name)

def isOpaque: Boolean =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ val experimentalDefinitionInLibrary = Set(
"scala.annotation.init$.widen",
"scala.annotation.init$.region",

//// New APIs: Quotes
// Can be stabilized in 3.5.0 or later
"scala.quoted.Quotes.reflectModule.SymbolMethods.isSuperAccessor",
//// New APIs: Quotes
// Can be stabilized in 3.5.0 (unsure) or later
"scala.quoted.Quotes.reflectModule.CompilationInfoModule.XmacroSettings",
// Cant be stabilized yet.
Expand Down
Loading