Fixed KT-15270 Quickfix to migrate from @native***
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
@<caret>native
|
||||
class B {
|
||||
@nativeGetter
|
||||
fun foo(i: Int): B?
|
||||
|
||||
@nativeSetter
|
||||
fun foo(i: Int, v: B)
|
||||
|
||||
@nativeInvoke
|
||||
fun bar(a: B)
|
||||
|
||||
@nativeInvoke
|
||||
fun<T> exp(t: T)
|
||||
|
||||
fun dontTouch(): Nothing = definedExternally
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
external class B {
|
||||
|
||||
fun dontTouch(): Nothing = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.foo(i: Int): B? = asDynamic()[i]
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.foo(i: Int, v: B) {
|
||||
asDynamic()[i] = v
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.bar(a: B) {
|
||||
asDynamic()(a)
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun <T> B.exp(t: T) {
|
||||
asDynamic()(t)
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
@<caret>native
|
||||
class B {
|
||||
@nativeGetter
|
||||
fun foo(i: Int): B?
|
||||
|
||||
@na<caret>tiveSetter
|
||||
fun foo(i: Int, v: B)
|
||||
|
||||
@nativeInvoke
|
||||
fun bar(a: B)
|
||||
|
||||
@nativeInvoke
|
||||
fun<T> exp(t: T)
|
||||
|
||||
fun dontTouch(): Nothing = definedExternally
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
external class B {
|
||||
|
||||
fun dontTouch(): Nothing = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.foo(i: Int): B? = asDynamic()[i]
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.foo(i: Int, v: B) {
|
||||
asDynamic()[i] = v
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.bar(a: B) {
|
||||
asDynamic()(a)
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun <T> B.exp(t: T) {
|
||||
asDynamic()(t)
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
external class B {
|
||||
@nativeGetter
|
||||
fun foo(i: Int): B?
|
||||
|
||||
@nati<caret>veSetter
|
||||
fun foo(i: Int, v: B)
|
||||
|
||||
@nativeInvoke
|
||||
fun bar(a: B)
|
||||
|
||||
@nativeInvoke
|
||||
fun<T> exp(t: T)
|
||||
|
||||
fun dontTouch(): Nothing = definedExternally
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
external class B {
|
||||
|
||||
fun dontTouch(): Nothing = definedExternally
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.foo(i: Int): B? = asDynamic()[i]
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.foo(i: Int, v: B) {
|
||||
asDynamic()[i] = v
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.bar(a: B) {
|
||||
asDynamic()(a)
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun <T> B.exp(t: T) {
|
||||
asDynamic()(t)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
@native
|
||||
class B {
|
||||
@na<caret>tiveSetter
|
||||
fun foo(i: Int, v: B)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
external class B {
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.foo(i: Int, v: B) {
|
||||
asDynamic()[i] = v
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
@native
|
||||
class B {
|
||||
@na<caret>tiveInvoke
|
||||
fun bar(a: B)
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
external class B {
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.bar(a: B) {
|
||||
asDynamic()(a)
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
class A
|
||||
|
||||
@native
|
||||
class B<T: A> {
|
||||
@nat<caret>iveInvoke
|
||||
fun exp(t: T)
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
class A
|
||||
|
||||
external class B<T: A> {
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun <T : A> B<T>.exp(t: T) {
|
||||
asDynamic()(t)
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
class A
|
||||
|
||||
@native
|
||||
class B<T: A> {
|
||||
@nat<caret>iveInvoke
|
||||
fun<T2> exp(t: T, t2: T2)
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
class A
|
||||
|
||||
external class B<T: A> {
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun <T : A, T2> B<T>.exp(t: T, t2: T2) {
|
||||
asDynamic()(t, t2)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
@native
|
||||
class B {
|
||||
@nat<caret>iveInvoke
|
||||
fun<T> exp(t: T)
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
external class B {
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun <T> B.exp(t: T) {
|
||||
asDynamic()(t)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
@native
|
||||
class B {
|
||||
@na<caret>tive("xx")
|
||||
fun aaaa() // remove @native
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
external class B {
|
||||
@JsName("xx")
|
||||
fun aaaa() // remove @native
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
@native
|
||||
class B {
|
||||
@nat<caret>iveGetter
|
||||
fun foo(i: Int): B?
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
// JS
|
||||
|
||||
external class B {
|
||||
}
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun B.foo(i: Int): B? = asDynamic()[i]
|
||||
Reference in New Issue
Block a user