Files
kotlin-fork/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/unsupportedFeature.fir.kt
T

14 lines
278 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 { (a, b) ->
a checkType { _<Int>() }
b checkType { _<String>() }
}
}