Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
9f74a475e654a271d2924cb1d68ecbb852e03892
/
.
/
plugins
/
power-assert
/
testData
/
codegen
/
arithmetic
/
InlinePrefixUnaryPlus.kt
blob: 16ee8cb4f5bc5cf162da9a15d38cf521a55aac85 [
file
]
fun box
():
String
=
runAll
(
"test1"
to
{
test1
()
},
"test2"
to
{
test2
()
},
)
operator
fun
Boolean
.
unaryPlus
()
=
this
fun test1
()
{
val b
=
false
assert
(+
b
)
}
fun test2
()
{
val b
=
2
assert
(+
b
==
3
)
}