swift
682f162f - C++ Interop: fix subscript operator tests

Commit
5 years ago
C++ Interop: fix subscript operator tests C++ structs that define a non-default copy constructor should actually copy their members in the copy constructor: Swift might copy the struct around, and if it does so after the `setValueAtIndex` call, the modification of `NonTrivialIntArrayByVal::values` won't propagate to the copied struct and these tests no longer pass: • `Interop/Cxx/operators/member-inline.swift` • `Interop/Cxx/operators/member-out-of-line.swift` The tests are currently passing on the main branch despite this, but they might fail after a seemingly unrelated change (which is how I discovered this).
Author
Committer
Parents
Loading