@@ -100,12 +100,15 @@ package scala.tasty.reflect
100100 * +- Constant
101101 *
102102 * +- Symbol --+- PackageDefSymbol
103- * +- ClassDefSymbol
104- * +- TypeDefSymbol
105- * +- TypeBindSymbol
106- * +- DefDefSymbol
107- * +- ValDefSymbol
108- * +- BindSymbol
103+ * |
104+ * +- TypeSymbol -+- ClassDefSymbol
105+ * | +- TypeDefSymbol
106+ * | +- TypeBindSymbol
107+ * |
108+ * +- TermSymbol -+- DefDefSymbol
109+ * | +- ValDefSymbol
110+ * | +- BindSymbol
111+ * |
109112 * +- NoSymbol
110113 *
111114 * +- Flags
@@ -249,7 +252,7 @@ trait Kernel {
249252 def DefDef_apply (symbol : DefDefSymbol , rhsFn : List [Type ] => List [List [Term ]] => Option [Term ])(implicit ctx : Context ): DefDef
250253 def DefDef_copy (original : DefDef )(name : String , typeParams : List [TypeDef ], paramss : List [List [ValDef ]], tpt : TypeTree , rhs : Option [Term ])(implicit ctx : Context ): DefDef
251254
252- /** Tree representing a value definition in the source code This inclues `val`, `lazy val`, `var`, `object` and parameter defintions . */
255+ /** Tree representing a value definition in the source code This inclues `val`, `lazy val`, `var`, `object` and parameter definitions . */
253256 type ValDef <: Definition
254257
255258 def matchValDef (tree : Tree )(implicit ctx : Context ): Option [ValDef ]
@@ -1173,12 +1176,16 @@ trait Kernel {
11731176
11741177 def PackageDefSymbol_tree (self : PackageDefSymbol )(implicit ctx : Context ): PackageDef
11751178
1179+ type TypeSymbol <: Symbol
1180+
1181+ def matchTypeSymbol (symbol : Symbol )(implicit ctx : Context ): Option [TypeSymbol ]
1182+
11761183 /** Symbol of a class definition. This includes anonymous class definitions and the class of a module object. */
1177- type ClassDefSymbol <: Symbol
1184+ type ClassDefSymbol <: TypeSymbol
11781185
11791186 def matchClassDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [ClassDefSymbol ]
11801187
1181- /** ClassDef tree of this defintion */
1188+ /** ClassDef tree of this definition */
11821189 def ClassDefSymbol_tree (self : ClassDefSymbol )(implicit ctx : Context ): ClassDef
11831190
11841191 /** Fields directly declared in the class */
@@ -1214,7 +1221,7 @@ trait Kernel {
12141221 def ClassDefSymbol_of (fullName : String )(implicit ctx : Context ): ClassDefSymbol
12151222
12161223 /** Symbol of a type (parameter or member) definition. */
1217- type TypeDefSymbol <: Symbol
1224+ type TypeDefSymbol <: TypeSymbol
12181225
12191226 def matchTypeDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [TypeDefSymbol ]
12201227
@@ -1224,30 +1231,34 @@ trait Kernel {
12241231 def TypeDefSymbol_tree (self : TypeDefSymbol )(implicit ctx : Context ): TypeDef
12251232
12261233 /** Symbol representing a bind definition. */
1227- type TypeBindSymbol <: Symbol
1234+ type TypeBindSymbol <: TypeSymbol
12281235
12291236 def matchTypeBindSymbol (symbol : Symbol )(implicit ctx : Context ): Option [TypeBindSymbol ]
12301237
12311238 /** TypeBind pattern of this definition */
12321239 def TypeBindSymbol_tree (self : TypeBindSymbol )(implicit ctx : Context ): TypeTree_TypeBind
12331240
1241+ type TermSymbol <: Symbol
1242+
1243+ def matchTermSymbol (symbol : Symbol )(implicit ctx : Context ): Option [TermSymbol ]
1244+
12341245 /** Symbol representing a method definition. */
1235- type DefDefSymbol <: Symbol
1246+ type DefDefSymbol <: TermSymbol
12361247
12371248 def matchDefDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [DefDefSymbol ]
12381249
1239- /** DefDef tree of this defintion */
1250+ /** DefDef tree of this definition */
12401251 def DefDefSymbol_tree (self : DefDefSymbol )(implicit ctx : Context ): DefDef
12411252
1242- /** Signature of this defintion */
1253+ /** Signature of this definition */
12431254 def DefDefSymbol_signature (self : DefDefSymbol )(implicit ctx : Context ): Signature
12441255
12451256 /** Symbol representing a value definition. This includes `val`, `lazy val`, `var`, `object` and parameter definitions. */
1246- type ValDefSymbol <: Symbol
1257+ type ValDefSymbol <: TermSymbol
12471258
12481259 def matchValDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [ValDefSymbol ]
12491260
1250- /** ValDef tree of this defintion */
1261+ /** ValDef tree of this definition */
12511262 def ValDefSymbol_tree (self : ValDefSymbol )(implicit ctx : Context ): ValDef
12521263
12531264 /** The class symbol of the companion module class */
@@ -1256,7 +1267,7 @@ trait Kernel {
12561267 def ValDefSymbol_companionClass (self : ValDefSymbol )(implicit ctx : Context ): Option [ClassDefSymbol ]
12571268
12581269 /** Symbol representing a bind definition. */
1259- type BindSymbol <: Symbol
1270+ type BindSymbol <: TermSymbol
12601271
12611272 def matchBindSymbol (symbol : Symbol )(implicit ctx : Context ): Option [BindSymbol ]
12621273
0 commit comments