Files
kotlin-fork/compiler/testData/cli/jvm/inlineCycle.kt
T
Dmitry Petrov 8ef79f932c JVM_IR: Implement some BE diagnostics
TODO proper diagnostics tests with BE diagnostics
2020-02-04 00:04:22 +03:00

23 lines
283 B
Kotlin
Vendored

inline fun a(q: () -> Unit) {
b(q)
// check that nested not recognized as cycle
c {
c {
}
}
withDefaults()
}
inline fun withDefaults(x: Int = 1) = x * 2
inline fun b(p: () -> Unit) {
p()
a(p)
}
inline fun c(p: () -> Unit) {
p()
}