Files
kotlin/compiler/testData/codegen/box/controlStructures/kt513.kt
Alexander Udalov 41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +04:00

25 lines
413 B
Kotlin

import java.util.*
class A() {
fun <T> ArrayList<T>.add3(el: T) = add(el)
fun test(list: ArrayList<Int>) {
for (i in 1..10) {
list add3 i
}
}
}
fun <T> ArrayList<T>.add2(el: T) = add(el)
fun box() : String{
var list = ArrayList<Int>()
for (i in 1..10) {
list add i
list add2 i
}
A().test(list)
System.out?.println(list)
return "OK"
}