JS: prohibit native (external) extension properties and functions. See KT-13896

This commit is contained in:
Alexey Andreev
2016-11-28 11:38:29 +03:00
parent cf25e17209
commit 3882bf7564
36 changed files with 48 additions and 346 deletions
@@ -1,17 +0,0 @@
package foo
val PACKAGE = "kotlin.modules.JS_TESTS.foo"
class A
external val Any.__proto__: String get() = noImpl
external val A.__proto__: String get() = noImpl
fun box(): String {
val a = A()
val any: Any = a
val protoA = eval("$PACKAGE.A.prototype")
if (a.__proto__ != any.__proto__ || a.__proto__ != protoA)
return "a.__proto__ != any.__proto__ /*${a.__proto__ != any.__proto__}*/ || a.__proto__ != $PACKAGE.A.prototype /*${a.__proto__ != protoA}*/"
return "OK"
}