Diagnostic: support anonymous objects in inline functions

This commit is contained in:
Mikhael Bogdanov
2014-04-25 11:48:12 +04:00
parent c5e9ea0d29
commit 30e921fa89
4 changed files with 27 additions and 10 deletions
@@ -0,0 +1,12 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
inline fun <R> inlineFun(p: () -> R) {
val s = object {
val z = p()
fun a() {
p()
}
}
}