Skip to content

Commit 6aa0572

Browse files
authored
Merge pull request swiftlang#34030 from DougGregor/sr-10251-testcase
[SR-10251] Add test case for a bug that's already been fixed.
2 parents 0b9793e + fb86fb3 commit 6aa0572

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/Generics/associated_types_inherit.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
// RUN: %target-typecheck-verify-swift
22

3-
class C {
3+
class C {
44
func f() {}
55
}
66

7-
class D : C {
7+
class D : C {
88
}
99

1010
class E { }
@@ -30,3 +30,11 @@ func testP<T:P>(_ t: T) {
3030
func callTestP(_ x1: X1) {
3131
testP(x1)
3232
}
33+
34+
// SR-10251: unable to infer associated type in child protocol
35+
protocol P2 { associatedtype T }
36+
37+
protocol P3: P2 where T == Self {}
38+
39+
enum C3: P3 {} // correct, might be an error
40+

0 commit comments

Comments
 (0)