File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
test/Interop/SwiftToCxx/structs Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ int main() {
40
40
// CHECK: find - small dump
41
41
// CURRENT-NEXT: x = 66
42
42
// CHANGE-NEXT: x&y = 0&65
43
+ copySmallStruct.mutate ();
44
+ copySmallStruct.dump ();
45
+ // CHECK: find - small dump
46
+ // CURRENT-NEXT: x = 132
47
+ // CHANGE-NEXT: x&y = 0&4294967230
43
48
44
49
printSmallAndLarge (smallStruct, largeStruct);
45
50
// CHECK: find - small dump
Original file line number Diff line number Diff line change @@ -16,6 +16,13 @@ public struct FirstSmallStruct {
16
16
print ( " x&y = \( x) & \( y) " )
17
17
#else
18
18
print ( " x = \( x) " )
19
+ #endif
20
+ }
21
+
22
+ public mutating func mutate( ) {
23
+ x = x * 2
24
+ #if CHANGE_LAYOUT
25
+ y = ~ y
19
26
#endif
20
27
}
21
28
}
@@ -61,6 +68,9 @@ public struct FirstSmallStruct {
61
68
// CHECK-NEXT: inline void FirstSmallStruct::dump() const {
62
69
// CHECK-NEXT: return _impl::$s7Structs16FirstSmallStructV4dumpyyF(_getOpaquePointer());
63
70
// CHECK-NEXT: }
71
+ // CHECK-NEXT: inline void FirstSmallStruct::mutate() {
72
+ // CHECK-NEXT: return _impl::$s7Structs16FirstSmallStructV6mutateyyF(_getOpaquePointer());
73
+ // CHECK-NEXT: }
64
74
65
75
@frozen public struct FrozenStruct {
66
76
private let storedInt : Int32
You can’t perform that action at this time.
0 commit comments