blob: a85db611e20233bd88865229a27d4fcf8a58dd6a [file]
// FIR_IDENTICAL
// LANGUAGE: +NameBasedDestructuring +DeprecateNameMismatchInShortDestructuringWithParentheses +EnableNameBasedDestructuringShortForm
// RUN_PIPELINE_TILL: BACKEND
// DIAGNOSTICS: -UNUSED_PARAMETER
fun foo1(i: (Int) -> Unit) {}
fun foo2(i: (Int, Int) -> Unit) {}
fun foo3(i: (Pair) -> Unit) {}
fun bar(x: Int, y: Int) {
foo1 { x -> x }
foo2 { x: Int, y: Int ->
val x = x
}
foo3 { [x, y] ->
val x = x
}
}
data class Pair(val a: Int, val b: Int)
/* GENERATED_FIR_TAGS: classDeclaration, data, functionDeclaration, functionalType, lambdaLiteral, localProperty,
primaryConstructor, propertyDeclaration */