-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Reflection Symbol docs #9983
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
Changes from all commits
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 |
---|---|---|
|
@@ -2679,14 +2679,30 @@ trait Reflection { reflection => | |
/** Annotations attached to this symbol */ | ||
def annots: List[Term] | ||
|
||
/** Does this symbol come from a currently compiled source file? */ | ||
def isDefinedInCurrentRun: Boolean | ||
|
||
/** Dummy val symbol that owns all statements within the initialization of the class. | ||
* This may also contain local definitions such as classes defined in a `locally` block in the class. | ||
*/ | ||
def isLocalDummy: 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. Regarding 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. We should see if we can have an alternative design. We cannot return the owner of the local dummy as that would be ambiguous. |
||
|
||
/** Is this symbol a class representing a refinement? */ | ||
def isRefinementClass: Boolean | ||
|
||
/** Is this symbol an alias type? */ | ||
def isAliasType: Boolean | ||
|
||
/** Is this symbol an anonymous class? */ | ||
def isAnonymousClass: Boolean | ||
|
||
/** Is this symbol an anonymous function? */ | ||
def isAnonymousFunction: Boolean | ||
|
||
/** Is this symbol an abstract type? */ | ||
def isAbstractType: Boolean | ||
|
||
/** Is this the constructor of a class? */ | ||
def isClassConstructor: Boolean | ||
|
||
/** Is this the definition of a type? */ | ||
|
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.
This can be potentially ambiguous, as now the compiler may compile a batch of files in multiple runs to support macros.