Generate 'nop' instruction on lambda call when everything on line is going to be eliminated by inliner (KT-6477)
(cherry picked from commit 462bdb2) #KT-6477 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
708a0e3b5d
commit
87b628a3f7
@@ -13,4 +13,4 @@ inline fun foo(f: () -> Unit) {
|
||||
f()
|
||||
}
|
||||
|
||||
// 2 17 18 +3 4 19 +6 20 21 +7 8 22 +9 12 13 14
|
||||
// 2 17 18 3 4 19 +6 20 21 7 8 22 +9 12 13 14
|
||||
@@ -0,0 +1,12 @@
|
||||
fun box() {
|
||||
lookAtMe {
|
||||
42
|
||||
}
|
||||
}
|
||||
|
||||
inline fun lookAtMe(f: () -> Int) {
|
||||
val a = 21
|
||||
a + f()
|
||||
}
|
||||
|
||||
// 2 13 14 3 15 +5 8 9 10
|
||||
Reference in New Issue
Block a user