-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Change/higher kinded #137
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
Change/higher kinded #137
Changes from all commits
51563ae
96196c9
4e287d5
c4f9683
a77a4f6
c2bcf2e
c1b884b
8db6b3e
9a6a4e8
cfd13f7
099e5a6
388d9a8
7f72143
f9625f9
7623856
91e44df
ad0600f
7cf6202
b3364db
c172148
f823e42
f600df4
e710af6
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 |
---|---|---|
|
@@ -321,9 +321,17 @@ object SymDenotations { | |
final def isAnonymousClass(implicit ctx: Context): Boolean = | ||
initial.asSymDenotation.name startsWith tpnme.ANON_CLASS | ||
|
||
/** Is this symbol a class representing a refinement? These classes | ||
* are used only temporarily in Typer and Unpickler as an intermediate | ||
* step for creating Refinement types. | ||
*/ | ||
final def isRefinementClass(implicit ctx: Context): Boolean = | ||
name.decode == tpnme.REFINE_CLASS | ||
|
||
/** is this symbol a trait representing a type lambda? */ | ||
final def isLambdaTrait(implicit ctx: Context): Boolean = | ||
isClass && name.startsWith(tpnme.LambdaPrefix) | ||
|
||
/** Is this symbol a package object or its module class? */ | ||
def isPackageObject(implicit ctx: Context): Boolean = { | ||
val poName = if (isType) nme.PACKAGE_CLS else nme.PACKAGE | ||
|
@@ -699,7 +707,7 @@ object SymDenotations { | |
|
||
/** All symbols overriden by this denotation. */ | ||
final def allOverriddenSymbols(implicit ctx: Context): Iterator[Symbol] = | ||
if (exists) | ||
if (exists && owner.isClass) | ||
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.
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. Don't understand: we are looking for the symbols which this symbol overrides. Finality of the overriding symbol does not change anything. |
||
owner.info.baseClasses.tail.iterator map overriddenSymbol filter (_.exists) | ||
else | ||
Iterator.empty | ||
|
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.
On a semi-related note, could we switch to ☃ as our magic char, and reserve $ for class nesting and other java-mimicry?
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.
Would be good to do this yes. We have a to-do list item to rehaul the whole name mangling scheme.