Fix tests: "infix modifier required" and "operator modifier required" errors

This commit is contained in:
Yan Zhulanow
2015-11-26 15:56:56 +03:00
parent a3ff3ffc45
commit 9d1af5a17e
635 changed files with 1283 additions and 1617 deletions
+4 -4
View File
@@ -1,13 +1,13 @@
class mInt(val i : Int) {
override fun toString() : String = "mint: $i"
fun plus(i : Int) = mInt(this.i + i)
fun inc() = mInt(i + 1)
operator fun plus(i : Int) = mInt(this.i + i)
operator fun inc() = mInt(i + 1)
}
class MyArray() {
val a = Array<mInt>(10, {mInt(0)})
fun get(i : mInt) : mInt = a[i.i]
fun set(i : mInt, v : mInt) {
operator fun get(i : mInt) : mInt = a[i.i]
operator fun set(i : mInt, v : mInt) {
a[i.i] = v
}
}