JS: replace all usages of @native annotation with external modifier, in tests, stdlib, etc

This commit is contained in:
Alexey Andreev
2016-11-25 12:36:47 +03:00
parent e0cb56b3c3
commit 68412ae94f
173 changed files with 486 additions and 651 deletions
@@ -1,16 +1,12 @@
@native
fun foo(a: String): Int = noImpl
external fun foo(a: String): Int = noImpl
@native
fun Int.foo(a: String): Int = noImpl
external fun Int.foo(a: String): Int = noImpl
@native
class Bar(b: Int, c: Char) {
external class Bar(b: Int, c: Char) {
fun baz(d: Int) {}
}
@native
object Obj {
external object Obj {
fun test1(e: String) {}
object Nested {
fun test2(g: Int) {}
@@ -1,9 +1,9 @@
package
@kotlin.js.native public fun foo(/*0*/ a: kotlin.String): kotlin.Int
@kotlin.js.native public fun kotlin.Int.foo(/*0*/ a: kotlin.String): kotlin.Int
public external fun foo(/*0*/ a: kotlin.String): kotlin.Int
public external fun kotlin.Int.foo(/*0*/ a: kotlin.String): kotlin.Int
@kotlin.js.native public final class Bar {
public final class Bar {
public constructor Bar(/*0*/ b: kotlin.Int, /*1*/ c: kotlin.Char)
public final fun baz(/*0*/ d: kotlin.Int): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
@@ -11,7 +11,7 @@ package
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@kotlin.js.native public object Obj {
public object Obj {
private constructor Obj()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -1,14 +1,13 @@
// !DIAGNOSTICS: -DEPRECATION
@nativeGetter
fun Int.foo(a: String): Int? = noImpl
@native
class Bar(b: Int, c: Char) {
external class Bar(b: Int, c: Char) {
@nativeGetter
fun baz(d: Int): Any? = noImpl
}
@native
object Obj {
external object Obj {
@nativeGetter
fun test1(e: String): String? = noImpl
@@ -2,7 +2,7 @@ package
@kotlin.js.nativeGetter public fun kotlin.Int.foo(/*0*/ a: kotlin.String): kotlin.Int?
@kotlin.js.native public final class Bar {
public final class Bar {
public constructor Bar(/*0*/ b: kotlin.Int, /*1*/ c: kotlin.Char)
@kotlin.js.nativeGetter public final fun baz(/*0*/ d: kotlin.Int): kotlin.Any?
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
@@ -10,7 +10,7 @@ package
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@kotlin.js.native public object Obj {
public object Obj {
private constructor Obj()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -1,14 +1,13 @@
// !DIAGNOSTICS: -DEPRECATION
@nativeInvoke
fun Int.foo(a: String): Int = noImpl
@native
class Bar(b: Int, c: Char) {
external class Bar(b: Int, c: Char) {
@nativeInvoke
fun baz(d: Int) {}
}
@native
object Obj {
external object Obj {
@nativeInvoke
fun test1(e: String) {}
@@ -2,7 +2,7 @@ package
@kotlin.js.nativeInvoke public fun kotlin.Int.foo(/*0*/ a: kotlin.String): kotlin.Int
@kotlin.js.native public final class Bar {
public final class Bar {
public constructor Bar(/*0*/ b: kotlin.Int, /*1*/ c: kotlin.Char)
@kotlin.js.nativeInvoke public final fun baz(/*0*/ d: kotlin.Int): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
@@ -10,7 +10,7 @@ package
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@kotlin.js.native public object Obj {
public object Obj {
private constructor Obj()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
@@ -1,14 +1,13 @@
// !DIAGNOSTICS: -DEPRECATION
@nativeSetter
fun Int.foo(a: String, v: Int): Int = noImpl
@native
class Bar(b: Int, c: Char) {
external class Bar(b: Int, c: Char) {
@nativeSetter
fun baz(d: Int, v: Int) {}
}
@native
object Obj {
external object Obj {
@nativeSetter
fun test1(e: String, v: Any) {}
@@ -2,7 +2,7 @@ package
@kotlin.js.nativeSetter public fun kotlin.Int.foo(/*0*/ a: kotlin.String, /*1*/ v: kotlin.Int): kotlin.Int
@kotlin.js.native public final class Bar {
public final class Bar {
public constructor Bar(/*0*/ b: kotlin.Int, /*1*/ c: kotlin.Char)
@kotlin.js.nativeSetter public final fun baz(/*0*/ d: kotlin.Int, /*1*/ v: kotlin.Int): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
@@ -10,7 +10,7 @@ package
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
@kotlin.js.native public object Obj {
public object Obj {
private constructor Obj()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int