@@ -1450,21 +1450,21 @@ open class KotlinUsesExtractor(
1450
1450
1451
1451
fun getTypeParameterParentLabel (param : IrTypeParameter ) =
1452
1452
param.parent.let {
1453
- (it as ? IrFunction )?.let { fn ->
1454
- if (this is KotlinFileExtractor )
1455
- this .declarationStack.findOverriddenAttributes(fn)?.takeUnless {
1456
- // When extracting the `static fun f$default(...)` that accompanies `fun <T> f(val x: T? = defaultExpr, ...)`,
1457
- // `f$default` has no type parameters, and so there is no `f$default::T` to refer to.
1458
- // We have no good way to extract references to `T` in `defaultExpr`, so we just fall back on describing it
1459
- // in terms of `f::T`, even though that type variable ought to be out of scope here.
1460
- attribs -> attribs.typeParameters?.isEmpty() == true
1461
- }?.id
1462
- else
1463
- null
1464
- } ? :
1465
1453
when (it) {
1466
1454
is IrClass -> useClassSource(it)
1467
- is IrFunction -> useFunction(it, noReplace = true )
1455
+ is IrFunction ->
1456
+ (if (this is KotlinFileExtractor )
1457
+ this .declarationStack.findOverriddenAttributes(it)?.takeUnless {
1458
+ // When extracting the `static fun f$default(...)` that accompanies `fun <T> f(val x: T? = defaultExpr, ...)`,
1459
+ // `f$default` has no type parameters, and so there is no `f$default::T` to refer to.
1460
+ // We have no good way to extract references to `T` in `defaultExpr`, so we just fall back on describing it
1461
+ // in terms of `f::T`, even though that type variable ought to be out of scope here.
1462
+ attribs -> attribs.typeParameters?.isEmpty() == true
1463
+ }?.id
1464
+ else
1465
+ null
1466
+ ) ? :
1467
+ useFunction(it, noReplace = true )
1468
1468
else -> { logger.error(" Unexpected type parameter parent $it " ); null }
1469
1469
}
1470
1470
}
0 commit comments