Files
kotlin-fork/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/waitNotifyGetClass.kt
T
Alexander Udalov 6f2bb8c05a Rename tests with diagnostics on JVM backend
Remove the "_ir" suffix. It was originally used to distinguish tests on
the JVM IR backend from the old JVM backend ("_old"), but the latter are
removed now.
2023-07-17 16:55:24 +00:00

22 lines
834 B
Kotlin
Vendored

// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
// TARGET_BACKEND: JVM_IR
// KT-7174 Report error on members with the same signature as non-overridable methods from mapped Java types (like Object.wait/notify)
class A {
<!ACCIDENTAL_OVERRIDE!>fun notify()<!> {}
<!ACCIDENTAL_OVERRIDE!>fun notifyAll()<!> {}
<!ACCIDENTAL_OVERRIDE!>fun wait()<!> {}
<!ACCIDENTAL_OVERRIDE!>fun wait(l: Long)<!> {}
<!ACCIDENTAL_OVERRIDE!>fun wait(l: Long, i: Int)<!> {}
<!ACCIDENTAL_OVERRIDE!>fun getClass(): Class<Any><!> = null!!
}
<!ACCIDENTAL_OVERRIDE!>fun notify()<!> {}
<!ACCIDENTAL_OVERRIDE!>fun notifyAll()<!> {}
<!ACCIDENTAL_OVERRIDE!>fun wait()<!> {}
<!ACCIDENTAL_OVERRIDE!>fun wait(l: Long)<!> {}
<!ACCIDENTAL_OVERRIDE!>fun wait(l: Long, i: Int)<!> {}
<!ACCIDENTAL_OVERRIDE!>fun getClass(): Class<Any><!> = null!!