blob: a734c9ef7642e67048e2a6275c24daff51b7c8dd [file]
// RUN_PIPELINE_TILL: CODEGEN
// LANGUAGE: +FullValueClasses +NameBasedDestructuring -DeprecateNameMismatchInShortDestructuringWithParentheses -EnableNameBasedDestructuringShortForm
// ISSUE: KT-87696
interface HasTokenId {
val id: Int
}
value class SmartToken(override val id: Int) : HasTokenId
fun readAfterSmartCast(value: HasTokenId) {
if (value is SmartToken) {
val (id) = value
}
}
/* GENERATED_FIR_TAGS: classDeclaration, destructuringDeclaration, equalityExpression, functionDeclaration, ifExpression,
integerLiteral, interfaceDeclaration, isExpression, localProperty, override, primaryConstructor, propertyDeclaration,
smartcast, value */