Fix for: KT-14011 Compiler crash when inlining: lateinit property allRecapturedParameters has not been initialized
#KT-14011 Fixed
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
inline fun inline1(crossinline action: () -> Unit) {
|
||||
action();
|
||||
{ action() }()
|
||||
}
|
||||
|
||||
inline fun inline2(crossinline action: () -> Unit) = { action() }
|
||||
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
var result = "fail"
|
||||
fun box(): String {
|
||||
inline1 { inline2 { result = "OK" }() }
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
inline fun inline1(crossinline action: () -> Unit) {
|
||||
{ action () }
|
||||
action();
|
||||
}
|
||||
|
||||
inline fun inline2(crossinline action: () -> Unit) = { action() }
|
||||
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
var result = "fail"
|
||||
fun box(): String {
|
||||
inline1 { inline2 { result ="OK" }() }
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
inline fun inline1(crossinline action: () -> Unit) {
|
||||
{ action () }
|
||||
action();
|
||||
}
|
||||
|
||||
inline fun inline2(crossinline action: () -> Unit) = {
|
||||
action()
|
||||
}
|
||||
|
||||
|
||||
// FILE: 2.kt
|
||||
import test.*
|
||||
|
||||
var result = "fail"
|
||||
fun box(): String {
|
||||
inline1 {
|
||||
inline2 { { result ="OK" }() }()
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user