Extract new smap creation logic into separate class LineNumberMapper
This commit is contained in:
+1
-1
@@ -68,7 +68,7 @@ class ProvisionalFunctionExpressionLowering :
|
||||
valueArgumentsCount = function.valueParameters.size,
|
||||
reflectionTarget = null,
|
||||
origin = origin
|
||||
).copyAttributes(expression) // TODO better to copy just name
|
||||
).copyAttributes(expression)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
+3
-3
@@ -129,9 +129,9 @@ class ReturnableBlockTransformer(val context: CommonBackendContext, val containe
|
||||
|
||||
val newStatements = expression.statements.mapIndexed { i, s ->
|
||||
if (expression.statements.size == 1 && s is IrInlinedFunctionBlock) {
|
||||
val transformed = s.statements.mapIndexed { j, it -> transformSingleStatement(it, j == s.statements.lastIndex) }
|
||||
s.statements.clear()
|
||||
s.statements.addAll(transformed)
|
||||
for ((j, statement) in s.statements.withIndex()) {
|
||||
s.statements[j] = transformSingleStatement(statement, j == s.statements.lastIndex)
|
||||
}
|
||||
s
|
||||
} else {
|
||||
transformSingleStatement(s, i == expression.statements.lastIndex)
|
||||
|
||||
Reference in New Issue
Block a user