Files
swift-mirror/validation-test/Serialization/Inputs/SR5191-other.swift
Jordan Rose f5a6ac96cb [test] Add a test for the tricky circularity in SR-5191. (#11685)
This was fixed by 897effe, which I had originally thought would be a
no-functionality-change commit because it just made things lazier.
Turns out requirement signature deserialization can result in
circularity with sufficiently cross-referential conformances.

This isn't exactly a reduced test case because it still depends on
subclassing NSObject, which probably means there are hidden
dependencies on conforming to standard library protocols. But it's
better than nothing.

https://bugs.swift.org/browse/SR-5191
2017-08-29 16:51:51 -07:00

18 lines
257 B
Swift

protocol FooBaseProto {}
protocol FooProto: FooBaseProto {}
protocol BarProto {
associatedtype Foo: FooProto
init(foo: Foo)
}
protocol BazProto {
associatedtype Bar: BarProto
init(bar: Bar)
}
struct BarImpl: BarProto {
init(foo: FooImpl) {}
}