File tree Expand file tree Collapse file tree 4 files changed +9
-0
lines changed
compiler/src/dotty/tools/dotc/tastyreflect
library/src/scala/tasty/reflect Expand file tree Collapse file tree 4 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ trait FlagsOpsImpl extends scala.tasty.reflect.FlagsOps with CoreImpl {
27
27
def Inline : Flags = core.Flags .Inline
28
28
def Macro : Flags = core.Flags .Macro
29
29
def Static : Flags = core.Flags .JavaStatic
30
+ def JavaDefined : Flags = core.Flags .JavaDefined
30
31
def Object : Flags = core.Flags .Module
31
32
def Trait : Flags = core.Flags .Trait
32
33
def Local : Flags = core.Flags .Local
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ trait SymbolOpsImpl extends scala.tasty.reflect.SymbolOps with CoreImpl {
11
11
12
12
def flags (implicit ctx : Context ): Flags = symbol.flags
13
13
14
+ def is (flags : Flags )(implicit ctx : Context ): Boolean = symbol.is(flags)
15
+
14
16
def privateWithin (implicit ctx : Context ): Option [Type ] = {
15
17
val within = symbol.privateWithin
16
18
if (within.exists && ! symbol.is(core.Flags .Protected )) Some (within.typeRef)
Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ trait FlagsOps extends Core {
54
54
/** Is this symbol marked as static. Mapped to static Java member */
55
55
def Static : Flags
56
56
57
+ /** Is this symbol defined in a Java class */
58
+ def JavaDefined : Flags
59
+
57
60
/** Is this symbol an object or its class (used for a ValDef or a ClassDef extends Modifier respectively) */
58
61
def Object : Flags
59
62
Original file line number Diff line number Diff line change @@ -14,6 +14,9 @@ trait SymbolOps extends Core {
14
14
/** Flags of this symbol */
15
15
def flags (implicit ctx : Context ): Flags
16
16
17
+ /** Does the symbol match the flags? */
18
+ def is (flags : Flags )(implicit ctx : Context ): Boolean
19
+
17
20
/** This symbol is private within the resulting type. */
18
21
def privateWithin (implicit ctx : Context ): Option [Type ]
19
22
You can’t perform that action at this time.
0 commit comments