JS backend: testFiles -> testData

This commit is contained in:
Zalim Bashorov
2014-02-26 15:39:46 +04:00
parent bcd579acdd
commit 442215e829
490 changed files with 0 additions and 0 deletions
@@ -0,0 +1,42 @@
package foo
class C(val i: Int) : Comparable<C>, A() {
public override fun compareTo(other: C): Int {
return if (other is C) other.i - i else 0
}
}
fun ComparableRange<C>.iterator(): Iterator<C> {
var curI: Int = start.i - 1
return object :Iterator<C> {
public override fun next(): C {
curI++
return C(curI)
}
public override fun hasNext(): Boolean {
return curI < end.i
}
}
}
open class A {
fun component1(): Int = 1
}
fun A.component2(): String = "n"
fun box(): String {
var i = 0;
var s = ""
for ((a, b) in C(0)..C(2)) {
i = a;
s = b;
}
if (i != 1) return "i != 1, it: " + i
if (s != "n") return "s != 'n', it: " + s
return "OK"
}