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:
Michael Bogdanov
2016-03-18 13:04:06 +01:00
parent dde11b7f50
commit c3d450f050
8 changed files with 113 additions and 8 deletions
@@ -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
}
@@ -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
}