I wanted to post about this here since I can't file a bug right now, but also double-check that I'm not doing anything wrong.
If I have a C++ header with a enum class with the same name both in and out of a namespace, referencing the namespaced enum in an XCTest function will crash the test.
For example in a header:
enum class SameNameEnum { watermelon, apple, orange };
namespace sameName {
enum class SameNameEnum { watermelon, apple, orange };
} // namespace sameName
And then in a Swift xctest file:
func testClassEnumInOutNamespace_crashes() throws {
// Test the class enum not in a namespace.
let food = SameNameEnum.watermelon;
XCTAssertNotEqual(food, SameNameEnum.orange)
// Test the class enum in a namespace.
// CRASHES in XCTAssertNotEqual()
let moreFood = sameName.SameNameEnum.watermelon;
XCTAssertNotEqual(moreFood, sameName.SameNameEnum.orange)
}
Crashes in XCTAssertNotEqual
in swift_getAssociatedTypeWitnessSlowImpl()
.
Should I just hold onto this and file a bug in a week or two when everything is back to normal?
-pink