Skip to content

Commit 32b2cfc

Browse files
authored
Merge pull request #15893 from huonw/redundant-via-concrete
[Don't merge] [GSB] withoutRedundantSubpath should leave Concrete RequirementSource as Concrete.
2 parents 9039587 + 7c435ad commit 32b2cfc

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

lib/AST/GenericSignatureBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1309,7 +1309,7 @@ const RequirementSource *RequirementSource::withoutRedundantSubpath(
13091309

13101310
case Concrete:
13111311
return parent->withoutRedundantSubpath(builder, start, end)
1312-
->viaParent(builder, getAssociatedType());
1312+
->viaConcrete(builder, getProtocolConformance());
13131313

13141314
case Derived:
13151315
return parent->withoutRedundantSubpath(builder, start, end)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// RUN: %target-typecheck-verify-swift %s
2+
3+
protocol _UnicodeParser_ {
4+
associatedtype Encoding: _UnicodeEncoding_
5+
}
6+
protocol _UnicodeEncoding_ {
7+
associatedtype CodeUnit : BinaryInteger_
8+
associatedtype ForwardParser : _UnicodeParser_
9+
where ForwardParser.Encoding == Self
10+
11+
}
12+
protocol BinaryInteger_ {
13+
associatedtype Words: Collection_ where Words.Index == Int_
14+
}
15+
protocol Collection_ {
16+
associatedtype Index: Comparable_
17+
}
18+
protocol Comparable_ {}
19+
struct Int_: Comparable_ {}

0 commit comments

Comments
 (0)