diff --git a/compiler/src/dotty/tools/dotc/core/Types.scala b/compiler/src/dotty/tools/dotc/core/Types.scala index 4198c0a49797..24acce54cc4b 100644 --- a/compiler/src/dotty/tools/dotc/core/Types.scala +++ b/compiler/src/dotty/tools/dotc/core/Types.scala @@ -3014,7 +3014,7 @@ object Types { private[Types] var opened: Boolean = false private[Types] var openedTwice: Boolean = false - val parent: Type = parentExp(this) + val parent: Type = parentExp(this: @unchecked) private var myRecThis: RecThis | Null = null @@ -3705,8 +3705,8 @@ object Types { type This = MethodType - val paramInfos: List[Type] = paramInfosExp(this) - val resType: Type = resultTypeExp(this) + val paramInfos: List[Type] = paramInfosExp(this: @unchecked) + val resType: Type = resultTypeExp(this: @unchecked) assert(resType.exists) def companion: MethodTypeCompanion @@ -3879,8 +3879,8 @@ object Types { type This = HKTypeLambda def companion: HKTypeLambda.type = HKTypeLambda - val paramInfos: List[TypeBounds] = paramInfosExp(this) - val resType: Type = resultTypeExp(this) + val paramInfos: List[TypeBounds] = paramInfosExp(this: @unchecked) + val resType: Type = resultTypeExp(this: @unchecked) private def setVariances(tparams: List[LambdaParam], vs: List[Variance]): Unit = if tparams.nonEmpty then @@ -3948,8 +3948,8 @@ object Types { type This = PolyType def companion: PolyType.type = PolyType - val paramInfos: List[TypeBounds] = paramInfosExp(this) - val resType: Type = resultTypeExp(this) + val paramInfos: List[TypeBounds] = paramInfosExp(this: @unchecked) + val resType: Type = resultTypeExp(this: @unchecked) assert(resType.isInstanceOf[TermType], this) assert(paramNames.nonEmpty)