Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
refs/heads/upstream/modules
/
.
/
examples
/
src
/
With.jetl
blob: 8dc0a46640b73603209a9683497f4ff3e8c94c5d [
file
] [
log
] [
blame
] [
edit
]
[
inline
]
fun
with
<
T
>(
receiver
:
T
,
body
:
{
T
.()
:
Unit
})
=
receiver
.
body
()
fun example
()
{
with
(
java
.
lang
.
System
.
out
)
{
println
(
"foo"
);
print
(
"bar"
);
}
System
.
out
.{
println
(
"foo"
);
print
(
"bar"
);
}()
}