Skip to content

Commit 0241244

Browse files
committed
Fix method name and comment
1 parent 430d1f3 commit 0241244

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,8 @@ object ProtoTypes {
401401
/** Same as `constrained(tl, EmptyTree)`, but returns just the created type lambda */
402402
def constrained(tl: TypeLambda)(implicit ctx: Context): TypeLambda = constrained(tl, EmptyTree)._1
403403

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 = {
406406
val poly = PolyType(DepParamName.fresh().toTypeName :: Nil)(
407407
pt => TypeBounds.upper(AndType(tp, defn.SingletonType)) :: Nil,
408408
pt => defn.AnyType)
@@ -416,7 +416,7 @@ object ProtoTypes {
416416
def resultTypeApprox(mt: MethodType)(implicit ctx: Context): Type =
417417
if (mt.isDependent) {
418418
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)
420420
mt.resultType.substParams(mt, mt.paramInfos.map(replacement))
421421
}
422422
else mt.resultType

0 commit comments

Comments
 (0)