@@ -123,7 +123,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
123123 else self.symbol.info.decls.iterator.map(definitionFromSym).toList
124124 }
125125
126- def PackageDef_symbol (self : PackageDef )(implicit ctx : Context ): PackageSymbol = self.symbol
126+ def PackageDef_symbol (self : PackageDef )(implicit ctx : Context ): PackageDefSymbol = self.symbol
127127
128128 type ClassDef = tpd.TypeDef
129129
@@ -137,7 +137,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
137137 def ClassDef_derived (self : ClassDef )(implicit ctx : Context ): List [TypeTree ] = ClassDef_rhs (self).derived.asInstanceOf [List [TypeTree ]]
138138 def ClassDef_self (self : ClassDef )(implicit ctx : Context ): Option [ValDef ] = optional(ClassDef_rhs (self).self)
139139 def ClassDef_body (self : ClassDef )(implicit ctx : Context ): List [Statement ] = ClassDef_rhs (self).body
140- def ClassDef_symbol (self : ClassDef )(implicit ctx : Context ): ClassSymbol = self.symbol.asClass
140+ def ClassDef_symbol (self : ClassDef )(implicit ctx : Context ): ClassDefSymbol = self.symbol.asClass
141141 private def ClassDef_rhs (self : ClassDef ) = self.rhs.asInstanceOf [tpd.Template ]
142142
143143 def ClassDef_copy (original : ClassDef )(name : String , constr : DefDef , parents : List [Tree /* Term | TypeTree */ ], derived : List [TypeTree ], selfOpt : Option [ValDef ], body : List [Statement ])(implicit ctx : Context ): ClassDef = {
@@ -153,9 +153,9 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
153153 }
154154
155155 def TypeDef_rhs (self : TypeDef )(implicit ctx : Context ): Tree /* TypeTree | TypeBoundsTree*/ = self.rhs
156- def TypeDef_symbol (self : TypeDef )(implicit ctx : Context ): TypeSymbol = self.symbol.asType
156+ def TypeDef_symbol (self : TypeDef )(implicit ctx : Context ): TypeDefSymbol = self.symbol.asType
157157
158- def TypeDef_apply (symbol : TypeSymbol )(implicit ctx : Context ): TypeDef = withDefaultPos(ctx => tpd.TypeDef (symbol)(ctx))
158+ def TypeDef_apply (symbol : TypeDefSymbol )(implicit ctx : Context ): TypeDef = withDefaultPos(ctx => tpd.TypeDef (symbol)(ctx))
159159 def TypeDef_copy (original : TypeDef )(name : String , rhs : Tree /* TypeTree | TypeBoundsTree*/ )(implicit ctx : Context ): TypeDef =
160160 tpd.cpy.TypeDef (original)(name.toTypeName, rhs)
161161
@@ -170,9 +170,9 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
170170 def DefDef_paramss (self : DefDef )(implicit ctx : Context ): List [List [ValDef ]] = self.vparamss
171171 def DefDef_returnTpt (self : DefDef )(implicit ctx : Context ): TypeTree = self.tpt
172172 def DefDef_rhs (self : DefDef )(implicit ctx : Context ): Option [Tree ] = optional(self.rhs)
173- def DefDef_symbol (self : DefDef )(implicit ctx : Context ): DefSymbol = self.symbol.asTerm
173+ def DefDef_symbol (self : DefDef )(implicit ctx : Context ): DefDefSymbol = self.symbol.asTerm
174174
175- def DefDef_apply (symbol : DefSymbol , rhsFn : List [Type ] => List [List [Term ]] => Option [Term ])(implicit ctx : Context ): DefDef =
175+ def DefDef_apply (symbol : DefDefSymbol , rhsFn : List [Type ] => List [List [Term ]] => Option [Term ])(implicit ctx : Context ): DefDef =
176176 withDefaultPos(ctx => tpd.polyDefDef(symbol, tparams => vparamss => rhsFn(tparams)(vparamss).getOrElse(tpd.EmptyTree ))(ctx))
177177
178178 def DefDef_copy (original : DefDef )(name : String , typeParams : List [TypeDef ], paramss : List [List [ValDef ]], tpt : TypeTree , rhs : Option [Term ])(implicit ctx : Context ): DefDef =
@@ -187,9 +187,9 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
187187
188188 def ValDef_tpt (self : ValDef )(implicit ctx : Context ): TypeTree = self.tpt
189189 def ValDef_rhs (self : ValDef )(implicit ctx : Context ): Option [Tree ] = optional(self.rhs)
190- def ValDef_symbol (self : ValDef )(implicit ctx : Context ): ValSymbol = self.symbol.asTerm
190+ def ValDef_symbol (self : ValDef )(implicit ctx : Context ): ValDefSymbol = self.symbol.asTerm
191191
192- def ValDef_apply (symbol : ValSymbol , rhs : Option [Term ])(implicit ctx : Context ): ValDef =
192+ def ValDef_apply (symbol : ValDefSymbol , rhs : Option [Term ])(implicit ctx : Context ): ValDef =
193193 tpd.ValDef (symbol, rhs.getOrElse(tpd.EmptyTree ))
194194
195195 def ValDef_copy (original : ValDef )(name : String , tpt : TypeTree , rhs : Option [Term ])(implicit ctx : Context ): ValDef =
@@ -278,7 +278,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
278278
279279 def This_id (self : This )(implicit ctx : Context ): Option [Id ] = optional(self.qual)
280280
281- def This_apply (cls : ClassSymbol )(implicit ctx : Context ): This =
281+ def This_apply (cls : ClassDefSymbol )(implicit ctx : Context ): This =
282282 withDefaultPos(ctx => tpd.This (cls)(ctx))
283283
284284 def This_copy (original : Tree )(qual : Option [Id ])(implicit ctx : Context ): This =
@@ -996,7 +996,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
996996
997997 def Type_dealias (self : Type )(implicit ctx : Context ): Type = self.dealias
998998
999- def Type_classSymbol (self : Type )(implicit ctx : Context ): Option [ClassSymbol ] =
999+ def Type_classSymbol (self : Type )(implicit ctx : Context ): Option [ClassDefSymbol ] =
10001000 if (self.classSymbol.exists) Some (self.classSymbol.asClass) else None
10011001
10021002 def Type_typeSymbol (self : Type )(implicit ctx : Context ): Symbol = self.typeSymbol
@@ -1427,49 +1427,49 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
14271427 def Symbol_isAbstractType (self : Symbol )(implicit ctx : Context ): Boolean = self.isAbstractType
14281428 def Symbol_isClassConstructor (self : Symbol )(implicit ctx : Context ): Boolean = self.isClassConstructor
14291429
1430- type PackageSymbol = core.Symbols .Symbol
1430+ type PackageDefSymbol = core.Symbols .Symbol
14311431
1432- def matchPackageSymbol (symbol : Symbol )(implicit ctx : Context ): Option [PackageSymbol ] =
1432+ def matchPackageDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [PackageDefSymbol ] =
14331433 if (symbol.is(core.Flags .Package )) Some (symbol) else None
14341434
1435- def PackageSymbol_tree (self : PackageSymbol )(implicit ctx : Context ): PackageDef =
1435+ def PackageDefSymbol_tree (self : PackageDefSymbol )(implicit ctx : Context ): PackageDef =
14361436 FromSymbol .packageDefFromSym(self)
14371437
1438- type ClassSymbol = core.Symbols .ClassSymbol
1438+ type ClassDefSymbol = core.Symbols .ClassSymbol
14391439
1440- def matchClassSymbol (symbol : Symbol )(implicit ctx : Context ): Option [ClassSymbol ] =
1440+ def matchClassDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [ClassDefSymbol ] =
14411441 if (symbol.isClass) Some (symbol.asClass) else None
14421442
1443- def ClassSymbol_tree (self : ClassSymbol )(implicit ctx : Context ): ClassDef =
1443+ def ClassDefSymbol_tree (self : ClassDefSymbol )(implicit ctx : Context ): ClassDef =
14441444 FromSymbol .classDef(self)
14451445
1446- def ClassSymbol_fields (self : Symbol )(implicit ctx : Context ): List [Symbol ] =
1446+ def ClassDefSymbol_fields (self : Symbol )(implicit ctx : Context ): List [Symbol ] =
14471447 self.unforcedDecls.filter(isField)
14481448
1449- def ClassSymbol_field (self : Symbol )(name : String )(implicit ctx : Context ): Option [Symbol ] = {
1449+ def ClassDefSymbol_field (self : Symbol )(name : String )(implicit ctx : Context ): Option [Symbol ] = {
14501450 val sym = self.unforcedDecls.find(sym => sym.name == name.toTermName)
14511451 if (sym.exists && isField(sym)) Some (sym) else None
14521452 }
14531453
1454- def ClassSymbol_classMethod (self : Symbol )(name : String )(implicit ctx : Context ): List [DefSymbol ] = {
1454+ def ClassDefSymbol_classMethod (self : Symbol )(name : String )(implicit ctx : Context ): List [DefDefSymbol ] = {
14551455 self.typeRef.decls.iterator.collect {
14561456 case sym if isMethod(sym) && sym.name.toString == name => sym.asTerm
14571457 }.toList
14581458 }
14591459
1460- def ClassSymbol_classMethods (self : Symbol )(implicit ctx : Context ): List [DefSymbol ] = {
1460+ def ClassDefSymbol_classMethods (self : Symbol )(implicit ctx : Context ): List [DefDefSymbol ] = {
14611461 self.typeRef.decls.iterator.collect {
14621462 case sym if isMethod(sym) => sym.asTerm
14631463 }.toList
14641464 }
14651465
1466- def ClassSymbol_method (self : Symbol )(name : String )(implicit ctx : Context ): List [DefSymbol ] = {
1466+ def ClassDefSymbol_method (self : Symbol )(name : String )(implicit ctx : Context ): List [DefDefSymbol ] = {
14671467 self.typeRef.allMembers.iterator.map(_.symbol).collect {
14681468 case sym if isMethod(sym) && sym.name.toString == name => sym.asTerm
14691469 }.toList
14701470 }
14711471
1472- def ClassSymbol_methods (self : Symbol )(implicit ctx : Context ): List [DefSymbol ] = {
1472+ def ClassDefSymbol_methods (self : Symbol )(implicit ctx : Context ): List [DefDefSymbol ] = {
14731473 self.typeRef.allMembers.iterator.map(_.symbol).collect {
14741474 case sym if isMethod(sym) => sym.asTerm
14751475 }.toList
@@ -1478,67 +1478,67 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
14781478 private def isMethod (sym : Symbol )(implicit ctx : Context ): Boolean =
14791479 sym.isTerm && sym.is(Flags .Method ) && ! sym.isConstructor
14801480
1481- def ClassSymbol_caseFields (self : Symbol )(implicit ctx : Context ): List [ValSymbol ] = {
1481+ def ClassDefSymbol_caseFields (self : Symbol )(implicit ctx : Context ): List [ValDefSymbol ] = {
14821482 if (! self.isClass) Nil
14831483 else self.asClass.paramAccessors.collect {
14841484 case sym if sym.is(Flags .CaseAccessor ) => sym.asTerm
14851485 }
14861486 }
14871487
1488- def ClassSymbol_companionClass (self : Symbol )(implicit ctx : Context ): Option [ClassSymbol ] = {
1488+ def ClassDefSymbol_companionClass (self : Symbol )(implicit ctx : Context ): Option [ClassDefSymbol ] = {
14891489 val sym = self.companionModule.companionClass
14901490 if (sym.exists) Some (sym.asClass) else None
14911491 }
14921492
1493- def ClassSymbol_companionModule (self : Symbol )(implicit ctx : Context ): Option [ValSymbol ] = {
1493+ def ClassDefSymbol_companionModule (self : Symbol )(implicit ctx : Context ): Option [ValDefSymbol ] = {
14941494 val sym = self.companionModule
14951495 if (sym.exists) Some (sym.asTerm) else None
14961496 }
14971497
1498- def ClassSymbol_moduleClass (self : Symbol )(implicit ctx : Context ): Option [Symbol ] = {
1498+ def ClassDefSymbol_moduleClass (self : Symbol )(implicit ctx : Context ): Option [Symbol ] = {
14991499 val sym = self.moduleClass
15001500 if (sym.exists) Some (sym.asTerm) else None
15011501 }
15021502
15031503 private def isField (sym : Symbol )(implicit ctx : Context ): Boolean = sym.isTerm && ! sym.is(Flags .Method )
15041504
1505- def ClassSymbol_of (fullName : String )(implicit ctx : Context ): ClassSymbol = ctx.requiredClass(fullName)
1505+ def ClassDefSymbol_of (fullName : String )(implicit ctx : Context ): ClassDefSymbol = ctx.requiredClass(fullName)
15061506
1507- type TypeSymbol = core.Symbols .TypeSymbol
1507+ type TypeDefSymbol = core.Symbols .TypeSymbol
15081508
1509- def matchTypeSymbol (symbol : Symbol )(implicit ctx : Context ): Option [TypeSymbol ] =
1509+ def matchTypeDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [TypeDefSymbol ] =
15101510 if (symbol.isType) Some (symbol.asType) else None
15111511
1512- def TypeSymbol_tree (self : TypeSymbol )(implicit ctx : Context ): TypeDef =
1512+ def TypeDefSymbol_tree (self : TypeDefSymbol )(implicit ctx : Context ): TypeDef =
15131513 FromSymbol .typeDefFromSym(self)
1514- def TypeSymbol_isTypeParam (self : TypeSymbol )(implicit ctx : Context ): Boolean =
1514+ def TypeDefSymbol_isTypeParam (self : TypeDefSymbol )(implicit ctx : Context ): Boolean =
15151515 self.isTypeParam
15161516
1517- type DefSymbol = core.Symbols .TermSymbol
1517+ type DefDefSymbol = core.Symbols .TermSymbol
15181518
1519- def matchDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [DefSymbol ] =
1519+ def matchDefDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [DefDefSymbol ] =
15201520 if (symbol.isTerm && symbol.is(core.Flags .Method )) Some (symbol.asTerm) else None
15211521
1522- def DefSymbol_tree (self : DefSymbol )(implicit ctx : Context ): DefDef =
1522+ def DefDefSymbol_tree (self : DefDefSymbol )(implicit ctx : Context ): DefDef =
15231523 FromSymbol .defDefFromSym(self)
15241524
1525- def DefSymbol_signature (self : DefSymbol )(implicit ctx : Context ): Signature =
1525+ def DefDefSymbol_signature (self : DefDefSymbol )(implicit ctx : Context ): Signature =
15261526 self.signature
15271527
1528- type ValSymbol = core.Symbols .TermSymbol
1528+ type ValDefSymbol = core.Symbols .TermSymbol
15291529
1530- def matchValSymbol (symbol : Symbol )(implicit ctx : Context ): Option [ValSymbol ] =
1530+ def matchValDefSymbol (symbol : Symbol )(implicit ctx : Context ): Option [ValDefSymbol ] =
15311531 if (symbol.isTerm && ! symbol.is(core.Flags .Method ) && ! symbol.is(core.Flags .Case )) Some (symbol.asTerm) else None
15321532
1533- def ValSymbol_tree (self : ValSymbol )(implicit ctx : Context ): ValDef =
1533+ def ValDefSymbol_tree (self : ValDefSymbol )(implicit ctx : Context ): ValDef =
15341534 FromSymbol .valDefFromSym(self)
15351535
1536- def ValSymbol_moduleClass (self : ValSymbol )(implicit ctx : Context ): Option [ClassSymbol ] = {
1536+ def ValDefSymbol_moduleClass (self : ValDefSymbol )(implicit ctx : Context ): Option [ClassDefSymbol ] = {
15371537 val sym = self.moduleClass
15381538 if (sym.exists) Some (sym.asClass) else None
15391539 }
15401540
1541- def ValSymbol_companionClass (self : ValSymbol )(implicit ctx : Context ): Option [ClassSymbol ] = {
1541+ def ValDefSymbol_companionClass (self : ValDefSymbol )(implicit ctx : Context ): Option [ClassDefSymbol ] = {
15421542 val sym = self.companionClass
15431543 if (sym.exists) Some (sym.asClass) else None
15441544 }
0 commit comments