mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
18 lines
585 B
Swift
18 lines
585 B
Swift
// RUN: %target-typecheck-verify-swift -debug-generic-signatures 2>&1 | %FileCheck %s
|
|
|
|
// https://github.com/apple/swift/issues/48296
|
|
|
|
protocol Foo
|
|
{
|
|
associatedtype Bar
|
|
var bar: Bar { get }
|
|
}
|
|
|
|
// CHECK: Generic signature: <Self where Self : Collection, Self : Foo, Self.[Foo]Bar : Collection, Self.[Collection]SubSequence == Self.[Foo]Bar.[Collection]SubSequence>
|
|
extension Foo where Self: Collection, Bar: Collection, Self.SubSequence == Bar.SubSequence, /*redundant: */Self.Index == Bar.Index {
|
|
subscript(_ bounds: Range<Index>) -> SubSequence
|
|
{
|
|
return bar[bounds]
|
|
}
|
|
}
|