File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,16 @@ int PrivateFunction() __attribute__((swift_private));
3939
4040class PrivateClass {} __attribute__((swift_private));
4141
42+ class ClassWithImportedField {
43+ public:
44+ int field;
45+ };
46+
47+ class ClassWithUnimportedField {
48+ public:
49+ int field __attribute__ ((swift_private));
50+ };
51+
4252class Methods2 {
4353public:
4454 int SimpleMethod (int );
Original file line number Diff line number Diff line change @@ -34,4 +34,4 @@ func unimportedSwiftPrivateFunction() {
3434
3535func unimportedSwiftPrivateClass( ) {
3636 _ = PrivateClass ( ) // expected-error {{cannot find 'PrivateClass' in scope}}
37- }
37+ }
Original file line number Diff line number Diff line change 1+ // RUN: %empty-directory(%t)
2+ // RUN: %target-build-swift -Xfrontend -cxx-interoperability-mode=default -I %S/Inputs/custom-modules %s -o %t/a.out
3+ // RUN: %target-run %t/a.out
4+
5+ import CXXInterop
6+
7+ assert ( MemoryLayout< ClassWithImportedField> . size == MemoryLayout< ClassWithUnimportedField> . size,
8+ " ClassWithImportedField and ClassWithUnimportedField should have the same size. " )
You can’t perform that action at this time.
0 commit comments