20 lines
335 B
Kotlin
Vendored
20 lines
335 B
Kotlin
Vendored
//KT-3301 Inference with several supertypes fails
|
|
|
|
package arrays
|
|
|
|
interface A
|
|
interface B
|
|
|
|
object CAB : A, B
|
|
object DAB : A, B
|
|
|
|
fun m(args : Array<A>) {
|
|
|
|
}
|
|
|
|
fun test122() {
|
|
m(array(CAB, DAB)) // Wrong error here: Array<Any> is inferred while expected Array<A> is satisfied
|
|
}
|
|
|
|
//from library
|
|
fun <T> array(vararg t: T): Array<T> {} |