mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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.
349 B
349 B