Raw FIR: introduce string concatenation call
This removes some 'plus' calls to be resolved
This commit is contained in:
@@ -304,14 +304,13 @@ internal fun Array<KtStringTemplateEntry>.toInterpolatingCall(
|
||||
}
|
||||
result = when {
|
||||
result == null -> nextArgument
|
||||
callCreated && result is FirFunctionCallImpl -> result.apply {
|
||||
callCreated && result is FirStringConcatenationCallImpl -> result.apply {
|
||||
arguments += nextArgument
|
||||
}
|
||||
else -> {
|
||||
callCreated = true
|
||||
FirFunctionCallImpl(session, base).apply {
|
||||
calleeReference = FirSimpleNamedReference(session, base, OperatorNameConventions.PLUS)
|
||||
explicitReceiver = result
|
||||
FirStringConcatenationCallImpl(session, base).apply {
|
||||
arguments += result!!
|
||||
arguments += nextArgument
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ FILE: for.kt
|
||||
lval <destruct>: <implicit> = <iterator>#.next#()
|
||||
lval x: <implicit> = <destruct>#.component1()
|
||||
lval y: <implicit> = <destruct>#.component2()
|
||||
println#(String(x = ).plus#(x#, String( y = ), y#))
|
||||
println#(<strcat>(String(x = ), x#, String( y = ), y#))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user