mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
The various _*Indexable protocols only exist to work around the lack of recursive protocol constraints. Eliminate all of the *_Indexable protocols, collapsing their requirements into the corresponding Collection protocol (e.g., _MutableIndexable —> Collection). This introduces a number of extraneous requirements into the various Collection protocols to work around bugs in associated type inference. Specifically, to work around the lack of "global" inference of associated type witnesses. These hacks were implicitly present in the *Indexable protocols; I've made marked them as ABI FIXMEs here so we can remove them when associated type inference improves. Fixes rdar://problem/21935030 and a number of ABI FIXMEs in the library.
10 lines
507 B
Swift
10 lines
507 B
Swift
// This source file is part of the Swift.org open source project
|
|
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
|
|
// RUN: not %target-swift-frontend %s -emit-ir
|
|
protocol A:Collection}extension CountableRange{protocol P{protocol P{struct a:A{}typealias a:A}{}typealias e:P
|