@@ -2588,11 +2588,6 @@ object Types {
2588
2588
case _ => false
2589
2589
}
2590
2590
2591
- /** Is this polytype a higher-kinded type lambda as opposed to a polymorphic?
2592
- * method type? Only type lambdas get created with variances, that's how we can tell.
2593
- */
2594
- def isTypeLambda : Boolean = variances.nonEmpty
2595
-
2596
2591
/** PolyParam references to all type parameters of this type */
2597
2592
lazy val paramRefs : List [PolyParam ] = paramNames.indices.toList.map(PolyParam (this , _))
2598
2593
@@ -2969,20 +2964,8 @@ object Types {
2969
2964
* instantiation can be a singleton type only if the upper bound
2970
2965
* is also a singleton type.
2971
2966
*/
2972
- def instantiate (fromBelow : Boolean )(implicit ctx : Context ): Type = {
2973
- val inst = ctx.typeComparer.instanceType(origin, fromBelow)
2974
- if (ctx.typerState.isGlobalCommittable)
2975
- inst match {
2976
- case inst : PolyParam =>
2977
- assert(inst.binder.isTypeLambda, i " bad inst $this := $inst, constr = ${ctx.typerState.constraint}" )
2978
- // If this fails, you might want to turn on Config.debugCheckConstraintsClosed
2979
- // to help find the root of the problem.
2980
- // Note: Parameters of type lambdas are excluded from the assertion because
2981
- // they might arise from ill-kinded code. See #1652
2982
- case _ =>
2983
- }
2984
- instantiateWith(inst)
2985
- }
2967
+ def instantiate (fromBelow : Boolean )(implicit ctx : Context ): Type =
2968
+ instantiateWith(ctx.typeComparer.instanceType(origin, fromBelow))
2986
2969
2987
2970
/** Unwrap to instance (if instantiated) or origin (if not), until result
2988
2971
* is no longer a TypeVar
0 commit comments