Files
kotlin-fork/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.kt
T
2016-09-19 20:22:57 +03:00

14 lines
304 B
Kotlin
Vendored

// !LANGUAGE: -DestructuringLambdaParameters
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER
data class A(val x: Int, val y: String)
fun foo(block: (A) -> Unit) { }
fun bar() {
foo { <!UNSUPPORTED_FEATURE!>(a, b)<!> ->
a checkType { _<Int>() }
b checkType { _<String>() }
}
}