Files
kotlin/compiler/testData/diagnostics/tests/functionLiterals/NoDanglingFunctionLiteralForNestedCalls.kt
2013-06-06 17:20:10 +04:00

12 lines
252 B
Kotlin

package baz
fun test() {
<!NONE_APPLICABLE!>foo<!>(1) <!DANGLING_FUNCTION_LITERAL_ARGUMENT_SUSPECTED!>{}<!>
foo( <!NONE_APPLICABLE!>foo<!>(1) {} ) //here
}
fun foo(<!UNUSED_PARAMETER!>i<!>: Int) {}
fun foo() : (i : () -> Unit) -> Unit = {}