@@ -3680,7 +3680,7 @@ object Types {
36803680 trait LambdaType extends BindingType with TermType { self =>
36813681 type ThisName <: Name
36823682 type PInfo <: Type
3683- type This <: LambdaType {type PInfo = self.PInfo }
3683+ type This >: this . type <: LambdaType {type PInfo = self.PInfo }
36843684 type ParamRefType <: ParamRef
36853685
36863686 def paramNames : List [ThisName ]
@@ -3738,7 +3738,7 @@ object Types {
37383738
37393739 final def derivedLambdaType (paramNames : List [ThisName ] = this .paramNames,
37403740 paramInfos : List [PInfo ] = this .paramInfos,
3741- resType : Type = this .resType)(using Context ): LambdaType =
3741+ resType : Type = this .resType)(using Context ): This =
37423742 if ((paramNames eq this .paramNames) && (paramInfos eq this .paramInfos) && (resType eq this .resType)) this
37433743 else newLikeThis(paramNames, paramInfos, resType)
37443744
@@ -3857,7 +3857,7 @@ object Types {
38573857 import DepStatus ._
38583858 type ThisName = TermName
38593859 type PInfo = Type
3860- type This <: TermLambda
3860+ type This >: this . type <: TermLambda
38613861 type ParamRefType = TermParamRef
38623862
38633863 override def resultType (using Context ): Type =
@@ -4154,7 +4154,7 @@ object Types {
41544154 trait TypeLambda extends LambdaType {
41554155 type ThisName = TypeName
41564156 type PInfo = TypeBounds
4157- type This <: TypeLambda
4157+ type This >: this . type <: TypeLambda
41584158 type ParamRefType = TypeParamRef
41594159
41604160 def isResultDependent (using Context ): Boolean = true
0 commit comments