Fix for KT-11479: 1.0.2 Snapshot: CompilationException: Back-end (JVM) Internal error: Couldn't inline method call
#KT-11479 Fixed
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
inline fun log(lazyMessage: () -> Any?) {
|
||||
lazyMessage()
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
inline fun getOrCreate(
|
||||
z : Boolean = false,
|
||||
s: () -> String
|
||||
) {
|
||||
log { s() }
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
var z = "fail"
|
||||
getOrCreate { z = "OK"; z }
|
||||
|
||||
return z
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
// FILE: 1.kt
|
||||
package test
|
||||
|
||||
inline fun log(lazyMessage: () -> Any?) {
|
||||
lazyMessage()
|
||||
}
|
||||
|
||||
inline fun z(): Boolean {
|
||||
"zzz"
|
||||
return true
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
inline fun getOrCreate(
|
||||
z : Boolean = z(),
|
||||
s: () -> String
|
||||
) {
|
||||
log { s() }
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
var z = "fail"
|
||||
getOrCreate { z = "OK"; z }
|
||||
|
||||
return z
|
||||
}
|
||||
Reference in New Issue
Block a user