JS: prohibit declaration names that clash with JS builtin functions
See KT-18095, KT-17475, KT-18105, KT-5259
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1135
|
||||
open class C {
|
||||
private fun constructor() = "C.constructor"
|
||||
|
||||
fun f(): String = constructor()
|
||||
}
|
||||
|
||||
class D : C()
|
||||
|
||||
fun box(): String {
|
||||
val d = D()
|
||||
|
||||
val x = d.f()
|
||||
if (x != "C.constructor") return "fail1: $x"
|
||||
|
||||
if (x.asDynamic().constructor === D::class.js) return "fail2"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user