Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
946dff8bda9fd326d2b6c18f10c7545ebed12ae1
/
.
/
compiler
/
testData
/
codegen
/
box
/
collections
/
inSetWithSmartCast.kt
blob: ee4987608d64d8ca29a91fdc084498b781146f97 [
file
]
// WITH_RUNTIME
fun contains
(
set
:
Set
<
Any
>,
x
:
Int
):
Boolean
=
when
{
set
.
size
==
0
->
false
else
->
x
in
set
as
Set
<
Int
>
}
fun box
():
String
{
val
set
=
setOf
(
1
)
if
(
contains
(
set
,
1
))
{
return
"OK"
}
return
"Fail"
}