Generate unique parameter names in LocalDeclarationsLowering
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
fun String.f(x: String): String {
|
||||
fun String.g() = { this@f + this@g }()
|
||||
return x.g()
|
||||
}
|
||||
|
||||
fun box() = "O".f("K")
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_MULTI_MODULE: JVM_IR
|
||||
// FILE: 1.kt
|
||||
// SKIP_INLINE_CHECK_IN: inlineFun$default
|
||||
package test
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// FILE: 1.kt
|
||||
inline fun f(g: () -> String) = g()
|
||||
|
||||
// FILE: 2.kt
|
||||
class A(val x: String) {
|
||||
inner class B(val y: String) {
|
||||
fun h() = f { x + y }
|
||||
}
|
||||
}
|
||||
|
||||
fun box() = A("O").B("K").h()
|
||||
@@ -19,4 +19,10 @@ fun box(): String {
|
||||
|
||||
// One instance of each is in kotlin.Metadata.d2
|
||||
// 1 \(X\)
|
||||
|
||||
// JVM_TEMPLATES
|
||||
// 1 \(Y\)
|
||||
|
||||
// JVM_IR_TEMPLATES
|
||||
// 5 \(Y\)
|
||||
// 4 \$this\$\(Y\)
|
||||
|
||||
Reference in New Issue
Block a user