mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
closes https://github.com/JetBrains/intellij-community/pull/2156 GitOrigin-RevId: 8ee74d1f71d787f081bdd5840b82af0bada8accf
94 lines
484 B
Kotlin
94 lines
484 B
Kotlin
fun some(x : Any) {
|
|
when (x) {
|
|
is Int ->
|
|
0
|
|
3 ->
|
|
2
|
|
in 0..3 ->
|
|
2
|
|
else ->
|
|
1
|
|
}
|
|
when (x) {
|
|
is Int -> {
|
|
0
|
|
}
|
|
3 -> {
|
|
2
|
|
}
|
|
in 0..3 -> {
|
|
2
|
|
}
|
|
else -> {
|
|
1
|
|
}
|
|
}
|
|
when (x) {
|
|
is Int ->
|
|
{
|
|
0
|
|
}
|
|
3 ->
|
|
{
|
|
2
|
|
}
|
|
in 0..3 ->
|
|
{
|
|
2
|
|
}
|
|
else ->
|
|
{
|
|
1
|
|
}
|
|
}
|
|
when (x) {
|
|
is
|
|
Int
|
|
->
|
|
{
|
|
0
|
|
}
|
|
3
|
|
->
|
|
{
|
|
2
|
|
}
|
|
in
|
|
0..3
|
|
->
|
|
{
|
|
2
|
|
}
|
|
else
|
|
->
|
|
{
|
|
1
|
|
}
|
|
}
|
|
when (x) {
|
|
is
|
|
Int
|
|
-> listOf(
|
|
0
|
|
)
|
|
3
|
|
-> if (true)
|
|
listOf(4)
|
|
else
|
|
listOf(
|
|
5
|
|
)
|
|
in
|
|
0..3
|
|
-> run {
|
|
listOf(2)
|
|
}
|
|
else
|
|
-> when {
|
|
true -> listOf(1)
|
|
false -> listOf(2)
|
|
}
|
|
}
|
|
}
|
|
// SET_TRUE: ALLOW_TRAILING_COMMA
|