Make generation of assertions for platform types aware of kotlin types

#KT-26859 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2018-09-17 10:59:26 +03:00
parent 03ea8603ce
commit fa9a3868b7
7 changed files with 47 additions and 3 deletions
@@ -0,0 +1,18 @@
// WITH_RUNTIME
// IGNORE_BACKEND: JVM_IR, JS_IR, NATIVE
inline class SnekDirection(val direction: Int) {
companion object {
val Up = SnekDirection(0)
}
}
fun testUnbox() : SnekDirection {
val list = arrayListOf(SnekDirection.Up)
return list[0]
}
fun box(): String {
val a = testUnbox()
return if (a.direction == 0) "OK" else "Fail"
}