blob: 5c8d13eb1c6c11b531002a197014ae07961e2431 [file]
// RUN_PIPELINE_TILL: BACKEND
// FIR_IDENTICAL
sealed class Sealed {
object First: Sealed()
sealed class NonFirst {
object Second: NonFirst()
object Third: NonFirst()
object Fourth: Sealed()
}
}
fun foo(s: Sealed, nf: Sealed.NonFirst): Int {
val si = when(s) {
Sealed.First -> 1
Sealed.NonFirst.Fourth -> 4
}
val nfi = when(nf) {
Sealed.NonFirst.Second -> 2
Sealed.NonFirst.Third -> 3
}
return si + nfi
}
/* GENERATED_FIR_TAGS: additiveExpression, classDeclaration, equalityExpression, functionDeclaration, integerLiteral,
localProperty, nestedClass, objectDeclaration, propertyDeclaration, sealed, smartcast, whenExpression, whenWithSubject */