More proper code to check if lambda is inlined. Parameter of inline function can be annotated with "noInline".
This commit is contained in:
@@ -2,4 +2,13 @@ fun f(a: Int) {
|
||||
run {
|
||||
<lineMarker>f</lineMarker>(a - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun ff(a: Int) {
|
||||
run1 {
|
||||
ff(a - 1)
|
||||
}
|
||||
}
|
||||
|
||||
inline fun <T> run1(noinline f: () -> T): T { }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user