2ecba6ac39
This directive anyway does not make test run twice with OI, and with NI It only once run the test with specific settings (// LANGUAGE) and ignores irrelevant (OI or NI tags)
21 lines
595 B
Kotlin
Vendored
21 lines
595 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
object Right
|
|
object Wrong
|
|
|
|
fun overloadedFun1(c: Any = "", b: String = "", f: Any = "") = Right
|
|
fun overloadedFun1(b: Any = "", c: Any = "", e: String = "") = Wrong
|
|
|
|
val test1: Right = overloadedFun1(b = "")
|
|
val test1a: Wrong = <!TYPE_MISMATCH!>overloadedFun1(b = "")<!>
|
|
|
|
fun overloadedFun2(a: String, b: Any = "") = Right
|
|
fun overloadedFun2(a: Any, b: String = "") = Wrong
|
|
|
|
val test2: Right = overloadedFun2("")
|
|
|
|
fun overloadedFun2a(a: Any, b: String = "") = Wrong
|
|
fun overloadedFun2a(a: String, b: Any = "") = Right
|
|
|
|
val test2a: Right = overloadedFun2a("")
|