[SR-6951] Dictionary subscripting doesn't play well with Substring #49499
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.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
Target: x86_64-apple-macosx10.9
Additional Detail from JIRA
md5: eeccbbe6390088990457b0ae8653f8b6
Issue Description:
If I have a
[String: Any]
I can't subscript this with aSubstring
without first copying the substring. This is a very obvious case of where the copy shouldn't be necessary (well, assigning to the subscript needs a copy, but the getter shouldn't).Filing at the request of @milseman.
The text was updated successfully, but these errors were encountered: