@@ -49,7 +49,7 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
4949 }
5050
5151 def ConstantTypeDeco (x : ConstantType ): ConstantTypeAPI = new ConstantTypeAPI {
52-
52+ def value ( implicit ctx : Context ) : Any = x.value
5353 }
5454
5555 object ConstantType extends ConstantTypeExtractor {
@@ -60,7 +60,7 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
6060 }
6161
6262 object IsSymRef extends IsSymRefModule {
63- def unapply (tpe : TypeOrBounds )(implicit ctx : Context ): Option [SymRef ] = tpe match {
63+ def unapply (tpe : TypeOrBounds )(implicit ctx : Context ): Option [SymRef ] = tpe match {
6464 case tp : Types .NamedType =>
6565 tp.designator match {
6666 case sym : Symbol => Some (tp)
@@ -71,7 +71,7 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
7171 }
7272
7373 def SymRefDeco (x : SymRef ): SymRefAPI = new SymRefAPI {
74-
74+ def qualifier ( implicit ctx : Context ) : TypeOrBounds = x.prefix
7575 }
7676
7777 object SymRef extends SymRefExtractor {
@@ -97,7 +97,7 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
9797 }
9898
9999 def TermRefDeco (x : TermRef ): TermRefAPI = new TermRefAPI {
100-
100+ def qualifier ( implicit ctx : Context ) : TypeOrBounds = x.prefix
101101 }
102102
103103 object TermRef extends TermRefExtractor {
@@ -123,7 +123,8 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
123123 }
124124
125125 def TypeRefDeco (x : TypeRef ): TypeRefAPI = new TypeRefAPI {
126-
126+ def name (implicit ctx : Context ): String = x.name.toString
127+ def qualifier (implicit ctx : Context ): TypeOrBounds = x.prefix
127128 }
128129
129130 object TypeRef extends TypeRefExtractor {
@@ -145,7 +146,8 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
145146 }
146147
147148 def SuperTypeDeco (x : SuperType ): SuperTypeAPI = new SuperTypeAPI {
148-
149+ def thistpe (implicit ctx : Context ): Type = x.thistpe
150+ def supertpe (implicit ctx : Context ): Type = x.supertpe
149151 }
150152
151153 object SuperType extends SuperTypeExtractor {
@@ -163,7 +165,9 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
163165 }
164166
165167 def RefinementDeco (x : Refinement ): RefinementAPI = new RefinementAPI {
166-
168+ def parent (implicit ctx : Context ): Type = x.parent
169+ def name (implicit ctx : Context ): String = x.refinedName.toString
170+ def info (implicit ctx : Context ): TypeOrBounds = x.refinedInfo
167171 }
168172
169173 object Refinement extends RefinementExtractor {
@@ -181,7 +185,8 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
181185 }
182186
183187 def AppliedTypeDeco (x : AppliedType ): AppliedTypeAPI = new AppliedTypeAPI {
184-
188+ def tycon (implicit ctx : Context ): Type = x.tycon
189+ def args (implicit ctx : Context ): List [TypeOrBounds ] = x.args
185190 }
186191
187192 object AppliedType extends AppliedTypeExtractor {
@@ -199,7 +204,8 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
199204 }
200205
201206 def AnnotatedTypeDeco (x : AnnotatedType ): AnnotatedTypeAPI = new AnnotatedTypeAPI {
202-
207+ def underlying (implicit ctx : Context ): Type = x.underlying.stripTypeVar
208+ def annot (implicit ctx : Context ): Term = x.annot.tree
203209 }
204210
205211 object AnnotatedType extends AnnotatedTypeExtractor {
@@ -217,7 +223,8 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
217223 }
218224
219225 def AndTypeDeco (x : AndType ): AndTypeAPI = new AndTypeAPI {
220-
226+ def left (implicit ctx : Context ): Type = x.tp1.stripTypeVar
227+ def right (implicit ctx : Context ): Type = x.tp2.stripTypeVar
221228 }
222229
223230 object AndType extends AndTypeExtractor {
@@ -235,7 +242,8 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
235242 }
236243
237244 def OrTypeDeco (x : OrType ): OrTypeAPI = new OrTypeAPI {
238-
245+ def left (implicit ctx : Context ): Type = x.tp1
246+ def right (implicit ctx : Context ): Type = x.tp2
239247 }
240248
241249 object OrType extends OrTypeExtractor {
@@ -253,7 +261,9 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
253261 }
254262
255263 def MatchTypeDeco (x : MatchType ): MatchTypeAPI = new MatchTypeAPI {
256-
264+ def bound (implicit ctx : Context ): Type = x.bound
265+ def scrutinee (implicit ctx : Context ): Type = x.scrutinee
266+ def cases (implicit ctx : Context ): List [Type ] = x.cases
257267 }
258268
259269 object MatchType extends MatchTypeExtractor {
@@ -271,7 +281,7 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
271281 }
272282
273283 def ByNameTypeDeco (x : ByNameType ): ByNameTypeAPI = new ByNameTypeAPI {
274-
284+ def underlying ( implicit ctx : Context ) : Type = x.resType.stripTypeVar
275285 }
276286
277287 object ByNameType extends ByNameTypeExtractor {
@@ -290,7 +300,9 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
290300 }
291301
292302 def ParamRefDeco (x : ParamRef ): ParamRefAPI = new ParamRefAPI {
293-
303+ def binder (implicit ctx : Context ): LambdaType [TypeOrBounds ] =
304+ x.binder.asInstanceOf [LambdaType [TypeOrBounds ]] // Cast to tpd
305+ def paramNum (implicit ctx : Context ): Int = x.paramNum
294306 }
295307
296308 object ParamRef extends ParamRefExtractor {
@@ -312,7 +324,7 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
312324 }
313325
314326 def ThisTypeDeco (x : ThisType ): ThisTypeAPI = new ThisTypeAPI {
315-
327+ def underlying ( implicit ctx : Context ) : Type = x.underlying
316328 }
317329
318330 object ThisType extends ThisTypeExtractor {
@@ -330,7 +342,7 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
330342 }
331343
332344 def RecursiveThisDeco (x : RecursiveThis ): RecursiveThisAPI = new RecursiveThisAPI {
333-
345+ def binder ( implicit ctx : Context ) : RecursiveType = x.binder
334346 }
335347
336348 object RecursiveThis extends RecursiveThisExtractor {
@@ -348,7 +360,7 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
348360 }
349361
350362 def RecursiveTypeDeco (x : RecursiveType ): RecursiveTypeAPI = new RecursiveTypeAPI {
351-
363+ def underlying ( implicit ctx : Context ) : Type = x.underlying.stripTypeVar
352364 }
353365
354366 object RecursiveType extends RecursiveTypeExtractor {
@@ -366,7 +378,9 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
366378 }
367379
368380 def MethodTypeDeco (x : MethodType ): MethodTypeAPI = new MethodTypeAPI {
369-
381+ def paramNames (implicit ctx : Context ): List [String ] = x.paramNames.map(_.toString)
382+ def paramTypes (implicit ctx : Context ): List [Type ] = x.paramInfos
383+ def resType (implicit ctx : Context ): Type = x.resType
370384 }
371385
372386 object MethodType extends MethodTypeExtractor {
@@ -384,7 +398,9 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
384398 }
385399
386400 def PolyTypeDeco (x : PolyType ): PolyTypeAPI = new PolyTypeAPI {
387-
401+ def paramNames (implicit ctx : Contexts .Context ): List [String ] = x.paramNames.map(_.toString)
402+ def paramBounds (implicit ctx : Contexts .Context ): List [TypeBounds ] = x.paramInfos
403+ def resType (implicit ctx : Contexts .Context ): Type = x.resType
388404 }
389405
390406 object PolyType extends PolyTypeExtractor {
@@ -402,7 +418,9 @@ trait TypeOrBoundsOpsImpl extends scala.tasty.reflect.TypeOrBoundsOps with CoreI
402418 }
403419
404420 def TypeLambdaDeco (x : TypeLambda ): TypeLambdaAPI = new TypeLambdaAPI {
405-
421+ def paramNames (implicit ctx : Contexts .Context ): List [String ] = x.paramNames.map(_.toString)
422+ def paramBounds (implicit ctx : Contexts .Context ): List [TypeBounds ] = x.paramInfos
423+ def resType (implicit ctx : Contexts .Context ): Type = x.resType
406424 }
407425
408426 object TypeLambda extends TypeLambdaExtractor {
0 commit comments