blob: c59621eb92e95b3e6de22d5cf9d232b0e2031cac [file]
// LANGUAGE: +NameBasedDestructuring +DeprecateNameMismatchInShortDestructuringWithParentheses +EnableNameBasedDestructuringShortForm
// FIR_IDENTICAL
// RUN_PIPELINE_TILL: FRONTEND
// CHECK_TYPE
operator fun Int.component1() = "a"
fun foo(a: Number) {
val [x] = a as Int
checkSubtype<Int>(a)
checkSubtype<String>(x)
}
/* GENERATED_FIR_TAGS: asExpression, classDeclaration, destructuringDeclaration, funWithExtensionReceiver,
functionDeclaration, functionalType, infix, localProperty, nullableType, operator, propertyDeclaration, smartcast,
stringLiteral, typeParameter, typeWithExtension */