@@ -759,12 +759,14 @@ class TastyImpl(val rootContext: Contexts.Context) extends scala.tasty.Tasty { s
759
759
type LambdaType [ParamInfo <: TypeOrBounds ] = Types .LambdaType { type PInfo = ParamInfo }
760
760
type MethodType = Types .MethodType
761
761
type PolyType = Types .PolyType
762
+ type TermLambda = Types .TermLambda
762
763
type TypeLambda = Types .TypeLambda
763
764
764
765
def typeClassTag : ClassTag [Type ] = implicitly[ClassTag [Type ]]
765
766
def recursiveTypeClassTag : ClassTag [RecursiveType ] = implicitly[ClassTag [RecursiveType ]]
766
767
def methodTypeClassTag : ClassTag [MethodType ] = implicitly[ClassTag [MethodType ]]
767
768
def polyTypeClassTag : ClassTag [PolyType ] = implicitly[ClassTag [PolyType ]]
769
+ def termLambdaClassTag : ClassTag [TermLambda ] = implicitly[ClassTag [TermLambda ]]
768
770
def typeLambdaClassTag : ClassTag [TypeLambda ] = implicitly[ClassTag [TypeLambda ]]
769
771
770
772
def MethodTypeDeco (tpe : MethodType ): MethodTypeAPI = new MethodTypeAPI {
@@ -781,6 +783,12 @@ class TastyImpl(val rootContext: Contexts.Context) extends scala.tasty.Tasty { s
781
783
def resultTpe (implicit ctx : Context ): Type = tpe.resType
782
784
}
783
785
786
+ def TermLambdaDeco (tpe : Types .TermLambda ): TermLambdaAPI = new TermLambdaAPI {
787
+ def paramNames (implicit ctx : Context ): List [String ] = tpe.paramNames.map(_.toString)
788
+ def paramTypes (implicit ctx : Context ): List [Type ] = tpe.paramInfos
789
+ def resultTpe (implicit ctx : Context ): Type = tpe.resType
790
+ }
791
+
784
792
def TypeLambdaDeco (tpe : Types .TypeLambda ): TypeLambdaAPI = new TypeLambdaAPI {
785
793
def paramNames (implicit ctx : Context ): List [String ] = tpe.paramNames.map(_.toString)
786
794
def paramTypes (implicit ctx : Context ): List [TypeBounds ] = tpe.paramInfos
@@ -928,6 +936,13 @@ class TastyImpl(val rootContext: Contexts.Context) extends scala.tasty.Tasty { s
928
936
}
929
937
}
930
938
939
+ object TermLambda extends TermLambdaExtractor {
940
+ def unapply (x : TermLambda )(implicit ctx : Context ): Option [(List [String ], List [Type ], Type )] = x match {
941
+ case x : TermLambda => Some (x.paramNames.map(_.toString), x.paramInfos, x.resType)
942
+ case _ => None
943
+ }
944
+ }
945
+
931
946
object TypeLambda extends TypeLambdaExtractor {
932
947
def unapply (x : TypeLambda )(implicit ctx : Context ): Option [(List [String ], List [TypeBounds ], Type )] = x match {
933
948
case x : TypeLambda => Some (x.paramNames.map(_.toString), x.paramInfos, x.resType)
0 commit comments