Skip to content

Commit 42e8491

Browse files
author
Max Moiseev
committed
[stdlib] Default implementation for BinaryInteger._word(at:)
Temporarily addresses https://bugs.swift.org/browse/SR-5275
1 parent 3fc134f commit 42e8491

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

stdlib/public/core/Integers.swift.gyb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,6 +1888,13 @@ extension BinaryInteger {
18881888
#endif
18891889

18901890
extension BinaryInteger {
1891+
// FIXME(integers): Should be removed once words get implemented properly.
1892+
// Meanhile it allows to conform to the BinaryInteger without implementing
1893+
// underscored APIs. https://bugs.swift.org/browse/SR-5275
1894+
public func _word(at n: Int) -> UInt {
1895+
fatalError("Should be overridden")
1896+
}
1897+
18911898
// FIXME(integers): inefficient. Should get rid of _word(at:) and
18921899
// countRepresentedWords, and make `words` the basic operation.
18931900
public var words: [UInt] {

0 commit comments

Comments
 (0)