Files
kotlin-fork/kotlin-native/backend.native/tests/interop/forwardDeclarationsCast/b.m
T
Pavel Kunyavskiy 396cfb3956 [K/N] Make cast to objc forward declaration unchecked
Before this commit it caused compiler crash.
Unchecked cast warning to be done later.

^KT-59645
2023-07-05 06:49:34 +00:00

21 lines
401 B
Objective-C

#import "b.h"
@implementation ForwardDeclaredProtocolImpl : NSObject
@end;
@implementation ForwardDeclaredClass : NSObject
@end;
id<ForwardDeclaredProtocol> produceProtocol() {
return [ForwardDeclaredProtocolImpl new];
}
ForwardDeclaredClass* produceClass() {
return [ForwardDeclaredClass new];
}
struct ForwardDeclaredStruct S;
struct ForwardDeclaredStruct* produceStruct() {
return &S;
}