FIR: use default getter in serializer if fir contains none
since we generate the default getter in this case in Fir2IrDeclarationStorage.createIrProperty, so the serialized metadata should follow the same behavior. #KT-57373 fixed
This commit is contained in:
committed by
Space Team
parent
913b55174d
commit
a045a0a81c
@@ -1294,6 +1294,27 @@ __attribute__((swift_name("Kt56521Kt")))
|
||||
@property (class) int32_t initialized __attribute__((swift_name("initialized")));
|
||||
@end
|
||||
|
||||
__attribute__((swift_name("IKt57373")))
|
||||
@protocol KtIKt57373
|
||||
@required
|
||||
@property (readonly) int32_t bar __attribute__((swift_name("bar")));
|
||||
@end
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
__attribute__((swift_name("DKt57373")))
|
||||
@interface KtDKt57373 : KtBase <KtIKt57373>
|
||||
- (instancetype)initWithFoo:(id<KtIKt57373>)foo __attribute__((swift_name("init(foo:)"))) __attribute__((objc_designated_initializer));
|
||||
@property (readonly) int32_t bar __attribute__((swift_name("bar")));
|
||||
@end
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
__attribute__((swift_name("CKt57373")))
|
||||
@interface KtCKt57373 : KtBase <KtIKt57373>
|
||||
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
|
||||
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
|
||||
@property (readonly) int32_t bar __attribute__((swift_name("bar")));
|
||||
@end
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
__attribute__((swift_name("LibraryKt")))
|
||||
@interface KtLibraryKt : KtBase
|
||||
|
||||
@@ -1294,6 +1294,27 @@ __attribute__((swift_name("Kt56521Kt")))
|
||||
@property (class) int32_t initialized __attribute__((swift_name("initialized")));
|
||||
@end
|
||||
|
||||
__attribute__((swift_name("IKt57373")))
|
||||
@protocol KtIKt57373
|
||||
@required
|
||||
@property (readonly) int32_t bar __attribute__((swift_name("bar")));
|
||||
@end
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
__attribute__((swift_name("DKt57373")))
|
||||
@interface KtDKt57373 : KtBase <KtIKt57373>
|
||||
- (instancetype)initWithFoo:(id<KtIKt57373>)foo __attribute__((swift_name("init(foo:)"))) __attribute__((objc_designated_initializer));
|
||||
@property (readonly) int32_t bar __attribute__((swift_name("bar")));
|
||||
@end
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
__attribute__((swift_name("CKt57373")))
|
||||
@interface KtCKt57373 : KtBase <KtIKt57373>
|
||||
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
|
||||
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
|
||||
@property (readonly) int32_t bar __attribute__((swift_name("bar")));
|
||||
@end
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
__attribute__((swift_name("LibraryKt")))
|
||||
@interface KtLibraryKt : KtBase
|
||||
|
||||
@@ -1294,6 +1294,27 @@ __attribute__((swift_name("Kt56521Kt")))
|
||||
@property (class) int32_t initialized __attribute__((swift_name("initialized")));
|
||||
@end
|
||||
|
||||
__attribute__((swift_name("IKt57373")))
|
||||
@protocol KtIKt57373
|
||||
@required
|
||||
@property (readonly) int32_t bar __attribute__((swift_name("bar")));
|
||||
@end
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
__attribute__((swift_name("DKt57373")))
|
||||
@interface KtDKt57373 : KtBase <KtIKt57373>
|
||||
- (instancetype)initWithFoo:(id<KtIKt57373>)foo __attribute__((swift_name("init(foo:)"))) __attribute__((objc_designated_initializer));
|
||||
@property (readonly) int32_t bar __attribute__((swift_name("bar")));
|
||||
@end
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
__attribute__((swift_name("CKt57373")))
|
||||
@interface KtCKt57373 : KtBase <KtIKt57373>
|
||||
- (instancetype)init __attribute__((swift_name("init()"))) __attribute__((objc_designated_initializer));
|
||||
+ (instancetype)new __attribute__((availability(swift, unavailable, message="use object initializers instead")));
|
||||
@property (readonly) int32_t bar __attribute__((swift_name("bar")));
|
||||
@end
|
||||
|
||||
__attribute__((objc_subclassing_restricted))
|
||||
__attribute__((swift_name("LibraryKt")))
|
||||
@interface KtLibraryKt : KtBase
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
interface IKt57373 {
|
||||
val bar: Int
|
||||
}
|
||||
|
||||
class DKt57373(foo: IKt57373) : IKt57373 by foo
|
||||
|
||||
class CKt57373 : IKt57373 {
|
||||
override val bar: Int = 42
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
import Kt
|
||||
|
||||
func testKt57373() throws {
|
||||
let impl = CKt57373()
|
||||
let x = DKt57373(foo: impl)
|
||||
try assertEquals(actual: x.bar, expected: 42)
|
||||
}
|
||||
|
||||
class Kt57373Tests : SimpleTestProvider {
|
||||
override init() {
|
||||
super.init()
|
||||
|
||||
test("testKt57373", testKt57373)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user