Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
4f8dad3e4ba00e23b4182ef4c50194b20bd43c8f
/
.
/
compiler
/
testData
/
diagnostics
/
tests
/
when
/
whenOnNothing.fir.kt
blob: 0e87c6eecf2d805bb0bd49030969b0d1587fdaab [
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
)
{
}