JS: move more test to box tests
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
package foo
|
||||
|
||||
var a = MyInt()
|
||||
|
||||
class MyInt() {
|
||||
var b = 0
|
||||
|
||||
operator fun inc(): MyInt {
|
||||
val res = MyInt();
|
||||
res.b = b;
|
||||
res.b++;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun box(): String {
|
||||
a++;
|
||||
a++;
|
||||
return if (a.b == 2) "OK" else "fail"
|
||||
}
|
||||
Reference in New Issue
Block a user