File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -3669,7 +3669,8 @@ namespace {
3669
3669
int compareWithKey (const Key other) const {
3670
3670
if (auto r = comparePointers (other.protocol , key.protocol ))
3671
3671
return r;
3672
- return strcmp (other.type ->Name .get (), key.type ->Name .get ());
3672
+
3673
+ return TypeContextIdentity (other.type ).compare (TypeContextIdentity (key.type ));
3673
3674
}
3674
3675
3675
3676
static size_t getExtraAllocationSize (const Key,
Original file line number Diff line number Diff line change
1
+ // RUN: %target-run-simple-swift
2
+ // REQUIRES: executable_test
3
+ // REQUIRES: objc_interop
4
+
5
+ import StdlibUnittest
6
+ import Foundation
7
+
8
+ let conformanceUniquingTests = TestSuite ( " ConformanceUniquing " )
9
+
10
+ func isSimpleSetAlgebra< T: SetAlgebra > ( _: T . Type ) -> Bool {
11
+ return T . self == T . Element. self
12
+ }
13
+
14
+ // rdar://problem/46685973
15
+ conformanceUniquingTests. test ( " Nested types with the same name " ) {
16
+ expectTrue ( isSimpleSetAlgebra ( NSData . WritingOptions. self) )
17
+ expectTrue ( isSimpleSetAlgebra ( JSONSerialization . WritingOptions. self) )
18
+ }
19
+
20
+ runAllTests ( )
You can’t perform that action at this time.
0 commit comments