Sign in
pigweed
/
third_party
/
github
/
JetBrains
/
kotlin
/
534b00eff856e0e4dcaf105df9a043d9b1263ff7
/
.
/
compiler
/
testData
/
codegen
/
box
/
function
/
defaultsWithVarArg2.kt
blob: 143ecd6650a8c7960c2ff9e7c1800354ea38e6e2 [
file
]
// WITH_STDLIB
import
kotlin
.
test
.*
val sb
=
StringBuilder
()
fun foo
(
vararg arr
:
Int
=
intArrayOf
(
1
,
2
))
{
arr
.
forEach
{
sb
.
appendLine
(
it
)
}
}
fun box
():
String
{
foo
()
foo
(
42
)
assertEquals
(
"""
1
2
42
"""
.
trimIndent
(),
sb
.
toString
())
return
"OK"
}