Files
kotlin-fork/compiler/testData/diagnostics/testsWithJsStdLib/name/nameSwapInOverride.kt
T
Alexander Korepanov 6bb939c6cb [FIR JS] Support JS_NAME_CLASH and JS_FAKE_NAME_CLASH diagnostics
^KT-59425 Fixed
^KT-59370 Fixed
2023-09-08 09:55:25 +00:00

23 lines
448 B
Kotlin
Vendored

// FIR_IDENTICAL
interface I {
@JsName("bar")
fun foo()
@JsName("foo")
fun bar()
}
interface J {
fun foo()
fun bar()
}
class A : I, J {
// Duplicate diagnostics are expected here, since `bar()` function gets both `foo` and `bar` names and clashes with both
// names of `foo()` function.
<!JS_NAME_CLASH, JS_NAME_CLASH!>override fun bar()<!> {}
<!JS_NAME_CLASH, JS_NAME_CLASH!>override fun foo()<!> {}
}