Reporting ACCIDENTAL_OVERRIDE on jvm signatures that have no descriptors
(marking them SYNTHETIC)
This commit is contained in:
committed by
Michael Bogdanov
parent
9b7bccce22
commit
b8b0316d97
+9
@@ -0,0 +1,9 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
open class Base {
|
||||
open fun `foo$default`(d: Derived, i: Int, mask: Int) {}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
<!ACCIDENTAL_OVERRIDE!>fun foo(i: Int = 0)<!> {}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
class <!CONFLICTING_JVM_DECLARATIONS!>C<!> {
|
||||
class C {
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun `a$default`(c: C, x: Int, m: Int)<!> {}
|
||||
fun a(x: Int = 1) {}
|
||||
<!CONFLICTING_JVM_DECLARATIONS!>fun a(x: Int = 1)<!> {}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
open class Base {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class Derived : Base() {
|
||||
class object {
|
||||
<!ACCIDENTAL_OVERRIDE!>platformStatic fun foo()<!> {}
|
||||
}
|
||||
}
|
||||
+10
@@ -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)<!> {}
|
||||
}
|
||||
Reference in New Issue
Block a user