Skip to content

Commit 62c0a33

Browse files
committed
[cxx-interop] Add test for an already-fixed IRGen crash
resolves swiftlang#57308
1 parent 3e637b0 commit 62c0a33

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#import <Foundation/Foundation.h>
2+
3+
struct HasIdMember {
4+
id i;
5+
};
6+
7+
HasIdMember getHasIdMember();

test/Interop/Cxx/objc-correctness/Inputs/module.modulemap

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,9 @@ module NSTextCheckingResult {
3838
module MockPOSIX {
3939
header "POSIX.h"
4040
}
41+
42+
module ID {
43+
header "id.h"
44+
requires objc
45+
requires cplusplus
46+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: %target-swift-emit-ir -I %S/Inputs -cxx-interoperability-mode=default %s
2+
3+
// REQUIRES: objc_interop
4+
5+
import ID
6+
7+
let v = getHasIdMember()

0 commit comments

Comments
 (0)