File tree Expand file tree Collapse file tree 3 files changed +5
-20
lines changed
compiler/src/dotty/tools/dotc/tastyreflect
library/src/scala/tasty/reflect Expand file tree Collapse file tree 3 files changed +5
-20
lines changed Original file line number Diff line number Diff line change @@ -1569,9 +1569,6 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
15691569 def Symbol_of (fullName : String )(given ctx : Context ): Symbol =
15701570 ctx.requiredClass(fullName)
15711571
1572- def Symbol_isTypeDefSymbol (symbol : Symbol )(given Context ): Boolean =
1573- symbol.isType && ! symbol.is(core.Flags .Case )
1574-
15751572 def Symbol_isTypeParam (self : Symbol )(given Context ): Boolean =
15761573 self.isTypeParam
15771574
@@ -1596,13 +1593,8 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
15961593
15971594 def Symbol_companionModule (self : Symbol )(given Context ): Symbol = self.companionModule
15981595
1599- def Symbol_isBindSymbol (symbol : Symbol )(given Context ): Boolean =
1600- symbol.isTerm && symbol.is(core.Flags .Case )
1601-
16021596 def Symbol_noSymbol (given ctx : Context ): Symbol = core.Symbols .NoSymbol
16031597
1604- def Symbol_isNoSymbol (symbol : Symbol )(given Context ): Boolean = symbol eq core.Symbols .NoSymbol
1605-
16061598 //
16071599 // FLAGS
16081600 //
Original file line number Diff line number Diff line change @@ -1268,8 +1268,6 @@ trait CompilerInterface {
12681268
12691269 def Symbol_of (fullName : String )(given ctx : Context ): Symbol
12701270
1271- def Symbol_isTypeDefSymbol (symbol : Symbol )(given ctx : Context ): Boolean
1272-
12731271 def Symbol_isTypeParam (self : Symbol )(given ctx : Context ): Boolean
12741272
12751273 def Symbol_isTypeBindSymbol (symbol : Symbol )(given ctx : Context ): Boolean
@@ -1292,12 +1290,8 @@ trait CompilerInterface {
12921290 /** The symbol of the companion module */
12931291 def Symbol_companionModule (self : Symbol )(given ctx : Context ): Symbol
12941292
1295- def Symbol_isBindSymbol (symbol : Symbol )(given ctx : Context ): Boolean
1296-
12971293 def Symbol_noSymbol (given ctx : Context ): Symbol
12981294
1299- def Symbol_isNoSymbol (symbol : Symbol )(given ctx : Context ): Boolean
1300-
13011295 //
13021296 // FLAGS
13031297 //
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ package scala.tasty
22package reflect
33
44/** Tasty reflect symbol */
5- trait SymbolOps extends Core {
6-
7- // Symbol
5+ trait SymbolOps extends Core { selfSymbolOps : FlagsOps =>
86
97 object Symbol {
108 /** The class Symbol of a global class definition */
@@ -99,11 +97,12 @@ trait SymbolOps extends Core {
9997 def isTerm (given ctx : Context ): Boolean = internal.Symbol_isTermSymbol (self)
10098 def isValDef (given ctx : Context ): Boolean = internal.Symbol_isValDefSymbol (self)
10199 def isDefDef (given ctx : Context ): Boolean = internal.Symbol_isDefDefSymbol (self)
102- def isTypeDef (given ctx : Context ): Boolean = internal. Symbol_isTypeDefSymbol ( self)
100+ def isTypeDef (given ctx : Context ): Boolean = self.isType && ! self.flags.is( Flags . Case )
103101 def isClassDef (given ctx : Context ): Boolean = internal.Symbol_isClassDefSymbol (self)
104- def isBind (given ctx : Context ): Boolean = internal.Symbol_isBindSymbol (self)
102+ def isBind (given ctx : Context ): Boolean = self.isTerm && self.flags.is(Flags .Case )
103+ def isTypeBind (given ctx : Context ): Boolean = self.isType && self.flags.is(Flags .Case )
105104 def isPackageDef (given ctx : Context ): Boolean = internal.Symbol_isPackageDefSymbol (self)
106- def isNoSymbol (given ctx : Context ): Boolean = internal. Symbol_isNoSymbol ( self)
105+ def isNoSymbol (given ctx : Context ): Boolean = self == Symbol .noSymbol
107106
108107 /** Fields directly declared in the class */
109108 def fields (given ctx : Context ): List [Symbol ] =
You can’t perform that action at this time.
0 commit comments