mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
13 lines
332 B
Kotlin
13 lines
332 B
Kotlin
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
|
|
|
fun testArgumentInCall() {
|
|
fun bar(i: Int, s: String, x: Any) {}
|
|
|
|
<!UNREACHABLE_CODE!>bar(<!>1, todo(), <!UNREACHABLE_CODE!>"")<!>
|
|
}
|
|
|
|
fun testArgumentInVariableAsFunctionCall(f: (Any) -> Unit) {
|
|
f<!UNREACHABLE_CODE!>(<!>todo()<!UNREACHABLE_CODE!>)<!>
|
|
}
|
|
|
|
fun todo() = throw Exception() |