[FIR] Generate type arguments for variable assignments
This commit is contained in:
+1
-1
@@ -219,7 +219,7 @@ internal class CallAndReferenceGenerator(
|
||||
is IrVariableSymbol -> IrSetVariableImpl(startOffset, endOffset, type, symbol, assignedValue, origin)
|
||||
else -> generateErrorCallExpression(startOffset, endOffset, calleeReference)
|
||||
}
|
||||
}.applyReceivers(variableAssignment)
|
||||
}.applyTypeArguments(variableAssignment).applyReceivers(variableAssignment)
|
||||
}
|
||||
|
||||
fun convertToIrConstructorCall(annotationCall: FirAnnotationCall): IrExpression {
|
||||
|
||||
+4
-1
@@ -135,6 +135,7 @@ class FirCallCompletionResultsWriterTransformer(
|
||||
): CompositeTransformResult<FirStatement> {
|
||||
val calleeReference = variableAssignment.calleeReference as? FirNamedReferenceWithCandidate
|
||||
?: return variableAssignment.compose()
|
||||
val typeArguments = computeTypeArguments(variableAssignment, calleeReference.candidate)
|
||||
return variableAssignment.transformCalleeReference(
|
||||
StoreCalleeReference,
|
||||
buildResolvedNamedReference {
|
||||
@@ -142,7 +143,9 @@ class FirCallCompletionResultsWriterTransformer(
|
||||
name = calleeReference.name
|
||||
resolvedSymbol = calleeReference.candidateSymbol
|
||||
},
|
||||
).compose()
|
||||
).apply {
|
||||
replaceTypeArguments(typeArguments)
|
||||
}.compose()
|
||||
}
|
||||
|
||||
override fun transformFunctionCall(functionCall: FirFunctionCall, data: ExpectedArgumentType?): CompositeTransformResult<FirStatement> {
|
||||
|
||||
@@ -90,7 +90,7 @@ FILE fqName:<root> fileName:/integerCoercionToT.kt
|
||||
VALUE_PARAMETER name:cv index:1 type:<root>.CInt32VarX
|
||||
BLOCK_BODY
|
||||
CALL 'public final fun <set-value> <T_INT> (value: T_INT of <root>.<get-value>): kotlin.Unit declared in <root>' type=kotlin.Unit origin=EQ
|
||||
<T_INT>: <none>
|
||||
<T_INT>: kotlin.Int
|
||||
$receiver: GET_VAR 'cv: <root>.CInt32VarX declared in <root>.foo' type=<root>.CInt32VarX origin=null
|
||||
value: CALL 'public final fun <get-value> (): kotlin.Int declared in <root>.IdType' type=kotlin.Int origin=GET_PROPERTY
|
||||
$this: GET_VAR 'value: <root>.IdType declared in <root>.foo' type=<root>.IdType origin=null
|
||||
|
||||
Reference in New Issue
Block a user