-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add transparent methods #4622
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
Add transparent methods #4622
Changes from all commits
4c4b403
6331cd8
2afb505
41c19c3
62b97b8
97f2eec
b359c7d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,5 +93,4 @@ object Mode { | |
|
||
/** We are in the IDE */ | ||
val Interactive = newMode(20, "Interactive") | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -779,7 +779,13 @@ object SymDenotations { | |
|
||
def isSkolem: Boolean = name == nme.SKOLEM | ||
|
||
def isInlineMethod(implicit ctx: Context): Boolean = is(InlineMethod, butNot = Accessor) | ||
def isInlinedMethod(implicit ctx: Context): Boolean = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the method's and the flag's name should match (so probably There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking if we keep something like |
||
is(InlineMethod, butNot = Accessor) | ||
|
||
def isTransparentMethod(implicit ctx: Context): Boolean = | ||
is(TransparentMethod, butNot = Accessor) | ||
|
||
def isInlineableMethod(implicit ctx: Context) = isInlinedMethod || isTransparentMethod | ||
|
||
/** ()T and => T types should be treated as equivalent for this symbol. | ||
* Note: For the moment, we treat Scala-2 compiled symbols as loose matching, | ||
|
@@ -905,7 +911,7 @@ object SymDenotations { | |
|
||
/** A symbol is effectively final if it cannot be overridden in a subclass */ | ||
final def isEffectivelyFinal(implicit ctx: Context): Boolean = | ||
is(PrivateOrFinalOrInline) || !owner.isClass || owner.is(ModuleOrFinal) || owner.isAnonymousClass | ||
is(EffectivelyFinal) || !owner.isClass || owner.is(ModuleOrFinal) || owner.isAnonymousClass | ||
|
||
/** The class containing this denotation which has the given effective name. */ | ||
final def enclosingClassNamed(name: Name)(implicit ctx: Context): Symbol = { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make transparent a
commonFlag
, if we use it that way below anyways?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since there are no
transparent
types, it should not apply to them.