Commit 0e8ef4c
committed
[cxx-interop] Update tests for mutable struct fields
Methods that are marked as `const` in C++ can still modify a field of the object if the field is marked as `mutable`.
We previously imported all methods of structs with mutable fields as mutating in Swift. Unfortunately this doesn't work well with libstdc++, which uses mutable fields for some commonly used container types.
Our current user model assumes that we trust the `const` keyword on a C++ method, and import them as non-mutating in Swift. Let's make sure the tests reflect that.1 parent 997a2b3 commit 0e8ef4c
File tree
3 files changed
+5
-26
lines changed- test/Interop/Cxx/class
3 files changed
+5
-26
lines changedLines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | | - | |
| 4 | + | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | | - | |
| 9 | + | |
12 | 10 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | | - | |
8 | | - | |
| 6 | + | |
| 7 | + | |
This file was deleted.
0 commit comments