1b553ebfaf
Added tests from testData/codegen/box directory. There are blackbox tests in other directories and they are to be added.
14 lines
220 B
Kotlin
14 lines
220 B
Kotlin
class Wrapper<T>(var x: T)
|
|
|
|
inline fun <reified T> change(w: Wrapper<T>, x: Any?) {
|
|
if (x is T) {
|
|
w.x = x
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val w = Wrapper<String>("FAIL")
|
|
change(w, "OK")
|
|
return w.x
|
|
}
|