mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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
18 lines
257 B
Swift
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) {}
|
|
}
|