[SR-5275] Can't implement BinaryInteger without _word(at:) #47850
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
standard library
Area: Standard library umbrella
Environment
Apple Swift version 4.0 (swiftlang-900.0.43 clang-900.0.22.8)
Additional Detail from JIRA
md5: 81b930ef627c55646f7e09941a8595e8
Issue Description:
While updating my BigInt package for the nice new integer protocols in Swift 4, I noticed that the
BinaryInteger
protocol still defines_word(at:)
as a required method, and provides an extension that implementswords
in terms of it.This makes it impossible to implement
BinaryInteger
in third-party packages without touching underscored API.The third revision of SE-0104 defines
words
as the required member, and removes the previousword(at:)
API. The following comment in Integers.swift.gyb:1891 indicates this is a known limitation in current stdlib:The text was updated successfully, but these errors were encountered: