JS: replace all usages of @native annotation with external modifier, in tests, stdlib, etc
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
|
||||
package foo
|
||||
|
||||
@native
|
||||
@JsName("A")
|
||||
open class B(val foo: String)
|
||||
external open class B(val foo: String)
|
||||
|
||||
class C(s: String) : B(s)
|
||||
|
||||
|
||||
+1
-2
@@ -3,9 +3,8 @@
|
||||
|
||||
package foo
|
||||
|
||||
@native
|
||||
@JsName("A")
|
||||
open class B(val foo: String)
|
||||
external open class B(val foo: String)
|
||||
|
||||
// MODULE: main(module1)
|
||||
// FILE: main.kt
|
||||
|
||||
+16
-8
@@ -1,22 +1,30 @@
|
||||
package foo
|
||||
|
||||
@JsName("bar") @native fun foo(): Int = noImpl
|
||||
@JsName("bar")
|
||||
external fun foo(): Int = noImpl
|
||||
|
||||
@JsName("baz") @native val prop: Int get() = noImpl
|
||||
@JsName("baz")
|
||||
external val prop: Int get() = noImpl
|
||||
|
||||
@JsName("B") @native class A {
|
||||
@JsName("g") fun f(): Int = noImpl
|
||||
@JsName("B")
|
||||
external class A {
|
||||
@JsName("g")
|
||||
fun f(): Int = noImpl
|
||||
|
||||
@JsName("q") val p: Int get() = noImpl
|
||||
@JsName("q")
|
||||
val p: Int get() = noImpl
|
||||
|
||||
companion object {
|
||||
@JsName("g") fun f(): Int = noImpl
|
||||
@JsName("g")
|
||||
fun f(): Int = noImpl
|
||||
|
||||
@JsName("q") val p: Int get() = noImpl
|
||||
@JsName("q")
|
||||
val p: Int get() = noImpl
|
||||
}
|
||||
}
|
||||
|
||||
@JsName("P") @native object O {
|
||||
@JsName("P")
|
||||
external object O {
|
||||
fun f(): Int = noImpl
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package foo
|
||||
|
||||
@native class A {
|
||||
external class A {
|
||||
val xx: Int
|
||||
@JsName("getX") get
|
||||
|
||||
@@ -9,7 +9,7 @@ package foo
|
||||
@JsName("setY") set
|
||||
}
|
||||
|
||||
@native var zz: Int
|
||||
external var zz: Int
|
||||
@JsName("getZ") get
|
||||
@JsName("setZ") set
|
||||
|
||||
|
||||
Reference in New Issue
Block a user