Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
a94a6dc085d3d1f1010ea8bbc9d8754c3aa02b35
/
.
/
compiler
/
testData
/
codegen
/
boxInline
/
simple
/
safeCall.kt
blob: a89a92c1ad6d4484e3b2fe0f8279c23d44f1889d [
file
]
// FILE: 1.kt
package
test
class
W
(
val value
:
Any
)
inline
fun W
.
safe
(
body
:
Any
.()
->
Unit
)
{
this
.
value
?.
body
()
}
// FILE: 2.kt
import
test
.*
fun box
():
String
{
var
result
=
"fail"
W
(
"OK"
).
safe
{
result
=
this
as
String
}
return
result
}