@@ -497,17 +497,17 @@ open class KotlinFileExtractor(
497
497
else
498
498
null
499
499
} ? : vp.type
500
+ val substitutedType = typeSubstitution?.let { it(maybeErasedType, TypeContext .OTHER , pluginContext) } ? : maybeErasedType
500
501
val id = useValueParameter(vp, parent)
501
502
if (extractTypeAccess) {
502
- extractTypeAccessRecursive(typeSubstitution?. let { it(maybeErasedType, TypeContext . OTHER , pluginContext) } ? : maybeErasedType , location, id, - 1 )
503
+ extractTypeAccessRecursive(substitutedType , location, id, - 1 )
503
504
}
504
- return extractValueParameter(id, maybeErasedType , vp.name.asString(), location, parent, idx, typeSubstitution , useValueParameter(vp, parentSourceDeclaration), vp.isVararg)
505
+ return extractValueParameter(id, substitutedType , vp.name.asString(), location, parent, idx, useValueParameter(vp, parentSourceDeclaration), vp.isVararg)
505
506
}
506
507
}
507
508
508
- private fun extractValueParameter (id : Label <out DbParam >, t : IrType , name : String , locId : Label <DbLocation >, parent : Label <out DbCallable >, idx : Int , typeSubstitution : TypeSubstitution ? , paramSourceDeclaration : Label <out DbParam >, isVararg : Boolean ): TypeResults {
509
- val substitutedType = typeSubstitution?.let { it(t, TypeContext .OTHER , pluginContext) } ? : t
510
- val type = useType(substitutedType)
509
+ private fun extractValueParameter (id : Label <out DbParam >, t : IrType , name : String , locId : Label <DbLocation >, parent : Label <out DbCallable >, idx : Int , paramSourceDeclaration : Label <out DbParam >, isVararg : Boolean ): TypeResults {
510
+ val type = useType(t)
511
511
tw.writeParams(id, type.javaResult.id, idx, parent, paramSourceDeclaration)
512
512
tw.writeParamsKotlinType(id, type.kotlinResult.id)
513
513
tw.writeHasLocation(id, locId)
@@ -2930,7 +2930,7 @@ open class KotlinFileExtractor(
2930
2930
stmtIdx : Int
2931
2931
) {
2932
2932
val paramId = tw.getFreshIdLabel<DbParam >()
2933
- val paramTypeRes = extractValueParameter(paramId, paramType, paramName, locId, ids.constructor , paramIdx, null , paramId, false )
2933
+ val paramTypeRes = extractValueParameter(paramId, paramType, paramName, locId, ids.constructor , paramIdx, paramId, false )
2934
2934
2935
2935
val assignmentStmtId = tw.getFreshIdLabel<DbExprstmt >()
2936
2936
tw.writeStmts_exprstmt(assignmentStmtId, ids.constructorBlock, stmtIdx, ids.constructor )
@@ -3566,7 +3566,7 @@ open class KotlinFileExtractor(
3566
3566
3567
3567
val parameters = parameterTypes.mapIndexed { idx, p ->
3568
3568
val paramId = tw.getFreshIdLabel<DbParam >()
3569
- val paramType = extractValueParameter(paramId, p, " a$idx " , locId, methodId, idx, null , paramId, false )
3569
+ val paramType = extractValueParameter(paramId, p, " a$idx " , locId, methodId, idx, paramId, false )
3570
3570
3571
3571
Pair (paramId, paramType)
3572
3572
}
0 commit comments