Files
kotlin-fork/backend.native/tests/external/codegen/blackbox/dataClasses/copy/withGenericParameter.kt
T
Ilya Matveev 1b553ebfaf backend/tests: Add blackbox tests from Kotlin JVM
Added tests from testData/codegen/box directory. There are blackbox tests
in other directories and they are to be added.
2017-01-20 14:04:04 +03:00

15 lines
241 B
Kotlin

data class A(val a: Foo<String>) {}
class Foo<T>(val a: T) { }
fun box() : String {
val f1 = Foo("a")
val f2 = Foo("b")
val a = A(f1)
val b = a.copy(f2)
if (b.a.a == "b") {
return "OK"
}
return "fail"
}