mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: add the possibility to compare SubstitutionMaps
This commit is contained in:
@@ -73,4 +73,8 @@ public struct SubstitutionMap: CustomStringConvertible, NoReflectionChildren {
|
||||
assert(replacementTypes.count == 1)
|
||||
return replacementTypes[0]
|
||||
}
|
||||
|
||||
public static func ==(lhs: SubstitutionMap, rhs: SubstitutionMap) -> Bool {
|
||||
lhs.bridged.isEqualTo(rhs.bridged)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3171,6 +3171,7 @@ struct BridgedSubstitutionMap {
|
||||
BRIDGED_INLINE BridgedSubstitutionMap();
|
||||
BridgedOwnedString getDebugDescription() const;
|
||||
BRIDGED_INLINE bool isEmpty() const;
|
||||
BRIDGED_INLINE bool isEqualTo(BridgedSubstitutionMap rhs) const;
|
||||
BRIDGED_INLINE bool hasAnySubstitutableParams() const;
|
||||
BRIDGED_INLINE SwiftInt getNumConformances() const;
|
||||
SWIFT_IMPORT_UNSAFE BRIDGED_INLINE BridgedConformance getConformance(SwiftInt index) const;
|
||||
|
||||
@@ -759,6 +759,10 @@ bool BridgedSubstitutionMap::isEmpty() const {
|
||||
return unbridged().empty();
|
||||
}
|
||||
|
||||
bool BridgedSubstitutionMap::isEqualTo(BridgedSubstitutionMap rhs) const {
|
||||
return unbridged() == rhs.unbridged();
|
||||
}
|
||||
|
||||
bool BridgedSubstitutionMap::hasAnySubstitutableParams() const {
|
||||
return unbridged().hasAnySubstitutableParams();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user