Skip to content

Commit 2f5b5fd

Browse files
Merge pull request #9983 from dotty-staging/add-reflect-symbol-docs
Add Reflection Symbol docs
2 parents c900cde + 83380a7 commit 2f5b5fd

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,10 @@ object SymDenotations {
733733
originalName.isSetterName &&
734734
(!isCompleted || info.firstParamTypes.nonEmpty) // to avoid being fooled by var x_= : Unit = ...
735735

736-
/** is this a symbol representing an import? */
736+
/** Is this a symbol representing an import? */
737737
final def isImport: Boolean = name == nme.IMPORT
738738

739-
/** is this the constructor of a class? */
739+
/** Is this the constructor of a class? */
740740
final def isClassConstructor: Boolean = name == nme.CONSTRUCTOR
741741

742742
/** Is this the constructor of a trait or a class */

library/src/scala/tasty/Reflection.scala

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,14 +2679,30 @@ trait Reflection { reflection =>
26792679
/** Annotations attached to this symbol */
26802680
def annots: List[Term]
26812681

2682+
/** Does this symbol come from a currently compiled source file? */
26822683
def isDefinedInCurrentRun: Boolean
26832684

2685+
/** Dummy val symbol that owns all statements within the initialization of the class.
2686+
* This may also contain local definitions such as classes defined in a `locally` block in the class.
2687+
*/
26842688
def isLocalDummy: Boolean
2689+
2690+
/** Is this symbol a class representing a refinement? */
26852691
def isRefinementClass: Boolean
2692+
2693+
/** Is this symbol an alias type? */
26862694
def isAliasType: Boolean
2695+
2696+
/** Is this symbol an anonymous class? */
26872697
def isAnonymousClass: Boolean
2698+
2699+
/** Is this symbol an anonymous function? */
26882700
def isAnonymousFunction: Boolean
2701+
2702+
/** Is this symbol an abstract type? */
26892703
def isAbstractType: Boolean
2704+
2705+
/** Is this the constructor of a class? */
26902706
def isClassConstructor: Boolean
26912707

26922708
/** Is this the definition of a type? */

0 commit comments

Comments
 (0)