@@ -1328,7 +1328,10 @@ object Types {
1328
1328
val funType = defn.FunctionOf (
1329
1329
formals1 mapConserve (_.underlyingIfRepeated(mt.isJavaMethod)),
1330
1330
mt.nonDependentResultApprox, mt.isImplicitMethod && ! ctx.erasedTypes)
1331
- if (mt.isDependent && ! mt.isImplicitMethod) RefinedType (funType, nme.apply, mt)
1331
+ if (mt.isDependent) {
1332
+ assert(! mt.isImplicitMethod)
1333
+ RefinedType (funType, nme.apply, mt)
1334
+ }
1332
1335
else funType
1333
1336
}
1334
1337
@@ -2590,7 +2593,7 @@ object Types {
2590
2593
def integrate (tparams : List [ParamInfo ], tp : Type )(implicit ctx : Context ): Type =
2591
2594
tparams match {
2592
2595
case LambdaParam (lam, _) :: _ => tp.subst(lam, this )
2593
- case tparams : List [Symbol @ unchecked] => tp.subst(tparams , paramRefs)
2596
+ case params : List [Symbol @ unchecked] => tp.subst(params , paramRefs)
2594
2597
}
2595
2598
2596
2599
final def derivedLambdaType (paramNames : List [ThisName ] = this .paramNames,
@@ -2697,7 +2700,7 @@ object Types {
2697
2700
* def f(x: C)(y: x.S) // dependencyStatus = TrueDeps
2698
2701
* def f(x: C)(y: x.T) // dependencyStatus = FalseDeps, i.e.
2699
2702
* // dependency can be eliminated by dealiasing.
2700
- */
2703
+ */
2701
2704
private def dependencyStatus (implicit ctx : Context ): DependencyStatus = {
2702
2705
if (myDependencyStatus != Unknown ) myDependencyStatus
2703
2706
else {
@@ -3220,8 +3223,10 @@ object Types {
3220
3223
case _ => false
3221
3224
}
3222
3225
3226
+ protected def kindString : String
3227
+
3223
3228
override def toString =
3224
- try s " ParamRef( $paramName) "
3229
+ try s " ${kindString} ParamRef( $paramName) "
3225
3230
catch {
3226
3231
case ex : IndexOutOfBoundsException => s " ParamRef(<bad index: $paramNum>) "
3227
3232
}
@@ -3230,8 +3235,9 @@ object Types {
3230
3235
/** Only created in `binder.paramRefs`. Use `binder.paramRefs(paramNum)` to
3231
3236
* refer to `TermParamRef(binder, paramNum)`.
3232
3237
*/
3233
- abstract case class TermParamRef (binder : TermLambda , paramNum : Int ) extends ParamRef {
3238
+ abstract case class TermParamRef (binder : TermLambda , paramNum : Int ) extends ParamRef with SingletonType {
3234
3239
type BT = TermLambda
3240
+ def kindString = " Term"
3235
3241
def copyBoundType (bt : BT ) = bt.paramRefs(paramNum)
3236
3242
}
3237
3243
@@ -3240,6 +3246,7 @@ object Types {
3240
3246
*/
3241
3247
abstract case class TypeParamRef (binder : TypeLambda , paramNum : Int ) extends ParamRef {
3242
3248
type BT = TypeLambda
3249
+ def kindString = " Type"
3243
3250
def copyBoundType (bt : BT ) = bt.paramRefs(paramNum)
3244
3251
3245
3252
/** Looking only at the structure of `bound`, is one of the following true?
0 commit comments