Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1855,42 +1855,43 @@ class ReflectionCompilerInterface(val rootContext: core.Contexts.Context) extend
/** Intersection of the two flag sets */
def Flags_and(self: Flags)(that: Flags): Flags = self & that

def Flags_EmptyFlags: Flags = core.Flags.EmptyFlags
def Flags_Private: Flags = core.Flags.Private
def Flags_Protected: Flags = core.Flags.Protected
def Flags_Abstract: Flags = core.Flags.Abstract
def Flags_Open: Flags = core.Flags.Open
def Flags_Final: Flags = core.Flags.Final
def Flags_Sealed: Flags = core.Flags.Sealed
def Flags_Artifact: Flags = core.Flags.Artifact
def Flags_Case: Flags = core.Flags.Case
def Flags_Implicit: Flags = core.Flags.Implicit
def Flags_Given: Flags = core.Flags.Given
def Flags_CaseAcessor: Flags = core.Flags.CaseAccessor
def Flags_Contravariant: Flags = core.Flags.Contravariant
def Flags_Covariant: Flags = core.Flags.Covariant
def Flags_EmptyFlags: Flags = core.Flags.EmptyFlags
def Flags_Enum: Flags = core.Flags.Enum
def Flags_Erased: Flags = core.Flags.Erased
def Flags_Lazy: Flags = core.Flags.Lazy
def Flags_Override: Flags = core.Flags.Override
def Flags_ExtensionMethod: Flags = core.Flags.ExtensionMethod
def Flags_FieldAccessor: Flags = core.Flags.Accessor
def Flags_Final: Flags = core.Flags.Final
def Flags_Given: Flags = core.Flags.Given
def Flags_HasDefault: Flags = core.Flags.HasDefault
def Flags_Implicit: Flags = core.Flags.Implicit
def Flags_Inline: Flags = core.Flags.Inline
def Flags_Macro: Flags = core.Flags.Macro
def Flags_Static: Flags = core.Flags.JavaStatic
def Flags_JavaDefined: Flags = core.Flags.JavaDefined
def Flags_Object: Flags = core.Flags.Module
def Flags_Trait: Flags = core.Flags.Trait
def Flags_Lazy: Flags = core.Flags.Lazy
def Flags_Local: Flags = core.Flags.Local
def Flags_Synthetic: Flags = core.Flags.Synthetic
def Flags_Artifact: Flags = core.Flags.Artifact
def Flags_Macro: Flags = core.Flags.Macro
def Flags_ModuleClass: Flags = core.Flags.ModuleClass
def Flags_Mutable: Flags = core.Flags.Mutable
def Flags_FieldAccessor: Flags = core.Flags.Accessor
def Flags_CaseAcessor: Flags = core.Flags.CaseAccessor
def Flags_Covariant: Flags = core.Flags.Covariant
def Flags_Contravariant: Flags = core.Flags.Contravariant
def Flags_Scala2X: Flags = core.Flags.Scala2x
def Flags_HasDefault: Flags = core.Flags.HasDefault
def Flags_StableRealizable: Flags = core.Flags.StableRealizable
def Flags_Object: Flags = core.Flags.Module
def Flags_Open: Flags = core.Flags.Open
def Flags_Override: Flags = core.Flags.Override
def Flags_Package: Flags = core.Flags.Package
def Flags_Param: Flags = core.Flags.Param
def Flags_ParamAccessor: Flags = core.Flags.ParamAccessor
def Flags_Enum: Flags = core.Flags.Enum
def Flags_ModuleClass: Flags = core.Flags.ModuleClass
def Flags_Private: Flags = core.Flags.Private
def Flags_PrivateLocal: Flags = core.Flags.PrivateLocal
def Flags_Package: Flags = core.Flags.Package
def Flags_Protected: Flags = core.Flags.Protected
def Flags_Scala2X: Flags = core.Flags.Scala2x
def Flags_Sealed: Flags = core.Flags.Sealed
def Flags_StableRealizable: Flags = core.Flags.StableRealizable
def Flags_Static: Flags = core.Flags.JavaStatic
def Flags_Synthetic: Flags = core.Flags.Synthetic
def Flags_Trait: Flags = core.Flags.Trait


/////////////////
Expand Down
51 changes: 26 additions & 25 deletions library/src/scala/internal/tasty/CompilerInterface.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1404,41 +1404,42 @@ trait CompilerInterface {
/** Intersection of the two flag sets */
def Flags_and(self: Flags)(that: Flags): Flags

def Flags_EmptyFlags: Flags
def Flags_Private: Flags
def Flags_Protected: Flags
def Flags_Abstract: Flags
def Flags_Final: Flags
def Flags_Sealed: Flags
def Flags_Artifact: Flags
def Flags_Case: Flags
def Flags_Implicit: Flags
def Flags_Given: Flags
def Flags_CaseAcessor: Flags
def Flags_Contravariant: Flags
def Flags_Covariant: Flags
def Flags_EmptyFlags: Flags
def Flags_Enum: Flags
def Flags_Erased: Flags
def Flags_Lazy: Flags
def Flags_Override: Flags
def Flags_ExtensionMethod: Flags
def Flags_FieldAccessor: Flags
def Flags_Final: Flags
def Flags_Given: Flags
def Flags_HasDefault: Flags
def Flags_Implicit: Flags
def Flags_Inline: Flags
def Flags_Macro: Flags
def Flags_Static: Flags
def Flags_JavaDefined: Flags
def Flags_Object: Flags
def Flags_Trait: Flags
def Flags_Lazy: Flags
def Flags_Local: Flags
def Flags_Synthetic: Flags
def Flags_Artifact: Flags
def Flags_Macro: Flags
def Flags_ModuleClass: Flags
def Flags_Mutable: Flags
def Flags_FieldAccessor: Flags
def Flags_CaseAcessor: Flags
def Flags_Covariant: Flags
def Flags_Contravariant: Flags
def Flags_Scala2X: Flags
def Flags_HasDefault: Flags
def Flags_StableRealizable: Flags
def Flags_Object: Flags
def Flags_Override: Flags
def Flags_Package: Flags
def Flags_Param: Flags
def Flags_ParamAccessor: Flags
def Flags_Enum: Flags
def Flags_ModuleClass: Flags
def Flags_Private: Flags
def Flags_PrivateLocal: Flags
def Flags_Package: Flags
def Flags_Protected: Flags
def Flags_Scala2X: Flags
def Flags_Sealed: Flags
def Flags_StableRealizable: Flags
def Flags_Static: Flags
def Flags_Synthetic: Flags
def Flags_Trait: Flags


/////////////////
Expand Down
123 changes: 63 additions & 60 deletions library/src/scala/tasty/Reflection.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2831,110 +2831,113 @@ class Reflection(private[scala] val internal: CompilerInterface) { self =>

object Flags:

/** Is this symbol `abstract` */
def Abstract: Flags = internal.Flags_Abstract

/** Was this symbol generated by Scala compiler */
def Artifact: Flags = internal.Flags_Artifact

/** Is this symbol `case` */
def Case: Flags = internal.Flags_Case

/** Is this symbol a getter for case class parameter */
def CaseAcessor: Flags = internal.Flags_CaseAcessor

/** Is this symbol a type parameter marked as contravariant `-` */
def Contravariant: Flags = internal.Flags_Contravariant

/** Is this symbol a type parameter marked as covariant `+` */
def Covariant: Flags = internal.Flags_Covariant

/** The empty set of flags */
def EmptyFlags = internal.Flags_EmptyFlags

/** Is this symbol `private` */
def Private: Flags = internal.Flags_Private
/** Is this symbol an enum */
def Enum: Flags = internal.Flags_Enum

/** Is this symbol `protected` */
def Protected: Flags = internal.Flags_Protected
/** Is this symbol `erased` */
def Erased: Flags = internal.Flags_Erased

/** Is this symbol `abstract` */
def Abstract: Flags = internal.Flags_Abstract
/** Is this symbol a `def` defined in an `extension` */
def ExtensionMethod: Flags = internal.Flags_ExtensionMethod

/** Is this symbol a getter or a setter */
def FieldAccessor: Flags = internal.Flags_FieldAccessor

/** Is this symbol `final` */
def Final: Flags = internal.Flags_Final

/** Is this symbol `sealed` */
def Sealed: Flags = internal.Flags_Sealed
/** Is this symbol an inferable ("given") parameter */
def Given: Flags = internal.Flags_Given

/** Is this symbol `case` */
def Case: Flags = internal.Flags_Case
/** Is this symbol a parameter with a default value? */
def HasDefault: Flags = internal.Flags_HasDefault

/** Is this symbol `implicit` */
def Implicit: Flags = internal.Flags_Implicit

/** Is this symbol an inferable ("given") parameter */
def Given: Flags = internal.Flags_Given
/** Is this symbol `inline` */
def Inline: Flags = internal.Flags_Inline

/** Is this symbol `erased` */
def Erased: Flags = internal.Flags_Erased
/** Is this symbol defined in a Java class */
def JavaDefined: Flags = internal.Flags_JavaDefined

/** Is this symbol `lazy` */
def Lazy: Flags = internal.Flags_Lazy

/** Is this symbol `override` */
def Override: Flags = internal.Flags_Override

/** Is this symbol `inline` */
def Inline: Flags = internal.Flags_Inline
/** Is this symbol local? Used in conjunction with private/private[Type] to mean private[this] extends Modifier proctected[this] */
def Local: Flags = internal.Flags_Local

/** Is this symbol marked as a macro. An inline method containing toplevel splices */
def Macro: Flags = internal.Flags_Macro

/** Is this symbol marked as static. Mapped to static Java member */
def Static: Flags = internal.Flags_Static
/** Is this symbol a module class */
def ModuleClass: Flags = internal.Flags_ModuleClass

/** Is this symbol defined in a Java class */
def JavaDefined: Flags = internal.Flags_JavaDefined
/** Is this symbol a `var` (when used on a ValDef) */
def Mutable: Flags = internal.Flags_Mutable

/** Is this symbol an object or its class (used for a ValDef or a ClassDef extends Modifier respectively) */
def Object: Flags = internal.Flags_Object

/** Is this symbol a trait */
def Trait: Flags = internal.Flags_Trait

/** Is this symbol local? Used in conjunction with private/private[Type] to mean private[this] extends Modifier proctected[this] */
def Local: Flags = internal.Flags_Local

/** Was this symbol generated by Scala compiler */
def Synthetic: Flags = internal.Flags_Synthetic
/** Is this symbol `override` */
def Override: Flags = internal.Flags_Override

/** Is this symbol to be tagged Java Synthetic */
def Artifact: Flags = internal.Flags_Artifact
/** Is this symbol a package */
def Package: Flags = internal.Flags_Package

/** Is this symbol a `var` (when used on a ValDef) */
def Mutable: Flags = internal.Flags_Mutable
/** Is this symbol a parameter */
def Param: Flags = internal.Flags_Param

/** Is this symbol a getter or a setter */
def FieldAccessor: Flags = internal.Flags_FieldAccessor
/** Is this symbol a parameter accessor */
def ParamAccessor: Flags = internal.Flags_ParamAccessor

/** Is this symbol a getter for case class parameter */
def CaseAcessor: Flags = internal.Flags_CaseAcessor
/** Is this symbol `private` */
def Private: Flags = internal.Flags_Private

/** Is this symbol a type parameter marked as covariant `+` */
def Covariant: Flags = internal.Flags_Covariant
/** Is this symbol labeled private[this] */
def PrivateLocal: Flags = internal.Flags_PrivateLocal

/** Is this symbol a type parameter marked as contravariant `-` */
def Contravariant: Flags = internal.Flags_Contravariant
/** Is this symbol `protected` */
def Protected: Flags = internal.Flags_Protected

/** Was this symbol imported from Scala2.x */
def Scala2X: Flags = internal.Flags_Scala2X

/** Is this symbol a parameter with a default value? */
def HasDefault: Flags = internal.Flags_HasDefault
/** Is this symbol `sealed` */
def Sealed: Flags = internal.Flags_Sealed

/** Is this symbol member that is assumed to be stable and realizable */
def StableRealizable: Flags = internal.Flags_StableRealizable

/** Is this symbol a parameter */
def Param: Flags = internal.Flags_Param

/** Is this symbol a parameter accessor */
def ParamAccessor: Flags = internal.Flags_ParamAccessor

/** Is this symbol an enum */
def Enum: Flags = internal.Flags_Enum

/** Is this symbol a module class */
def ModuleClass: Flags = internal.Flags_ModuleClass
/** Is this symbol marked as static. Mapped to static Java member */
def Static: Flags = internal.Flags_Static

/** Is this symbol labeled private[this] */
def PrivateLocal: Flags = internal.Flags_PrivateLocal
/** Is this symbol to be tagged Java Synthetic */
def Synthetic: Flags = internal.Flags_Synthetic

/** Is this symbol a package */
def Package: Flags = internal.Flags_Package
/** Is this symbol a trait */
def Trait: Flags = internal.Flags_Trait

extension (flags: Flags):
/** Is the given flag set a subset of this flag sets */
Expand Down
47 changes: 24 additions & 23 deletions library/src/scala/tasty/reflect/ExtractorsPrinter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,40 @@ class ExtractorsPrinter[R <: Reflection & Singleton](val tasty: R) extends Print

def showFlags(flags: Flags)(using ctx: Context): String = {
val flagList = List.newBuilder[String]
if (flags.is(Flags.Private)) flagList += "Flags.Private"
if (flags.is(Flags.Protected)) flagList += "Flags.Protected"
if (flags.is(Flags.Abstract)) flagList += "Flags.Abstract"
if (flags.is(Flags.Final)) flagList += "Flags.Final"
if (flags.is(Flags.Sealed)) flagList += "Flags.Sealed"
if (flags.is(Flags.Artifact)) flagList += "Flags.Artifact"
if (flags.is(Flags.Case)) flagList += "Flags.Case"
if (flags.is(Flags.Implicit)) flagList += "Flags.Implicit"
if (flags.is(Flags.CaseAcessor)) flagList += "Flags.CaseAcessor"
if (flags.is(Flags.Contravariant)) flagList += "Flags.Contravariant"
if (flags.is(Flags.Covariant)) flagList += "Flags.Covariant"
if (flags.is(Flags.Enum)) flagList += "Flags.Enum"
if (flags.is(Flags.Erased)) flagList += "Flags.Erased"
if (flags.is(Flags.Lazy)) flagList += "Flags.Lazy"
if (flags.is(Flags.Override)) flagList += "Flags.Override"
if (flags.is(Flags.ExtensionMethod)) flagList += "Flags.ExtensionMethod"
if (flags.is(Flags.FieldAccessor)) flagList += "Flags.FieldAccessor"
if (flags.is(Flags.Final)) flagList += "Flags.Final"
if (flags.is(Flags.HasDefault)) flagList += "Flags.HasDefault"
if (flags.is(Flags.Implicit)) flagList += "Flags.Implicit"
if (flags.is(Flags.Inline)) flagList += "Flags.Inline"
if (flags.is(Flags.Macro)) flagList += "Flags.Macro"
if (flags.is(Flags.JavaDefined)) flagList += "Flags.JavaDefined"
if (flags.is(Flags.Static)) flagList += "Flags.javaStatic"
if (flags.is(Flags.Object)) flagList += "Flags.Object"
if (flags.is(Flags.Trait)) flagList += "Flags.Trait"
if (flags.is(Flags.Lazy)) flagList += "Flags.Lazy"
if (flags.is(Flags.Local)) flagList += "Flags.Local"
if (flags.is(Flags.Synthetic)) flagList += "Flags.Synthetic"
if (flags.is(Flags.Artifact)) flagList += "Flags.Artifact"
if (flags.is(Flags.Macro)) flagList += "Flags.Macro"
if (flags.is(Flags.ModuleClass)) flagList += "Flags.ModuleClass"
if (flags.is(Flags.Mutable)) flagList += "Flags.Mutable"
if (flags.is(Flags.FieldAccessor)) flagList += "Flags.FieldAccessor"
if (flags.is(Flags.CaseAcessor)) flagList += "Flags.CaseAcessor"
if (flags.is(Flags.Covariant)) flagList += "Flags.Covariant"
if (flags.is(Flags.Contravariant)) flagList += "Flags.Contravariant"
if (flags.is(Flags.Scala2X)) flagList += "Flags.Scala2X"
if (flags.is(Flags.HasDefault)) flagList += "Flags.HasDefault"
if (flags.is(Flags.StableRealizable)) flagList += "Flags.StableRealizable"
if (flags.is(Flags.Object)) flagList += "Flags.Object"
if (flags.is(Flags.Override)) flagList += "Flags.Override"
if (flags.is(Flags.Package)) flagList += "Flags.Package"
if (flags.is(Flags.Param)) flagList += "Flags.Param"
if (flags.is(Flags.ParamAccessor)) flagList += "Flags.ParamAccessor"
if (flags.is(Flags.Enum)) flagList += "Flags.Enum"
if (flags.is(Flags.ModuleClass)) flagList += "Flags.ModuleClass"
if (flags.is(Flags.Private)) flagList += "Flags.Private"
if (flags.is(Flags.PrivateLocal)) flagList += "Flags.PrivateLocal"
if (flags.is(Flags.Package)) flagList += "Flags.Package"
if (flags.is(Flags.Protected)) flagList += "Flags.Protected"
if (flags.is(Flags.Scala2X)) flagList += "Flags.Scala2X"
if (flags.is(Flags.Sealed)) flagList += "Flags.Sealed"
if (flags.is(Flags.StableRealizable)) flagList += "Flags.StableRealizable"
if (flags.is(Flags.Static)) flagList += "Flags.javaStatic"
if (flags.is(Flags.Synthetic)) flagList += "Flags.Synthetic"
if (flags.is(Flags.Trait)) flagList += "Flags.Trait"
flagList.result().mkString(" | ")
}

Expand Down
Loading