Skip to content

Commit 9f76285

Browse files
committed
Add Symbol.isSuperAccessor to reflection API
1 parent 2312258 commit 9f76285

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2465,6 +2465,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
24652465
def isAnonymousFunction: Boolean = self.denot.isAnonymousFunction
24662466
def isAbstractType: Boolean = self.denot.isAbstractType
24672467
def isClassConstructor: Boolean = self.denot.isClassConstructor
2468+
def isSuperAccessor = self.name.is(dotc.core.NameKinds.SuperAccessorName)
24682469
def isType: Boolean = self.isType
24692470
def isTerm: Boolean = self.isTerm
24702471
def isPackageDef: Boolean = self.is(dotc.core.Flags.Package)

library/src/scala/quoted/Quotes.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3559,6 +3559,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
35593559
/** Is this the constructor of a class? */
35603560
def isClassConstructor: Boolean
35613561

3562+
/** Is this the super accessor? */
3563+
def isSuperAccessor: Boolean
3564+
35623565
/** Is this the definition of a type? */
35633566
def isType: Boolean
35643567

0 commit comments

Comments
 (0)