Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
9fc4d94d04f972782fee2dc5b3b25d052d88601a
/
.
/
compiler
/
testData
/
diagnostics
/
tests
/
when
/
whenOnNothing.fir.kt
blob: 1402715d3d619a9cd1ba8eb45301a0613c24f3ea [
file
]
// DIAGNOSTICS: -UNREACHABLE_CODE
// exhaustive
fun test1
(
n
:
Nothing
)
=
when
(
n
)
{
}
fun test2
(
n
:
Nothing
?)
=
when
(
n
)
{
<!
SENSELESS_COMPARISON
!>
null
<!>
->
{}
}
// not exhaustive
fun test3
(
n
:
Nothing
?)
=
<!
NO_ELSE_IN_WHEN
!>
when
<!>
(
n
)
{
}