Files
kotlin-fork/compiler/testData/diagnostics/tests/nullabilityAndAutoCasts/funcLiteralArgsInsideAmbiguity.kt
T
2013-12-11 19:53:50 +04:00

14 lines
288 B
Kotlin

// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
package d
fun bar() {
val i: Int? = 42
if (i != null) {
<!OVERLOAD_RESOLUTION_AMBIGUITY!>doSmth1<!> {
val x = <!DEBUG_INFO_AUTOCAST!>i<!> + 1
}
}
}
fun doSmth1(f: ()->Unit) {}
fun doSmth1(g: (Int)->Unit) {}