JS: prohibit external functions and accessors with bodies other than noImpl. Prohibit to use anything except noImpl for default parameters initializers in external functions. See KT-13892
This commit is contained in:
+2
-2
@@ -5,7 +5,7 @@ external val baz: Int
|
||||
external val boo: Int = noImpl
|
||||
|
||||
external fun foo()
|
||||
external fun bar() {}
|
||||
external fun bar() { noImpl }
|
||||
|
||||
external interface T {
|
||||
val baz: Int
|
||||
@@ -27,7 +27,7 @@ external class C {
|
||||
val boo: Int = noImpl
|
||||
|
||||
fun foo()
|
||||
fun bar() {}
|
||||
fun bar() { noImpl }
|
||||
|
||||
companion object {
|
||||
val baz: Int
|
||||
|
||||
+1
-1
@@ -9,5 +9,5 @@ external object O {
|
||||
@nativeInvoke
|
||||
fun foo()
|
||||
@nativeInvoke
|
||||
fun bar() {}
|
||||
fun bar() { noImpl }
|
||||
}
|
||||
Reference in New Issue
Block a user