@@ -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)
@@ -2931,7 +2931,7 @@ open class KotlinFileExtractor(
2931
2931
stmtIdx : Int
2932
2932
) {
2933
2933
val paramId = tw.getFreshIdLabel<DbParam >()
2934
- val paramTypeRes = extractValueParameter(paramId, paramType, paramName, locId, ids.constructor , paramIdx, null , paramId, false )
2934
+ val paramTypeRes = extractValueParameter(paramId, paramType, paramName, locId, ids.constructor , paramIdx, paramId, false )
2935
2935
2936
2936
val assignmentStmtId = tw.getFreshIdLabel<DbExprstmt >()
2937
2937
tw.writeStmts_exprstmt(assignmentStmtId, ids.constructorBlock, stmtIdx, ids.constructor )
@@ -3567,7 +3567,7 @@ open class KotlinFileExtractor(
3567
3567
3568
3568
val parameters = parameterTypes.mapIndexed { idx, p ->
3569
3569
val paramId = tw.getFreshIdLabel<DbParam >()
3570
- val paramType = extractValueParameter(paramId, p, " a$idx " , locId, methodId, idx, null , paramId, false )
3570
+ val paramType = extractValueParameter(paramId, p, " a$idx " , locId, methodId, idx, paramId, false )
3571
3571
3572
3572
Pair (paramId, paramType)
3573
3573
}
0 commit comments