mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-11 15:53:46 +00:00
11 lines
466 B
Kotlin
Vendored
11 lines
466 B
Kotlin
Vendored
// "Change 'pairs' to '*pairs'" "false"
|
|
// WITH_RUNTIME
|
|
// ACTION: Create function 'mapOf'
|
|
// ERROR: Type inference failed: fun <K, V> mapOf(pair: Pair<K, V>): Map<K, V><br>cannot be applied to<br>(Array<out Pair<String, String>>)<br>
|
|
// ERROR: Type mismatch: inferred type is Array<out Pair<String, String>> but Pair<???, ???> was expected
|
|
|
|
|
|
fun myMapOf(vararg pairs: Pair<String,String>) {
|
|
// Does not work due to KT-15593
|
|
val myMap = mapOf(<caret>pairs)
|
|
} |