Skip to content

Commit

Permalink
Rebased
Browse files Browse the repository at this point in the history
  • Loading branch information
biboudis committed Jan 28, 2019
1 parent 4098c43 commit 521e9f2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 75 deletions.
70 changes: 0 additions & 70 deletions compiler/src/dotty/tools/dotc/tastyreflect/FlagSet.scala

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ trait FlagsOpsImpl extends scala.tasty.reflect.FlagsOps with CoreImpl {
def Contravariant: Flags = core.Flags.Contravariant
def Scala2X: Flags = core.Flags.Scala2x
def DefaultParameterized: Flags = core.Flags.DefaultParameterized
def Stable: Flags = core.Flags.StableRealizable
def StableRealizable: Flags = core.Flags.StableRealizable
def Param: Flags = core.Flags.Param
def ParamAccessor: Flags = core.Flags.ParamAccessor
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ trait SymbolOpsImpl extends scala.tasty.reflect.SymbolOps with CoreImpl {
val sym = symbol.moduleClass
if (sym.exists) Some(sym.asClass) else None
}

def companionClass(implicit ctx: Context): Option[ClassSymbol] = {
val sym = symbol.companionClass
if (sym.exists) Some(sym.asClass) else None
}
}

object IsBindSymbol extends IsBindSymbolModule {
Expand Down
4 changes: 2 additions & 2 deletions library/src/scala/tasty/reflect/FlagsOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ trait FlagsOps extends Core {
/** Is this symbol a method with default parameters */
def DefaultParameterized: Flags

/** Is this symbol member that is assumed to be stable */
def Stable: Flags
/** Is this symbol member that is assumed to be stable and realizable */
def StableRealizable: Flags

/** Is this symbol a parameter */
def Param: Flags
Expand Down
4 changes: 2 additions & 2 deletions library/src/scala/tasty/reflect/Printers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ trait Printers
if (flags.is(Flags.Contravariant)) flagList += "Flags.Contravariant"
if (flags.is(Flags.Scala2X)) flagList += "Flags.Scala2X"
if (flags.is(Flags.DefaultParameterized)) flagList += "Flags.DefaultParameterized"
if (flags.is(Flags.Stable)) flagList += "Flags.Stable"
if (flags.is(Flags.StableRealizable)) flagList += "Flags.StableRealizable"
if (flags.is(Flags.Param)) flagList += "Flags.Param"
if (flags.is(Flags.ParamAccessor)) flagList += "Flags.ParamAccessor"
flagList.result().mkString(" | ")
Expand Down Expand Up @@ -501,7 +501,7 @@ trait Printers
if (flags.is(Flags.Contravariant)) flagList += "contravariant"
if (flags.is(Flags.Scala2X)) flagList += "scala2x"
if (flags.is(Flags.DefaultParameterized)) flagList += "defaultParameterized"
if (flags.is(Flags.Stable)) flagList += "stable"
if (flags.is(Flags.StableRealizable)) flagList += "stableRealizable"
if (flags.is(Flags.Param)) flagList += "param"
if (flags.is(Flags.ParamAccessor)) flagList += "paramAccessor"
flagList.result().mkString("/*", " ", "*/")
Expand Down
2 changes: 2 additions & 0 deletions library/src/scala/tasty/reflect/SymbolOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ trait SymbolOps extends Core {

/** The class symbol of the companion module class */
def moduleClass(implicit ctx: Context): Option[ClassSymbol]

def companionClass(implicit ctx: Context): Option[ClassSymbol]
}
implicit def ValSymbolDeco(symbol: ValSymbol): ValSymbolAPI

Expand Down

0 comments on commit 521e9f2

Please sign in to comment.