File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -98,10 +98,11 @@ class EqualUpToClangTypes
9898};
9999
100100static bool equalWithoutExistentialTypes (Type t1, Type t2) {
101- auto withoutExistentialTypes = [](Type type) -> Type {
101+ static Type (* withoutExistentialTypes)(Type) = [](Type type) -> Type {
102102 return type.transform ([](Type type) -> Type {
103- if (auto existential = type->getAs <ExistentialType>())
104- return existential->getConstraintType ();
103+ if (auto existential = type->getAs <ExistentialType>()) {
104+ return withoutExistentialTypes (existential->getConstraintType ());
105+ }
105106 return type;
106107 });
107108 };
Original file line number Diff line number Diff line change 1+ // RUN: %target-build-swift -g %s
2+
3+ // https://github.com/apple/swift/issues/66554
4+ // IRGenDebugInfo type reconstruction crash because existential types
5+ // inside typealias are not taken into account when comparing type
6+ // equality
7+
8+ protocol Protocol < T> { associatedtype T }
9+ typealias AnyProtocol < T> = any Protocol < T >
10+ let crash : AnyProtocol < Any ? >
You can’t perform that action at this time.
0 commit comments