Never delete types from inline functions during inline transformations

#KT-19399 Fixed
This commit is contained in:
Mikhael Bogdanov
2018-02-15 16:39:08 +01:00
parent 729c866f47
commit d732f0e160
11 changed files with 141 additions and 8 deletions
@@ -0,0 +1,41 @@
//WITH_RUNTIME
// FILE: 1.kt
class Foo {
var bar = ""
inline fun ifNotBusyPerform(action: (complete: () -> Unit) -> Unit) {
action {
bar += "K"
}
}
fun ifNotBusySayHello() {
ifNotBusyPerform {
bar += "O"
it()
}
}
inline fun inlineFun(s: () -> Unit) {
s()
}
fun start() {
inlineFun {
{
ifNotBusyPerform {
ifNotBusySayHello()
}
}()
}
}
}
// FILE: 2.kt
fun box(): String {
val foo = Foo()
foo.start()
return foo.bar
}