JS: allow to omit delegated constructor call for external classes in common FE. Prohibit delegated constructor call for external classes in JS FE.

This commit is contained in:
Alexey Andreev
2016-12-20 15:01:33 +03:00
parent 02ea1a4d64
commit 1a7e8b0690
18 changed files with 160 additions and 29 deletions
@@ -0,0 +1,18 @@
external interface I
external object O : I
class Delegate {
operator fun getValue(thisRef: Any?, property: Any): String = ""
operator fun setValue(thisRef: Any?, property: Any, value: String) {}
}
external class A : <!EXTERNAL_DELEGATION!>I by O<!> {
val prop <!EXTERNAL_DELEGATION!>by Delegate()<!>
var mutableProp <!EXTERNAL_DELEGATION!>by Delegate()<!>
}
external val topLevelProp <!EXTERNAL_DELEGATION!>by Delegate()<!>