Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
cae7f90b594750d624e94b3325571f4b5ebff2f0
/
.
/
compiler
/
testData
/
cfg-variables
/
basic
/
ExhaustiveInitialization.kt
blob: 020be31fb2e1e1ce99bce46a00eacddb44deef2e [
file
] [
log
] [
blame
]
enum
class
Direction
{
NORTH
,
SOUTH
,
WEST
,
EAST
}
fun foo
(
dir
:
Direction
):
Int
{
val res
:
Int
when
(
dir
)
{
Direction
.
NORTH
->
res
=
1
Direction
.
SOUTH
->
res
=
2
Direction
.
WEST
->
res
=
3
Direction
.
EAST
->
res
=
4
}
return
res
}