Kotlin / dukat

Converter of <any kind of declarations> to Kotlin external declarations
552 stars 42 forks source link

dynamic TypeParam should be equivalent to generic param #307

Closed Schahen closed 4 years ago

Schahen commented 4 years ago

Following code:

interface A<T> { }
interface B<T> { }

interface Api {
   check<T>(values: Array<T>): T
   check<T>(values: Array<A<T> | B<T>>): T
}

Is translated to:

external interface A<T>

external interface B<T>

external interface Api {
    fun <T> check(values: Array<T>): T
    fun <T> check(values: Array<dynamic /* A<T> | B<T> */>): T
}

Which won't compile without "CONFLICTING_OVERLOADS" suppression