JS: replace all usages of @native annotation with external modifier, in tests, stdlib, etc
This commit is contained in:
+11
-22
@@ -1,26 +1,18 @@
|
||||
// !DIAGNOSTICS: -UNREACHABLE_CODE
|
||||
// unreachable code suppressed due to KT-9586
|
||||
|
||||
@native
|
||||
val baz: Int
|
||||
@native
|
||||
val boo: Int = noImpl
|
||||
external val baz: Int
|
||||
external val boo: Int = noImpl
|
||||
|
||||
@native
|
||||
val Int.baz: Int
|
||||
external val Int.baz: Int
|
||||
|
||||
@native
|
||||
fun foo()
|
||||
@native
|
||||
fun bar() {}
|
||||
external fun foo()
|
||||
external fun bar() {}
|
||||
|
||||
@native
|
||||
fun String.foo(): Int
|
||||
@native
|
||||
fun String.bar(): Int = noImpl
|
||||
external fun String.foo(): Int
|
||||
external fun String.bar(): Int = noImpl
|
||||
|
||||
@native
|
||||
interface T {
|
||||
external interface T {
|
||||
val baz: Int
|
||||
|
||||
fun foo()
|
||||
@@ -35,8 +27,7 @@ interface T {
|
||||
}
|
||||
}
|
||||
|
||||
@native
|
||||
class C {
|
||||
external class C {
|
||||
val baz: Int
|
||||
val boo: Int = noImpl
|
||||
|
||||
@@ -52,8 +43,7 @@ class C {
|
||||
}
|
||||
}
|
||||
|
||||
@native
|
||||
object O {
|
||||
external object O {
|
||||
val baz: Int
|
||||
val boo: Int = noImpl
|
||||
|
||||
@@ -62,8 +52,7 @@ object O {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
@native
|
||||
class Local {
|
||||
external class Local {
|
||||
val baz: Int
|
||||
val boo: Int = noImpl
|
||||
|
||||
|
||||
+10
-10
@@ -1,15 +1,15 @@
|
||||
package
|
||||
|
||||
@kotlin.js.native public val baz: kotlin.Int
|
||||
@kotlin.js.native public val boo: kotlin.Int
|
||||
@kotlin.js.native public val kotlin.Int.baz: kotlin.Int
|
||||
@kotlin.js.native public fun bar(): kotlin.Unit
|
||||
@kotlin.js.native public fun foo(): kotlin.Unit
|
||||
public val baz: kotlin.Int
|
||||
public val boo: kotlin.Int
|
||||
public val kotlin.Int.baz: kotlin.Int
|
||||
public external fun bar(): kotlin.Unit
|
||||
public external fun foo(): kotlin.Unit
|
||||
public fun test(): kotlin.Unit
|
||||
@kotlin.js.native public fun kotlin.String.bar(): kotlin.Int
|
||||
@kotlin.js.native public fun kotlin.String.foo(): kotlin.Int
|
||||
public external fun kotlin.String.bar(): kotlin.Int
|
||||
public external fun kotlin.String.foo(): kotlin.Int
|
||||
|
||||
@kotlin.js.native public final class C {
|
||||
public final class C {
|
||||
public constructor C()
|
||||
public final val baz: kotlin.Int
|
||||
public final val boo: kotlin.Int
|
||||
@@ -31,7 +31,7 @@ public fun test(): kotlin.Unit
|
||||
}
|
||||
}
|
||||
|
||||
@kotlin.js.native public object O {
|
||||
public object O {
|
||||
private constructor O()
|
||||
public final val baz: kotlin.Int
|
||||
public final val boo: kotlin.Int
|
||||
@@ -42,7 +42,7 @@ public fun test(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
@kotlin.js.native public interface T {
|
||||
public interface T {
|
||||
public abstract val baz: kotlin.Int
|
||||
public open fun bar(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
// !DIAGNOSTICS: -DEPRECATION
|
||||
@nativeGetter
|
||||
fun String.foo(n: Int): Int?
|
||||
@nativeGetter
|
||||
fun String.bar(n: Int): Int? = noImpl
|
||||
|
||||
|
||||
@native
|
||||
interface T {
|
||||
external interface T {
|
||||
@nativeGetter
|
||||
fun foo(d: Double): String?
|
||||
@nativeGetter
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package
|
||||
@kotlin.js.nativeGetter public fun kotlin.String.bar(/*0*/ n: kotlin.Int): kotlin.Int?
|
||||
@kotlin.js.nativeGetter public fun kotlin.String.foo(/*0*/ n: kotlin.Int): kotlin.Int?
|
||||
|
||||
@kotlin.js.native public interface T {
|
||||
public interface T {
|
||||
@kotlin.js.nativeGetter public open fun bar(/*0*/ d: kotlin.Double): kotlin.String?
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@kotlin.js.nativeGetter public abstract fun foo(/*0*/ d: kotlin.Double): kotlin.String?
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
// !DIAGNOSTICS: -DEPRECATION
|
||||
@nativeInvoke
|
||||
fun String.foo(): Int
|
||||
@nativeInvoke
|
||||
fun String.bar(): Int = noImpl
|
||||
|
||||
|
||||
@native
|
||||
object O {
|
||||
external object O {
|
||||
@nativeInvoke
|
||||
fun foo()
|
||||
@nativeInvoke
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package
|
||||
@kotlin.js.nativeInvoke public fun kotlin.String.bar(): kotlin.Int
|
||||
@kotlin.js.nativeInvoke public fun kotlin.String.foo(): kotlin.Int
|
||||
|
||||
@kotlin.js.native public object O {
|
||||
public object O {
|
||||
private constructor O()
|
||||
@kotlin.js.nativeInvoke public final fun bar(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
// !DIAGNOSTICS: -DEPRECATION
|
||||
@nativeSetter
|
||||
fun String.foo(n: Int, v: Any)
|
||||
@nativeSetter
|
||||
fun String.bar(n: Int, v: Any) {}
|
||||
|
||||
|
||||
@native
|
||||
class C {
|
||||
external class C {
|
||||
@nativeSetter
|
||||
fun foo(d: Double, v: Any): Any
|
||||
@nativeSetter
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package
|
||||
@kotlin.js.nativeSetter public fun kotlin.String.bar(/*0*/ n: kotlin.Int, /*1*/ v: kotlin.Any): kotlin.Unit
|
||||
@kotlin.js.nativeSetter public fun kotlin.String.foo(/*0*/ n: kotlin.Int, /*1*/ v: kotlin.Any): kotlin.Unit
|
||||
|
||||
@kotlin.js.native public final class C {
|
||||
public final class C {
|
||||
public constructor C()
|
||||
@kotlin.js.nativeSetter public final fun bar(/*0*/ d: kotlin.Double, /*1*/ v: kotlin.Any): kotlin.Any
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
|
||||
Reference in New Issue
Block a user