Migrate boxInline tests to new multi-file framework
This commit is contained in:
committed by
Alexander Udalov
parent
fa1f7d988e
commit
cc84aabdcf
@@ -0,0 +1,27 @@
|
||||
// FILE: 1.kt
|
||||
|
||||
package test
|
||||
|
||||
class A
|
||||
|
||||
fun call(a: String, b: String, c: String, d: String, e: String, f: Any) {
|
||||
|
||||
}
|
||||
|
||||
inline fun <reified T: Any> Any?.foo(): T {
|
||||
call("1", "2", "3", "4", "5", this as T)
|
||||
return this as T
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
|
||||
import test.*
|
||||
|
||||
|
||||
|
||||
fun box(): String {
|
||||
val a = A()
|
||||
if (a.foo<Any>() != a) return "failTypeCast 5"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user