File tree 6 files changed +12
-75
lines changed
compiler/src/dotty/tools/dotc/tastyreflect
library/src/scala/tasty/reflect
6 files changed +12
-75
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ trait FlagsOpsImpl extends scala.tasty.reflect.FlagsOps with CoreImpl {
40
40
def Contravariant : Flags = core.Flags .Contravariant
41
41
def Scala2X : Flags = core.Flags .Scala2x
42
42
def DefaultParameterized : Flags = core.Flags .DefaultParameterized
43
- def Stable : Flags = core.Flags .StableRealizable
43
+ def StableRealizable : Flags = core.Flags .StableRealizable
44
44
def Param : Flags = core.Flags .Param
45
45
def ParamAccessor : Flags = core.Flags .ParamAccessor
46
46
}
Original file line number Diff line number Diff line change @@ -193,6 +193,11 @@ trait SymbolOpsImpl extends scala.tasty.reflect.SymbolOps with CoreImpl {
193
193
val sym = symbol.moduleClass
194
194
if (sym.exists) Some (sym.asClass) else None
195
195
}
196
+
197
+ def companionClass (implicit ctx : Context ): Option [ClassSymbol ] = {
198
+ val sym = symbol.companionClass
199
+ if (sym.exists) Some (sym.asClass) else None
200
+ }
196
201
}
197
202
198
203
object IsBindSymbol extends IsBindSymbolModule {
Original file line number Diff line number Diff line change @@ -93,8 +93,8 @@ trait FlagsOps extends Core {
93
93
/** Is this symbol a method with default parameters */
94
94
def DefaultParameterized : Flags
95
95
96
- /** Is this symbol member that is assumed to be stable */
97
- def Stable : Flags
96
+ /** Is this symbol member that is assumed to be stable and realizable */
97
+ def StableRealizable : Flags
98
98
99
99
/** Is this symbol a parameter */
100
100
def Param : Flags
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ trait Printers
126
126
if (flags.is(Flags .Contravariant )) flagList += " Flags.Contravariant"
127
127
if (flags.is(Flags .Scala2X )) flagList += " Flags.Scala2X"
128
128
if (flags.is(Flags .DefaultParameterized )) flagList += " Flags.DefaultParameterized"
129
- if (flags.is(Flags .Stable )) flagList += " Flags.Stable "
129
+ if (flags.is(Flags .StableRealizable )) flagList += " Flags.StableRealizable "
130
130
if (flags.is(Flags .Param )) flagList += " Flags.Param"
131
131
if (flags.is(Flags .ParamAccessor )) flagList += " Flags.ParamAccessor"
132
132
flagList.result().mkString(" | " )
@@ -501,7 +501,7 @@ trait Printers
501
501
if (flags.is(Flags .Contravariant )) flagList += " contravariant"
502
502
if (flags.is(Flags .Scala2X )) flagList += " scala2x"
503
503
if (flags.is(Flags .DefaultParameterized )) flagList += " defaultParameterized"
504
- if (flags.is(Flags .Stable )) flagList += " stable "
504
+ if (flags.is(Flags .StableRealizable )) flagList += " stableRealizable "
505
505
if (flags.is(Flags .Param )) flagList += " param"
506
506
if (flags.is(Flags .ParamAccessor )) flagList += " paramAccessor"
507
507
flagList.result().mkString(" /*" , " " , " */" )
Original file line number Diff line number Diff line change @@ -155,6 +155,8 @@ trait SymbolOps extends Core {
155
155
156
156
/** The class symbol of the companion module class */
157
157
def moduleClass (implicit ctx : Context ): Option [ClassSymbol ]
158
+
159
+ def companionClass (implicit ctx : Context ): Option [ClassSymbol ]
158
160
}
159
161
implicit def ValSymbolDeco (symbol : ValSymbol ): ValSymbolAPI
160
162
You can’t perform that action at this time.
0 commit comments