Support cast type operations in inline

This commit is contained in:
Konstantin Anisimov
2017-03-17 16:54:28 +07:00
committed by KonstantinAnisimov
parent ba8621389e
commit 864bd9a212
3 changed files with 35 additions and 3 deletions
@@ -0,0 +1,11 @@
inline fun <reified T> foo(i2: Any): T {
return i2 as T
}
fun bar(i1: Int): Int {
return foo<Int>(i1)
}
fun main(args: Array<String>) {
println(bar(33))
}