e5ad035039
Even ones inside inline functions. This was a backwards compatibility
hack for Kotlin 1.4, where the inliner would crash if it attempted to
regenerate an anonymous object with no SMAP; that has been fixed in 1.5,
and ever since then trivial SMAPs could be inferred from line number
markers in methods.
There are three kinds of changes to tests in this commit:
* Some SMAPs are gone entirely - self-explanatory.
* Some SMAPs have narrower line ranges - that's because the old SMAP
had the range for the entire file, while the new one only maps up to
the last line number used in the class. There should be no
difference in behavior.
* Some "source file name" markers are removed in continuation objects
- continuations don't have any line numbers, so there's no debugging
information anyway. The actual source information is in the
containing class.
36 lines
638 B
Kotlin
Vendored
36 lines
638 B
Kotlin
Vendored
// NO_CHECK_LAMBDA_INLINING
|
|
// IGNORE_BACKEND: JVM
|
|
// IGNORE_BACKEND_MULTI_MODULE: JVM, JVM_MULTI_MODULE_IR_AGAINST_OLD
|
|
// IGNORE_INLINER: IR
|
|
// FILE: 1.kt
|
|
// NO_SMAP_DUMP
|
|
package builders
|
|
//TODO there is a bug in asm it's skips linenumber on same line on reading bytecode
|
|
inline fun call(crossinline init: () -> Unit) {
|
|
"1"; return init()
|
|
}
|
|
|
|
inline fun test(crossinline p: () -> String): String {
|
|
var res = "Fail"
|
|
|
|
call {
|
|
object {
|
|
fun run () {
|
|
res = p()
|
|
}
|
|
}.run()
|
|
}
|
|
|
|
return res
|
|
}
|
|
|
|
// FILE: 2.kt
|
|
|
|
import builders.*
|
|
|
|
|
|
fun box(): String {
|
|
return test{"OK"}
|
|
}
|
|
|