Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
9fc4d94d04f972782fee2dc5b3b25d052d88601a
/
.
/
compiler
/
testData
/
diagnostics
/
tests
/
sealed
/
WhenOnEmptySealed.kt
blob: 01275ba4cecfeb3d4e3b034efa41178e31b148d0 [
file
]
// 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
}<!>
}