Avatar
↓って extension Array: IntCollection {} 前提での話?? protocol IntCollection: RangeReplaceableCollection where Self.Element == Int {} let array: IntCollection = [3, 1, 4, 1, 5] array.append(9) // OK, 'Self.Element' is known to be 'Int'. https://github.com/apple/swift-evolution/blob/main/proposals/0309-unlock-existential-types-for-all-protocols.md#proposed-solution
This maintains proposals for changes and user-visible enhancements to the Swift Programming Language. - apple/swift-evolution