[SR-5208] Conformance to RangeReplaceableCollection permitted without implementation of replaceSubrange #47784
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)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: 8242e39473a64a40c660ef8fa30c9216
duplicates:
Issue Description:
The following compiles:
As the default implementation of replaceSubrange that takes an arbitrary RangeExpression and converts it to a Range<Index> is used to satisfy the replaceSubrange requirement – therefore leading to recursion when attempting to call, which isn't particularly intuitive.
Ideally, RangeReplaceableCollection should enforce that replaceSubrange is implemented.
The text was updated successfully, but these errors were encountered: