KT-513 Proper use of resolved call in case of infix calls

This commit is contained in:
Alex Tkachman
2011-11-15 16:52:35 +02:00
parent 6c3294ca3a
commit 84593f2cfb
3 changed files with 45 additions and 10 deletions
@@ -0,0 +1,24 @@
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"
}