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,54 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
import kotlin.platform.platformStatic
class A {
class object {
platformStatic fun a1() {
}
}
object A {
platformStatic fun a2() {
}
}
fun test() {
val s = object {
<!PLATFORM_STATIC_NOT_IN_OBJECT!>platformStatic fun a3()<!> {
}
}
}
<!PLATFORM_STATIC_NOT_IN_OBJECT!>platformStatic fun a4()<!> {
}
}
trait B {
class object {
<!PLATFORM_STATIC_NOT_IN_OBJECT!>platformStatic fun a1()<!> {
}
}
object A {
platformStatic fun a2() {
}
}
fun test() {
val s = object {
<!PLATFORM_STATIC_NOT_IN_OBJECT!>platformStatic fun a3()<!> {
}
}
}
<!PLATFORM_STATIC_NOT_IN_OBJECT!>platformStatic fun a4()<!> {
}
}