mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
In https://github.com/swiftlang/swift/pull/84792 we have added implementation to `Equatable` and `Hashable` there are two issues with this. 1. Uses of type `GUID` would be emitted in the `swiftinterface` file as `_GUIDDef._GUID` since it is an external type. but the type name in the imported header file is `GUID` and not `_GUID` 2. When compiling using `-cxx-interoperability-mode=default`, there are duplicate definition errors for `==` since the c++ header file defines the same operator. Proposed changes: 1. Add a type alias `typealias _GUID = GUID` to address the naming mismatch in the generated interface file 2. Add conditional definitions of the equatable implementation to avoid duplicate definitions. --------- Co-authored-by: Jonathan Grynspan <grynspan@me.com>