blob: f2498d71bd9ed72140c1ac136c8eb0acaaeaf70e [file]
// RUN_PIPELINE_TILL: FRONTEND
// DIAGNOSTICS: -UNUSED_EXPRESSION
sealed class Sealed {
}
fun foo(s: Sealed): Int {
return <!TYPE_MISMATCH!><!NO_ELSE_IN_WHEN!>when<!>(s) {
// We do not return anything, so else branch must be here
}<!>
}
/* GENERATED_FIR_TAGS: classDeclaration, functionDeclaration, sealed, whenExpression, whenWithSubject */