[K/N] Implement FirNativeObjCOutletChecker and FirNativeObjCActionChecker
^KT-61564
This commit is contained in:
committed by
Space Team
parent
08bc0a6bd0
commit
c5aed2b094
+1
-1
@@ -8,5 +8,5 @@ import platform.Foundation.*
|
||||
class Zzz : NSAssertionHandler() {
|
||||
@OptIn(kotlinx.cinterop.BetaInteropApi::class)
|
||||
@ObjCAction
|
||||
fun String.foo() = println(this)
|
||||
fun <!MUST_NOT_HAVE_EXTENSION_RECEIVER!>String<!>.foo() = println(this)
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,5 +8,5 @@ import platform.Foundation.*
|
||||
class Zzz : NSAssertionHandler() {
|
||||
@OptIn(kotlinx.cinterop.BetaInteropApi::class)
|
||||
@ObjCAction
|
||||
fun foo(x: String) = println(x)
|
||||
fun foo(<!MUST_BE_OBJC_OBJECT_TYPE!>x: String<!>) = println(x)
|
||||
}
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ import platform.darwin.*
|
||||
import platform.Foundation.*
|
||||
|
||||
class Zzz : NSAssertionHandler() {
|
||||
@OptIn(kotlinx.cinterop.BetaInteropApi::class)
|
||||
<!MUST_BE_UNIT_TYPE!>@OptIn(kotlinx.cinterop.BetaInteropApi::class)
|
||||
@ObjCAction
|
||||
fun foo() = 42
|
||||
fun foo() = 42<!>
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@ import platform.Foundation.*
|
||||
|
||||
@OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
|
||||
class Zzz : NSAssertionHandler() {
|
||||
@OptIn(kotlinx.cinterop.BetaInteropApi::class)
|
||||
<!PROPERTY_MUST_BE_VAR!>@OptIn(kotlinx.cinterop.BetaInteropApi::class)
|
||||
@ObjCOutlet
|
||||
val x: NSObject get() = this
|
||||
val x: NSObject get() = this<!>
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import platform.Foundation.*
|
||||
class Zzz : NSAssertionHandler() {
|
||||
@OptIn(kotlinx.cinterop.BetaInteropApi::class)
|
||||
@ObjCOutlet
|
||||
var NSObject.x: NSObject
|
||||
var <!MUST_NOT_HAVE_EXTENSION_RECEIVER!>NSObject<!>.x: NSObject
|
||||
get() = this
|
||||
set(value: NSObject) { }
|
||||
}
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import platform.Foundation.*
|
||||
class Zzz : NSAssertionHandler() {
|
||||
@OptIn(kotlinx.cinterop.BetaInteropApi::class)
|
||||
@ObjCOutlet
|
||||
var x: String
|
||||
var x: <!MUST_BE_OBJC_OBJECT_TYPE!>String<!>
|
||||
get() = "zzz"
|
||||
set(value: String) { }
|
||||
}
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ import platform.darwin.*
|
||||
import platform.Foundation.*
|
||||
|
||||
class Zzz : NSAssertionHandler() {
|
||||
@OptIn(kotlinx.cinterop.BetaInteropApi::class)
|
||||
<!TWO_OR_LESS_PARAMETERS_ARE_SUPPORTED_HERE!>@OptIn(kotlinx.cinterop.BetaInteropApi::class)
|
||||
@ObjCAction
|
||||
fun foo(x: NSObject, y: NSObject, z: NSObject) { }
|
||||
fun foo(x: NSObject, y: NSObject, z: NSObject) { }<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user