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
+5
View File
@@ -1504,6 +1504,11 @@ task inline22(type: RunKonanTest) {
source = "codegen/inline/inline22.kt"
}
task inline23(type: RunKonanTest) {
goldValue = "33\n"
source = "codegen/inline/inline23.kt"
}
kotlinNativeInterop {
sysstat {
pkg 'sysstat'
@@ -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))
}