Files
kotlin-fork/compiler/testData/codegen/functions/defaultargs3.kt
T
Alexander Udalov 0df71bd696 Refactor codegen tests
- initialize environment only once in setUp()
- add comments on why some tests are disabled
- modify and rename some tests
- re-enable now working tests
- extract some tests into files with box()
- remove useless 'throws' declarations and commented code
2013-01-24 21:12:27 +04:00

16 lines
341 B
Kotlin

class C() {
fun Any.toMyPrefixedString(prefix: String = "", suffix: String="") : String = prefix + " " + suffix
fun testReceiver() : String {
val res : String = "mama".toMyPrefixedString("111", "222")
return res
}
}
fun box() : String {
if(C().testReceiver() != "111 222") return "fail"
return "OK"
}