Files
kotlin-fork/compiler/testData/diagnostics/testsWithStdLib/annotations/platformStatic/finalAndAbstract.kt
T
Denis Zharkov 849b8acbf8 Replace annotations with brackets in testData
Just in tests that changed after deprecation
2015-05-07 22:36:16 +03:00

35 lines
667 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_VARIABLE
import kotlin.platform.platformStatic
abstract class A {
open fun a() {}
abstract fun b()
open fun c() {}
}
object B: A() {
<!OVERRIDE_CANNOT_BE_STATIC!>@platformStatic override fun a()<!> {}
<!OVERRIDE_CANNOT_BE_STATIC!>@platformStatic override fun b()<!> {}
<!OVERRIDE_CANNOT_BE_STATIC!>@platformStatic final override fun c()<!> {}
@platformStatic open fun d() {}
}
class C {
companion object: A() {
@platformStatic override fun a() {}
@platformStatic override fun b() {}
@platformStatic final override fun c() {}
@platformStatic open fun d() {}
}
}