Files
kotlin-fork/compiler/testData/diagnostics/tests/generics/tpAsReified/InlineableReified.kt
T
Denis Zharkov b3691b7358 Frontend changes for reified type parameters
Allowing reified only for inline functions and Intrinsics
2014-11-13 20:56:09 +03:00

9 lines
185 B
Kotlin

// !DIAGNOSTICS: -NOTHING_TO_INLINE -UNUSED_PARAMETER
inline fun<T1, reified T2> bar(x: T1, y: T2): T2 = y
inline fun<reified R> foo(z: R): R = bar(1, z)
fun box() {
foo("abc")
}