blob: b6d43d8b51b31960f928e3cc88ce2ff1e8b41af0 [file]
// WITH_STDLIB
import kotlin.test.*
val sb = StringBuilder()
class TestClass(val x: Int) {
fun foo(y: Int = x) {
sb.appendLine(y)
}
}
fun TestClass.bar(y: Int = x) {
sb.appendLine(y)
}
fun box(): String {
TestClass(5).foo()
TestClass(6).bar()
assertEquals("5\n6\n", sb.toString())
return "OK"
}