Fix bridge methods generation when inline class types are used

This commit is contained in:
Mikhail Zarechenskiy
2018-06-19 15:58:31 +03:00
parent f326fd66be
commit fcacdc1fc5
10 changed files with 91 additions and 11 deletions
@@ -13,6 +13,10 @@ inline class MyUIntArray(private val storage: IntArray) : Collection<MyUInt> {
override fun isEmpty(): Boolean = TODO()
}
fun <T> checkBoxed(c: Collection<T>, element: T): Boolean {
return c.contains(element) && c.containsAll(listOf(element))
}
fun box(): String {
val uints = MyUIntArray(intArrayOf(0, 1, 42))
@@ -21,5 +25,7 @@ fun box(): String {
val ints = listOf(MyUInt(1), MyUInt(0))
if (!uints.containsAll(ints)) return "Fail 2"
if (!checkBoxed(uints, MyUInt(0))) return "Fail 3"
return "OK"
}