JVM IR: Restore logic of finding line number for suspend lambda
Before c7bc439661 we did not throw
exception when we could not find line number for element. However,
on synthetic suspend lambdas we do not have line numbers.
If future, when we fix adapted callable references (see KT-55559)
there will be more of them.
#KT-56910 Fixed
This commit is contained in:
committed by
Space Team
parent
3eddfeb8c9
commit
010c7acc3a
+1
-1
@@ -45,7 +45,7 @@ internal fun MethodNode.acceptWithStateMachine(
|
||||
if (klass.startOffset >= 0) {
|
||||
// if it suspend lambda transformed into class `runSuspend { .... }`
|
||||
irFunction.file.fileEntry.getLineNumber(klass.startOffset) + 1
|
||||
} else error("Cannot determine lineNumber of element ${irFunction.render()}")
|
||||
} else 1 // This lambda might be synthetic
|
||||
}
|
||||
|
||||
val visitor = CoroutineTransformerMethodVisitor(
|
||||
|
||||
Reference in New Issue
Block a user