Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/coercionToUnit/coercionToUnitReference.kt
T
2019-12-27 11:36:19 +03:00

15 lines
298 B
Kotlin
Vendored

// SKIP_TXT
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !LANGUAGE: +NewInference
fun foo(f: () -> Unit) {}
fun bar(): Int = 42
fun test() {
foo {
<!UNUSED_EXPRESSION!>::bar<!> // should be fine
}
foo {
<!UNUSED_LAMBDA_EXPRESSION!>{ "something" }<!> // should be fine
}
}