Skip to content

Commit 599ec22

Browse files
Merge pull request #10548 from dotty-staging/remove-reflect-lambda-type
Remove reflect.LambdaType
2 parents 288cb89 + cd827b0 commit 599ec22

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

library/src/scala/quoted/Quotes.scala

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,9 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
152152
* +- ThisType
153153
* +- RecursiveThis
154154
* +- RecursiveType
155-
* +- LambdaType -+- MethodType
156-
* | +- PolyType
157-
* | +- TypeLambda
155+
* +- MethodType
156+
* +- PolyType
157+
* +- TypeLambda
158158
* +- TypeBounds
159159
* +- NoPrefix
160160
*
@@ -2847,7 +2847,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
28472847

28482848
/** Methods of the module object `val ParamRef` */
28492849
trait ParamRefModule { this: ParamRef.type =>
2850-
def unapply(x: ParamRef): Option[(LambdaType, Int)]
2850+
def unapply(x: ParamRef): Option[(TypeRepr, Int)]
28512851
}
28522852

28532853
/** Makes extension methods on `ParamRef` available without any imports */
@@ -2859,7 +2859,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
28592859
/** Extension methods of `ParamRef` */
28602860
trait ParamRefMethods:
28612861
extension (self: ParamRef):
2862-
def binder: LambdaType
2862+
def binder: TypeRepr
28632863
def paramNum: Int
28642864
end extension
28652865
end ParamRefMethods
@@ -2966,12 +2966,8 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
29662966
end extension
29672967
end RecursiveTypeMethods
29682968

2969-
// TODO: remove LambdaType and use union types (MethodType | PolyType | TypeLambda)
2970-
/** Common abstraction for lambda types (MethodType, PolyType and TypeLambda). */
2971-
type LambdaType <: TypeRepr
2972-
29732969
/** Type of the definition of a method taking a single list of parameters. It's return type may be a MethodType. */
2974-
type MethodType <: LambdaType
2970+
type MethodType <: TypeRepr
29752971

29762972
/** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `MethodType` */
29772973
given MethodTypeTypeTest as TypeTest[TypeRepr, MethodType] = MethodTypeTypeTestImpl
@@ -3007,7 +3003,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
30073003
end MethodTypeMethods
30083004

30093005
/** Type of the definition of a method taking a list of type parameters. It's return type may be a MethodType. */
3010-
type PolyType <: LambdaType
3006+
type PolyType <: TypeRepr
30113007

30123008
/** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `PolyType` */
30133009
given PolyTypeTypeTest as TypeTest[TypeRepr, PolyType] = PolyTypeTypeTestImpl
@@ -3041,7 +3037,7 @@ trait Quotes { self: runtime.QuoteUnpickler & runtime.QuoteMatching =>
30413037
end PolyTypeMethods
30423038

30433039
/** Type of the definition of a type lambda taking a list of type parameters. It's return type may be a TypeLambda. */
3044-
type TypeLambda <: LambdaType
3040+
type TypeLambda <: TypeRepr
30453041

30463042
/** `TypeTest` that allows testing at runtime in a pattern match if a `TypeRepr` is a `TypeLambda` */
30473043
given TypeLambdaTypeTest as TypeTest[TypeRepr, TypeLambda] = TypeLambdaTypeTestImpl

0 commit comments

Comments
 (0)