Migration for JS extension functions and properties marked with @native/external
#KT-15269 Fixed
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
<caret>external fun A.bar(): Unit = noImpl
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun A.bar(): Unit = asDynamic().bar()
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
<caret>external fun A.bar(a: Int, b: String)
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun A.bar(a: Int, b: String): Unit = asDynamic().bar(a, b)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
<caret>external var A.baz: String
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
inline var A.baz: String
|
||||
get() = asDynamic().baz
|
||||
set(value) {
|
||||
asDynamic().baz = value
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class TS
|
||||
|
||||
@n<caret>ative
|
||||
fun TS.normalizePath(path: String): String {
|
||||
noImpl
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class TS
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun TS.normalizePath(path: String): String = asDynamic().normalizePath(path)
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
@n<caret>ative fun A.foo(): Int = noImpl
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun A.foo(): Int = asDynamic().foo()
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
<caret>@native fun A.foo(a: Int, b: String): Int
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun A.foo(a: Int, b: String): Int = asDynamic().foo(a, b)
|
||||
@@ -0,0 +1,5 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
@<caret>native val A.boo: Int
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Fix with 'asDynamic'" "true"
|
||||
|
||||
class A
|
||||
|
||||
inline val A.boo: Int
|
||||
get() = asDynamic().boo
|
||||
Reference in New Issue
Block a user