Added platform static checker with provider implementation

This commit is contained in:
Michael Bogdanov
2014-09-15 14:38:29 +04:00
parent 9b065a89b9
commit b763aa9995
36 changed files with 443 additions and 52 deletions
@@ -0,0 +1,29 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
import kotlin.platform.platformStatic
class A {
class object {
var p1:Int = 1
<!PLATFORM_STATIC_ILLEGAL_USAGE!>[platformStatic] set(p: Int)<!> {
p1 = 1
}
<!PLATFORM_STATIC_ILLEGAL_USAGE!>[platformStatic] val z<!> = 1;
}
object A {
var p:Int = 1
<!PLATFORM_STATIC_ILLEGAL_USAGE!>[platformStatic] set(p1: Int)<!> {
p = 1
}
<!PLATFORM_STATIC_ILLEGAL_USAGE!>[platformStatic] val z<!> = 1;
}
var p:Int = 1
<!PLATFORM_STATIC_ILLEGAL_USAGE!>[platformStatic] set(p1: Int)<!> {
p = 1
}
<!PLATFORM_STATIC_ILLEGAL_USAGE!>[platformStatic] val z<!> = 1;
}