Skip to content

Commit 257a13f

Browse files
pikinier20nicolasstucki
authored andcommitted
Add Symbol.isSuperAccessor to reflection API
1 parent 2b74f88 commit 257a13f

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
@@ -2513,6 +2513,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
25132513
def isAnonymousFunction: Boolean = self.denot.isAnonymousFunction
25142514
def isAbstractType: Boolean = self.denot.isAbstractType
25152515
def isClassConstructor: Boolean = self.denot.isClassConstructor
2516+
def isSuperAccessor = self.name.is(dotc.core.NameKinds.SuperAccessorName)
25162517
def isType: Boolean = self.isType
25172518
def isTerm: Boolean = self.isTerm
25182519
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
@@ -3618,6 +3618,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
36183618
/** Is this the constructor of a class? */
36193619
def isClassConstructor: Boolean
36203620

3621+
/** Is this the super accessor? */
3622+
def isSuperAccessor: Boolean
3623+
36213624
/** Is this the definition of a type? */
36223625
def isType: Boolean
36233626

0 commit comments

Comments
 (0)