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
98
98
};
99
99
100
100
static bool equalWithoutExistentialTypes (Type t1, Type t2) {
101
- auto withoutExistentialTypes = [](Type type) -> Type {
101
+ static Type (* withoutExistentialTypes)(Type) = [](Type type) -> Type {
102
102
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
+ }
105
106
return type;
106
107
});
107
108
};
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