Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
cae7f90b594750d624e94b3325571f4b5ebff2f0
/
.
/
compiler
/
testData
/
ir
/
irText
/
expressions
/
whenWithSubjectVariable.kt
blob: 773d4909723bde8321fed107412bf1d602925567 [
file
] [
log
] [
blame
]
// !LANGUAGE: +VariableDeclarationInWhenSubject
fun foo
():
Any
=
1
fun test
()
=
when
(
val y
=
foo
())
{
42
->
1
is
String
->
y
.
length
!
is
Int
->
2
in
0.
.
10
->
3
!
in
10.
.
20
->
4
else
->
-
1
}