janvladimirmostert
02/08/2020, 3:29 PMinline class HotelCode(val value: String)
suspend fun listHotels(vararg hotelCode: HotelCode) {
^^^ forbidden vararg type HotelCodeDico
02/08/2020, 4:16 PMDico
02/08/2020, 4:16 PMjanvladimirmostert
02/08/2020, 4:21 PMThis decision doesn't allow declaring vararg parameters that represent array of unboxed inline class values, because it's impossible to associate vararg of inline class type with the corresponding array type. For example, without additional information it's impossible to match vararg v: Foo with FooArray. Therefore, we are going to prohibit vararg parameters for now.
Wouldn't Array<Foo> solve that?
Sure you're not going to get it compiled to primitive arrays like FooArray or IntArray does, but that's an acceptable trade-off
I'll star that discussion to stay in the looplouiscad
02/09/2020, 8:17 AMDico
02/09/2020, 3:36 PM