@@ -1328,7 +1328,10 @@ object Types {
13281328 val funType = defn.FunctionOf (
13291329 formals1 mapConserve (_.underlyingIfRepeated(mt.isJavaMethod)),
13301330 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+ }
13321335 else funType
13331336 }
13341337
@@ -2590,7 +2593,7 @@ object Types {
25902593 def integrate (tparams : List [ParamInfo ], tp : Type )(implicit ctx : Context ): Type =
25912594 tparams match {
25922595 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)
25942597 }
25952598
25962599 final def derivedLambdaType (paramNames : List [ThisName ] = this .paramNames,
@@ -2697,7 +2700,7 @@ object Types {
26972700 * def f(x: C)(y: x.S) // dependencyStatus = TrueDeps
26982701 * def f(x: C)(y: x.T) // dependencyStatus = FalseDeps, i.e.
26992702 * // dependency can be eliminated by dealiasing.
2700- */
2703+ */
27012704 private def dependencyStatus (implicit ctx : Context ): DependencyStatus = {
27022705 if (myDependencyStatus != Unknown ) myDependencyStatus
27032706 else {
@@ -3220,8 +3223,10 @@ object Types {
32203223 case _ => false
32213224 }
32223225
3226+ protected def kindString : String
3227+
32233228 override def toString =
3224- try s " ParamRef( $paramName) "
3229+ try s " ${kindString} ParamRef( $paramName) "
32253230 catch {
32263231 case ex : IndexOutOfBoundsException => s " ParamRef(<bad index: $paramNum>) "
32273232 }
@@ -3230,8 +3235,9 @@ object Types {
32303235 /** Only created in `binder.paramRefs`. Use `binder.paramRefs(paramNum)` to
32313236 * refer to `TermParamRef(binder, paramNum)`.
32323237 */
3233- abstract case class TermParamRef (binder : TermLambda , paramNum : Int ) extends ParamRef {
3238+ abstract case class TermParamRef (binder : TermLambda , paramNum : Int ) extends ParamRef with SingletonType {
32343239 type BT = TermLambda
3240+ def kindString = " Term"
32353241 def copyBoundType (bt : BT ) = bt.paramRefs(paramNum)
32363242 }
32373243
@@ -3240,6 +3246,7 @@ object Types {
32403246 */
32413247 abstract case class TypeParamRef (binder : TypeLambda , paramNum : Int ) extends ParamRef {
32423248 type BT = TypeLambda
3249+ def kindString = " Type"
32433250 def copyBoundType (bt : BT ) = bt.paramRefs(paramNum)
32443251
32453252 /** Looking only at the structure of `bound`, is one of the following true?
0 commit comments