Initial implementation of platformStatic

This commit is contained in:
Michael Bogdanov
2014-09-01 15:12:31 +04:00
parent 7bbedd9685
commit e26d635633
36 changed files with 718 additions and 47 deletions

View File

@@ -0,0 +1,28 @@
import java.lang.annotation.Retention
import java.lang.annotation.RetentionPolicy
Retention(RetentionPolicy.RUNTIME)
annotation class testAnnotation
class A {
class object {
val b: String = "OK"
platformStatic testAnnotation fun test1() = b
}
}
object B {
val b: String = "OK"
platformStatic testAnnotation fun test1() = b
}
fun box(): String {
if (Test.test1() != "OK") return "fail 1"
if (Test.test2() != "OK") return "fail 2"
return "OK"
}