Skip to content

Commit 8d1c3ff

Browse files
committed
[Associated type inference] Add now-fixed test for rdar://problem/16316115.
(cherry picked from commit a29d5d3)
1 parent 9d0d176 commit 8d1c3ff

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test/decl/protocol/req/associated_type_inference.swift

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,3 +485,18 @@ extension P18 where Self: P19 {
485485
}
486486

487487
struct X18<A> : P18 { }
488+
489+
// rdar://problem/16316115
490+
protocol HasAssoc {
491+
associatedtype Assoc
492+
}
493+
494+
struct DefaultAssoc {}
495+
496+
protocol RefinesAssocWithDefault: HasAssoc {
497+
associatedtype Assoc = DefaultAssoc
498+
}
499+
500+
struct Foo: RefinesAssocWithDefault {
501+
}
502+

0 commit comments

Comments
 (0)