[K/N] Add test for KT-63048, K1greenK2red
^KT-63048
This commit is contained in:
committed by
Space Team
parent
b6639ae128
commit
3ea4a6a937
@@ -0,0 +1,11 @@
|
||||
depends = Foundation
|
||||
language = Objective-C
|
||||
|
||||
---
|
||||
#import "Foundation/NSString.h"
|
||||
#import "Foundation/NSObject.h"
|
||||
|
||||
@interface WithClassProperty : NSObject
|
||||
-(instancetype) init;
|
||||
@property (class, readonly, copy) NSString * stringProperty;
|
||||
@end
|
||||
@@ -0,0 +1,15 @@
|
||||
@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class, kotlin.experimental.ExperimentalObjCName::class)
|
||||
|
||||
import library.*
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
@ObjCName("KotlinImplWithCompanionPropertyOverride")
|
||||
class Impl : WithClassProperty() {
|
||||
companion object : WithClassPropertyMeta() {
|
||||
override fun stringProperty(): String? = "42"
|
||||
}
|
||||
}
|
||||
|
||||
fun main() {
|
||||
assertEquals("42", Impl.stringProperty())
|
||||
}
|
||||
Reference in New Issue
Block a user