File tree 1 file changed +3
-3
lines changed
compiler/src/dotty/tools/dotc/typer
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -401,8 +401,8 @@ object ProtoTypes {
401
401
/** Same as `constrained(tl, EmptyTree)`, but returns just the created type lambda */
402
402
def constrained (tl : TypeLambda )(implicit ctx : Context ): TypeLambda = constrained(tl, EmptyTree )._1
403
403
404
- /** Create a new TypeParamRef that represents a dependent method parameter singleton */
405
- def newDepTypeParamRef (tp : Type )(implicit ctx : Context ): TypeVar = {
404
+ /** Create a new TypeVar that represents a dependent method parameter singleton */
405
+ def newDepTypeVar (tp : Type )(implicit ctx : Context ): TypeVar = {
406
406
val poly = PolyType (DepParamName .fresh().toTypeName :: Nil )(
407
407
pt => TypeBounds .upper(AndType (tp, defn.SingletonType )) :: Nil ,
408
408
pt => defn.AnyType )
@@ -416,7 +416,7 @@ object ProtoTypes {
416
416
def resultTypeApprox (mt : MethodType )(implicit ctx : Context ): Type =
417
417
if (mt.isDependent) {
418
418
def replacement (tp : Type ) =
419
- if (ctx.mode.is(Mode .TypevarsMissContext )) WildcardType else newDepTypeParamRef (tp)
419
+ if (ctx.mode.is(Mode .TypevarsMissContext )) WildcardType else newDepTypeVar (tp)
420
420
mt.resultType.substParams(mt, mt.paramInfos.map(replacement))
421
421
}
422
422
else mt.resultType
You can’t perform that action at this time.
0 commit comments