@@ -152,11 +152,11 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
152152 case _ => None
153153 }
154154
155- def TypeDef_rhs (self : TypeDef )(implicit ctx : Context ): TypeOrBoundsTree = self.rhs
155+ def TypeDef_rhs (self : TypeDef )(implicit ctx : Context ): Tree /* TypeTree | TypeBoundsTree */ = self.rhs
156156 def TypeDef_symbol (self : TypeDef )(implicit ctx : Context ): TypeSymbol = self.symbol.asType
157157
158158 def TypeDef_apply (symbol : TypeSymbol )(implicit ctx : Context ): TypeDef = withDefaultPos(ctx => tpd.TypeDef (symbol)(ctx))
159- def TypeDef_copy (original : TypeDef )(name : String , rhs : TypeOrBoundsTree )(implicit ctx : Context ): TypeDef =
159+ def TypeDef_copy (original : TypeDef )(name : String , rhs : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): TypeDef =
160160 tpd.cpy.TypeDef (original)(name.toTypeName, rhs)
161161
162162 type DefDef = tpd.DefDef
@@ -594,13 +594,9 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
594594 def While_copy (original : Tree )(cond : Term , body : Term )(implicit ctx : Context ): While =
595595 tpd.cpy.WhileDo (original)(cond, body)
596596
597- type TypeOrBoundsTree = tpd.Tree
598-
599- def TypeOrBoundsTree_tpe (self : TypeOrBoundsTree )(implicit ctx : Context ): Type = self.tpe.stripTypeVar
600-
601597 type TypeTree = tpd.Tree
602598
603- def matchTypeTree (x : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree ] = x match {
599+ def matchTypeTree (x : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree ] = x match {
604600 case x : tpd.TypeBoundsTree => None
605601 case _ => if (x.isType) Some (x) else None
606602 }
@@ -611,7 +607,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
611607
612608 type TypeTree_Inferred = tpd.TypeTree
613609
614- def matchTypeTree_Inferred (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_Inferred ] = tpt match {
610+ def matchTypeTree_Inferred (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_Inferred ] = tpt match {
615611 case tpt : tpd.TypeTree if ! tpt.tpe.isInstanceOf [Types .TypeBounds ] => Some (tpt)
616612 case _ => None
617613 }
@@ -620,7 +616,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
620616
621617 type TypeTree_Ident = tpd.Ident
622618
623- def matchTypeTree_Ident (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_Ident ] = tpt match {
619+ def matchTypeTree_Ident (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_Ident ] = tpt match {
624620 case tpt : tpd.Ident if tpt.isType => Some (tpt)
625621 case _ => None
626622 }
@@ -632,7 +628,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
632628
633629 type TypeTree_Select = tpd.Select
634630
635- def matchTypeTree_Select (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_Select ] = tpt match {
631+ def matchTypeTree_Select (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_Select ] = tpt match {
636632 case tpt : tpd.Select if tpt.isType && tpt.qualifier.isTerm => Some (tpt)
637633 case _ => None
638634 }
@@ -649,7 +645,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
649645
650646 type TypeTree_Projection = tpd.Select
651647
652- def matchTypeTree_Projection (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_Projection ] = tpt match {
648+ def matchTypeTree_Projection (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_Projection ] = tpt match {
653649 case tpt : tpd.Select if tpt.isType && tpt.qualifier.isType => Some (tpt)
654650 case _ => None
655651 }
@@ -662,7 +658,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
662658
663659 type TypeTree_Singleton = tpd.SingletonTypeTree
664660
665- def matchTypeTree_Singleton (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_Singleton ] = tpt match {
661+ def matchTypeTree_Singleton (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_Singleton ] = tpt match {
666662 case tpt : tpd.SingletonTypeTree => Some (tpt)
667663 case _ => None
668664 }
@@ -677,7 +673,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
677673
678674 type TypeTree_Refined = tpd.RefinedTypeTree
679675
680- def matchTypeTree_Refined (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_Refined ] = tpt match {
676+ def matchTypeTree_Refined (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_Refined ] = tpt match {
681677 case tpt : tpd.RefinedTypeTree => Some (tpt)
682678 case _ => None
683679 }
@@ -690,23 +686,23 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
690686
691687 type TypeTree_Applied = tpd.AppliedTypeTree
692688
693- def matchTypeTree_Applied (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_Applied ] = tpt match {
689+ def matchTypeTree_Applied (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_Applied ] = tpt match {
694690 case tpt : tpd.AppliedTypeTree => Some (tpt)
695691 case _ => None
696692 }
697693
698694 def TypeTree_Applied_tpt (self : TypeTree_Applied )(implicit ctx : Context ): TypeTree = self.tpt
699- def TypeTree_Applied_args (self : TypeTree_Applied )(implicit ctx : Context ): List [TypeOrBoundsTree ] = self.args
695+ def TypeTree_Applied_args (self : TypeTree_Applied )(implicit ctx : Context ): List [Tree /* TypeTree | TypeBoundsTree */ ] = self.args
700696
701- def TypeTree_Applied_apply (tpt : TypeTree , args : List [TypeOrBoundsTree ])(implicit ctx : Context ): TypeTree_Applied =
697+ def TypeTree_Applied_apply (tpt : TypeTree , args : List [Tree /* TypeTree | TypeBoundsTree */ ])(implicit ctx : Context ): TypeTree_Applied =
702698 withDefaultPos(ctx => tpd.AppliedTypeTree (tpt, args)(ctx))
703699
704- def TypeTree_Applied_copy (original : TypeTree_Applied )(tpt : TypeTree , args : List [TypeOrBoundsTree ])(implicit ctx : Context ): TypeTree_Applied =
700+ def TypeTree_Applied_copy (original : TypeTree_Applied )(tpt : TypeTree , args : List [Tree /* TypeTree | TypeBoundsTree */ ])(implicit ctx : Context ): TypeTree_Applied =
705701 tpd.cpy.AppliedTypeTree (original)(tpt, args)
706702
707703 type TypeTree_Annotated = tpd.Annotated
708704
709- def matchTypeTree_Annotated (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_Annotated ] = tpt match {
705+ def matchTypeTree_Annotated (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_Annotated ] = tpt match {
710706 case tpt : tpd.Annotated => Some (tpt)
711707 case _ => None
712708 }
@@ -722,7 +718,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
722718
723719 type TypeTree_MatchType = tpd.MatchTypeTree
724720
725- def matchTypeTree_MatchType (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_MatchType ] = tpt match {
721+ def matchTypeTree_MatchType (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_MatchType ] = tpt match {
726722 case tpt : tpd.MatchTypeTree => Some (tpt)
727723 case _ => None
728724 }
@@ -739,7 +735,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
739735
740736 type TypeTree_ByName = tpd.ByNameTypeTree
741737
742- def matchTypeTree_ByName (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_ByName ] = tpt match {
738+ def matchTypeTree_ByName (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_ByName ] = tpt match {
743739 case tpt : tpd.ByNameTypeTree => Some (tpt)
744740 case _ => None
745741 }
@@ -754,36 +750,36 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
754750
755751 type TypeTree_LambdaTypeTree = tpd.LambdaTypeTree
756752
757- def matchTypeTree_LambdaTypeTree (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_LambdaTypeTree ] = tpt match {
753+ def matchTypeTree_LambdaTypeTree (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_LambdaTypeTree ] = tpt match {
758754 case tpt : tpd.LambdaTypeTree => Some (tpt)
759755 case _ => None
760756 }
761757
762758 def TypeTree_LambdaTypeTree_tparams (self : TypeTree_LambdaTypeTree )(implicit ctx : Context ): List [TypeDef ] = self.tparams
763- def TypeTree_LambdaTypeTree_body (self : TypeTree_LambdaTypeTree )(implicit ctx : Context ): TypeOrBoundsTree = self.body
759+ def TypeTree_LambdaTypeTree_body (self : TypeTree_LambdaTypeTree )(implicit ctx : Context ): Tree /* TypeTree | TypeBoundsTree */ = self.body
764760
765- def TypeTree_LambdaTypeTree_apply (tparams : List [TypeDef ], body : TypeOrBoundsTree )(implicit ctx : Context ): TypeTree_LambdaTypeTree =
761+ def TypeTree_LambdaTypeTree_apply (tparams : List [TypeDef ], body : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): TypeTree_LambdaTypeTree =
766762 withDefaultPos(ctx => tpd.LambdaTypeTree (tparams, body)(ctx))
767763
768- def TypeTree_LambdaTypeTree_copy (original : TypeTree_LambdaTypeTree )(tparams : List [TypeDef ], body : TypeOrBoundsTree )(implicit ctx : Context ): TypeTree_LambdaTypeTree =
764+ def TypeTree_LambdaTypeTree_copy (original : TypeTree_LambdaTypeTree )(tparams : List [TypeDef ], body : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): TypeTree_LambdaTypeTree =
769765 tpd.cpy.LambdaTypeTree (original)(tparams, body)
770766
771767 type TypeTree_TypeBind = tpd.Bind
772768
773- def matchTypeTree_TypeBind (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_TypeBind ] = tpt match {
769+ def matchTypeTree_TypeBind (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_TypeBind ] = tpt match {
774770 case tpt : tpd.Bind if tpt.name.isTypeName => Some (tpt)
775771 case _ => None
776772 }
777773
778774 def TypeTree_TypeBind_name (self : TypeTree_TypeBind )(implicit ctx : Context ): String = self.name.toString
779- def TypeTree_TypeBind_body (self : TypeTree_TypeBind )(implicit ctx : Context ): TypeOrBoundsTree = self.body
775+ def TypeTree_TypeBind_body (self : TypeTree_TypeBind )(implicit ctx : Context ): Tree /* TypeTree | TypeBoundsTree */ = self.body
780776
781- def TypeTree_TypeBind_copy (original : TypeTree_TypeBind )(name : String , tpt : TypeOrBoundsTree )(implicit ctx : Context ): TypeTree_TypeBind =
777+ def TypeTree_TypeBind_copy (original : TypeTree_TypeBind )(name : String , tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): TypeTree_TypeBind =
782778 tpd.cpy.Bind (original)(name.toTypeName, tpt)
783779
784780 type TypeTree_TypeBlock = tpd.Block
785781
786- def matchTypeTree_TypeBlock (tpt : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeTree_TypeBlock ] = tpt match {
782+ def matchTypeTree_TypeBlock (tpt : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeTree_TypeBlock ] = tpt match {
787783 case tpt : tpd.Block => Some (tpt)
788784 case _ => None
789785 }
@@ -799,7 +795,7 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
799795
800796 type TypeBoundsTree = tpd.TypeBoundsTree
801797
802- def matchTypeBoundsTree (x : TypeOrBoundsTree )(implicit ctx : Context ): Option [TypeBoundsTree ] = x match {
798+ def matchTypeBoundsTree (x : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [TypeBoundsTree ] = x match {
803799 case x : tpd.TypeBoundsTree => Some (x)
804800 case x @ Trees .TypeTree () =>
805801 // TODO only enums generate this kind of type bounds. Is this possible without enums? If not generate tpd.TypeBoundsTree for enums instead
@@ -817,11 +813,13 @@ class KernelImpl(val rootContext: core.Contexts.Context, val rootPosition: util.
817813
818814 type WildcardTypeTree = tpd.Ident
819815
820- def matchWildcardTypeTree (x : TypeOrBoundsTree )(implicit ctx : Context ): Option [WildcardTypeTree ] = x match {
816+ def matchWildcardTypeTree (x : Tree /* TypeTree | TypeBoundsTree */ )(implicit ctx : Context ): Option [WildcardTypeTree ] = x match {
821817 case x @ Trees .Ident (nme.WILDCARD ) => Some (x)
822818 case _ => None
823819 }
824820
821+ def WildcardTypeTree_tpe (self : WildcardTypeTree )(implicit ctx : Context ): TypeOrBounds = self.tpe.stripTypeVar
822+
825823 //
826824 // CASES
827825 //
0 commit comments