Generate linenumber for inline call site in case of implicit iterator/hasNext/next calls in for loop
Otherwise -1 is generated in smap
This commit is contained in:
@@ -742,7 +742,11 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
// Some forms of for-loop can be optimized as post-condition loops.
|
||||
PseudoInsnsKt.fakeAlwaysFalseIfeq(v, continueLabel);
|
||||
|
||||
// Renew line number cause it could be reset by inline (resetLastLineNumber) in generator.checkPreCondition(loopExit).
|
||||
markStartLineNumber(generator.getForExpression());
|
||||
v.nop();
|
||||
generator.beforeBody();
|
||||
|
||||
blockStackElements.push(new LoopBlockStackElement(loopExit, continueLabel, targetLabel(generator.getForExpression())));
|
||||
generator.body();
|
||||
blockStackElements.pop();
|
||||
|
||||
Reference in New Issue
Block a user