Skip to content

Make main methods invisible #11546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -588,7 +588,7 @@ class TreeUnpickler(reader: TastyReader,
val isScala2MacroDefinedInScala3 = flags.is(Macro, butNot = Inline) && flags.is(Erased)
ctx.owner match {
case cls: ClassSymbol if !isScala2MacroDefinedInScala3 || cls == defn.StringContextClass =>
// Enter all members of classes that are not Scala 2 macros or synthetic bean accessors.
// Enter all members of classes that are not Scala 2 macros.
//
// For `StringContext`, enter `s`, `f` and `raw`
// These definitions will be entered when defined in Scala 2. It is fine to enter them
Expand Down
1 change: 1 addition & 0 deletions compiler/src/scala/quoted/runtime/impl/QuotesImpl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2664,6 +2664,7 @@ class QuotesImpl private (using val ctx: Context) extends Quotes, QuoteUnpickler
def Implicit: Flags = dotc.core.Flags.Implicit
def Infix: Flags = dotc.core.Flags.Infix
def Inline: Flags = dotc.core.Flags.Inline
def Invisible: Flags = dotc.core.Flags.Invisible
def JavaDefined: Flags = dotc.core.Flags.JavaDefined
def JavaStatic: Flags = dotc.core.Flags.JavaStatic
def Lazy: Flags = dotc.core.Flags.Lazy
Expand Down
3 changes: 3 additions & 0 deletions library/src/scala/quoted/Quotes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3884,6 +3884,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
/** Is this symbol `inline` */
def Inline: Flags

/** Is this symbol invisible when typechecking? */
def Invisible: Flags

/** Is this symbol defined in a Java class */
def JavaDefined: Flags

Expand Down
10 changes: 5 additions & 5 deletions tasty/src/dotty/tools/tasty/TastyFormat.scala
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ Standard-Section: "ASTs" TopLevelStat*
PARAMsetter -- The setter part `x_=` of a var parameter `x` which itself is pickled as a PARAM
PARAMalias -- Parameter is alias of a superclass parameter
EXPORTED -- An export forwarder
OPEN
INVISIBLE -- an open class
OPEN -- an open class
INVISIBLE -- invisible during typechecking
Annotation

Variance = STABLE -- invariant
Expand Down Expand Up @@ -473,9 +473,9 @@ object TastyFormat {
final val PARAMalias = 41
final val TRANSPARENT = 42
final val INFIX = 43
final val EMPTYCLAUSE = 44
final val SPLITCLAUSE = 45
final val INVISIBLE = 46
final val INVISIBLE = 44
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normally this would require a MajorVersion bump, but as we have not yet had a stable ExperimentalVersion this is fine

final val EMPTYCLAUSE = 45
final val SPLITCLAUSE = 46

// Cat. 2: tag Nat

Expand Down