diff options
Diffstat (limited to 'compiler/src/dotty/tools/dotc/transform')
-rw-r--r-- | compiler/src/dotty/tools/dotc/transform/FullParameterization.scala | 2 | ||||
-rw-r--r-- | compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala b/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala index cdc28b23f..7fb9ba302 100644 --- a/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala +++ b/compiler/src/dotty/tools/dotc/transform/FullParameterization.scala @@ -107,7 +107,7 @@ trait FullParameterization { val firstArgType = if (liftThisType) thisParamType & clazz.thisType else thisParamType MethodType(nme.SELF :: Nil)( mt => firstArgType :: Nil, - mt => mapClassParams(origResult).substThisUnlessStatic(clazz, MethodParam(mt, 0))) + mt => mapClassParams(origResult).substThisUnlessStatic(clazz, mt.newParamRef(0))) } /** Replace class type parameters by the added type parameters of the polytype `pt` */ diff --git a/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala b/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala index 3c11827fc..8907cc4dd 100644 --- a/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala +++ b/compiler/src/dotty/tools/dotc/transform/SuperAccessors.scala @@ -180,7 +180,7 @@ class SuperAccessors(thisTransformer: DenotTransformer) { case tpe: PolyType => tpe.derivedPolyType(tpe.paramNames, tpe.paramBounds, accTypeOf(tpe.resultType)) case _ => - MethodType(receiverType :: Nil)(mt => tpe.substThis(sym.owner.asClass, MethodParam(mt, 0))) + MethodType(receiverType :: Nil)(mt => tpe.substThis(sym.owner.asClass, mt.newParamRef(0))) } accTypeOf(sym.info) } @@ -232,7 +232,7 @@ class SuperAccessors(thisTransformer: DenotTransformer) { case tpe: PolyType => tpe.derivedPolyType(tpe.paramNames, tpe.paramBounds, accTypeOf(tpe.resultType)) case _ => - MethodType(receiverType :: Nil)(mt => tpe.substThis(sym.owner.asClass, MethodParam(mt, 0))) + MethodType(receiverType :: Nil)(mt => tpe.substThis(sym.owner.asClass, mt.newParamRef(0))) } val accType = accTypeOf(sym.info) val protectedAccessor = clazz.info.decl(accName).suchThat(_.signature == accType.signature).symbol orElse { |