Add test for KT-34902

This commit is contained in:
Dmitry Petrov
2020-05-26 00:38:13 +03:00
parent 4455532210
commit 2f79b4c412
7 changed files with 51 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
interface OneofField<T> {
val value: T
val number: Int
val name: String
data class OneofUint32 constructor(
override val value: UInt,
override val number: Int = 111,
override val name: String = "oneof_uint32"
) : OneofField<UInt>
}
fun box(): String {
val d = OneofField.OneofUint32(0u)
val s = d.toString()
if (s != "OneofUint32(value=0, number=111, name=oneof_uint32)") return s
return "OK"
}