Skip to content

Commit c49ab8f

Browse files
committed
Fixes after rebase.
1 parent 78dfc7a commit c49ab8f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,8 @@ class Definitions {
971971
val any = enterCompleteClassSymbol(cls, tpnme.Any, Protected | Final | NoInitsTrait, Nil)
972972
val nothing = enterCompleteClassSymbol(cls, tpnme.Nothing, Protected | Final | NoInitsTrait, List(any.typeRef))
973973

974-
val tparamNames = tpnme.syntheticTypeParamNames(1)
975-
val ptype = PolyType(tparamNames, List(0))(_ => TypeBounds(nothing.typeRef, any.typeRef) :: Nil, PolyParam(_, 0))
974+
val tparamNames = List("P".toTypeName)
975+
val ptype = PolyType(tparamNames)(_ => TypeBounds(nothing.typeRef, any.typeRef) :: Nil, TypeParamRef(_, 0))
976976
newSymbol(cls, nme.assume_, Protected | Final | Method, ptype).entered
977977

978978
cls

compiler/src/dotty/tools/dotc/transform/phantom/PhantomTypeErasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class PhantomTypeErasure extends MiniPhaseTransform with InfoTransformer {
4545
case tp: MethodType if tp.resultType.isPhantom =>
4646
// Erase return type to Object to match FunctionN erased return type
4747
val methodType = if (tp.isImplicit) ImplicitMethodType else MethodType
48-
methodType(tp.paramNames, tp.paramTypes, defn.ObjectType)
48+
methodType(tp.paramNames, tp.paramInfos, defn.ObjectType)
4949
case _ => mapOver(tp)
5050
}
5151
}

0 commit comments

Comments
 (0)