File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
test/AssociatedTypeInference Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -4683,7 +4683,10 @@ void ConformanceChecker::resolveSingleWitness(ValueDecl *requirement) {
46834683 ReferencedAssociatedTypesRequest{requirement},
46844684 TinyPtrVector<AssociatedTypeDecl *>());
46854685 for (auto assocType : referenced) {
4686- if (Conformance->getTypeWitness (assocType)->hasError ()) {
4686+ auto typeWitness = Conformance->getTypeWitness (assocType);
4687+ if (!typeWitness)
4688+ return ;
4689+ if (typeWitness->hasError ()) {
46874690 Conformance->setInvalid ();
46884691 return ;
46894692 }
Original file line number Diff line number Diff line change 1+ // RUN: %target-swift-frontend -emit-ir %s
2+
3+ // https://github.com/swiftlang/swift/issues/75371
4+
5+ public protocol MyProtocol {
6+ associatedtype Value = Self
7+
8+ static var originalValue : Value { get }
9+ static var copyValue : Value { get }
10+ }
11+
12+ public struct MyStruct : MyProtocol { }
13+
14+ extension MyStruct {
15+ public static let originalValue = Self ( )
16+ public static let copyValue = originalValue
17+ }
18+
You can’t perform that action at this time.
0 commit comments