JS: improve name clash checker to handle complicated cases

See KT-18010
This commit is contained in:
Alexey Andreev
2017-09-19 12:53:35 +03:00
parent 95566b1374
commit ca014468ee
6 changed files with 152 additions and 23 deletions
@@ -0,0 +1,21 @@
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()<!> {}
}