Reporting ACCIDENTAL_OVERRIDE on jvm signatures that have no descriptors

(marking them SYNTHETIC)
This commit is contained in:
Andrey Breslav
2014-09-10 13:21:24 +04:00
committed by Michael Bogdanov
parent 9b7bccce22
commit b8b0316d97
19 changed files with 189 additions and 27 deletions
@@ -0,0 +1,11 @@
import kotlin.platform.platformStatic
open class Base {
fun foo() {}
}
class Derived : Base() {
class object {
<!ACCIDENTAL_OVERRIDE!>platformStatic fun foo()<!> {}
}
}
@@ -0,0 +1,10 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.platform.platformStatic
open class Base {
fun `foo$default`(i: Int, mask: Int) {}
}
object Derived : Base() {
<!ACCIDENTAL_OVERRIDE!>platformStatic fun foo(i: Int = 0)<!> {}
}