JS: create new common directory for all generated tests, migrate several tests there

This commit is contained in:
Alexey Andreev
2016-08-26 16:44:48 +03:00
parent 34a57f863b
commit 2bf0199959
321 changed files with 2123 additions and 2001 deletions
@@ -0,0 +1,24 @@
package foo
import kotlin.reflect.KProperty
class Delegate {
var inner = 1
operator fun getValue(t: Any?, p: KProperty<*>): Int = inner
}
operator fun Delegate.setValue(t: Any?, p: KProperty<*>, i: Int) {
inner = i
}
class A {
var prop: Int by Delegate()
}
fun box(): String {
val c = A()
if (c.prop != 1) return "fail get"
c.prop = 2
if (c.prop != 2) return "fail set"
return "OK"
}