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
1569
1569
def Symbol_of (fullName : String )(given ctx : Context ): Symbol =
1570
1570
ctx.requiredClass(fullName)
1571
1571
1572
- def Symbol_isTypeDefSymbol (symbol : Symbol )(given Context ): Boolean =
1573
- symbol.isType && ! symbol.is(core.Flags .Case )
1574
-
1575
1572
def Symbol_isTypeParam (self : Symbol )(given Context ): Boolean =
1576
1573
self.isTypeParam
1577
1574
@@ -1596,13 +1593,8 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
1596
1593
1597
1594
def Symbol_companionModule (self : Symbol )(given Context ): Symbol = self.companionModule
1598
1595
1599
- def Symbol_isBindSymbol (symbol : Symbol )(given Context ): Boolean =
1600
- symbol.isTerm && symbol.is(core.Flags .Case )
1601
-
1602
1596
def Symbol_noSymbol (given ctx : Context ): Symbol = core.Symbols .NoSymbol
1603
1597
1604
- def Symbol_isNoSymbol (symbol : Symbol )(given Context ): Boolean = symbol eq core.Symbols .NoSymbol
1605
-
1606
1598
//
1607
1599
// FLAGS
1608
1600
//
Original file line number Diff line number Diff line change @@ -1268,8 +1268,6 @@ trait CompilerInterface {
1268
1268
1269
1269
def Symbol_of (fullName : String )(given ctx : Context ): Symbol
1270
1270
1271
- def Symbol_isTypeDefSymbol (symbol : Symbol )(given ctx : Context ): Boolean
1272
-
1273
1271
def Symbol_isTypeParam (self : Symbol )(given ctx : Context ): Boolean
1274
1272
1275
1273
def Symbol_isTypeBindSymbol (symbol : Symbol )(given ctx : Context ): Boolean
@@ -1292,12 +1290,8 @@ trait CompilerInterface {
1292
1290
/** The symbol of the companion module */
1293
1291
def Symbol_companionModule (self : Symbol )(given ctx : Context ): Symbol
1294
1292
1295
- def Symbol_isBindSymbol (symbol : Symbol )(given ctx : Context ): Boolean
1296
-
1297
1293
def Symbol_noSymbol (given ctx : Context ): Symbol
1298
1294
1299
- def Symbol_isNoSymbol (symbol : Symbol )(given ctx : Context ): Boolean
1300
-
1301
1295
//
1302
1296
// FLAGS
1303
1297
//
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ package scala.tasty
2
2
package reflect
3
3
4
4
/** Tasty reflect symbol */
5
- trait SymbolOps extends Core {
6
-
7
- // Symbol
5
+ trait SymbolOps extends Core { selfSymbolOps : FlagsOps =>
8
6
9
7
object Symbol {
10
8
/** The class Symbol of a global class definition */
@@ -99,11 +97,12 @@ trait SymbolOps extends Core {
99
97
def isTerm (given ctx : Context ): Boolean = internal.Symbol_isTermSymbol (self)
100
98
def isValDef (given ctx : Context ): Boolean = internal.Symbol_isValDefSymbol (self)
101
99
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 )
103
101
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 )
105
104
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
107
106
108
107
/** Fields directly declared in the class */
109
108
def fields (given ctx : Context ): List [Symbol ] =
You can’t perform that action at this time.
0 commit comments