mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Some APIs that expected a String now expect a Substring and vice versa. To ease the transition, emit fix-its on conversion errors between these types that the migrator can pick up. When converting from Substring -> String, suggest wrapping in `String.init`. When converting from String -> Substring, suggest appending the void subscript `[]`. (This isn't implemented yet so this is hidden behind a flag). This can possibly be generalized later when converting between some sequence and its subsequence, such as Array and ArraySlice, for example. rdar://problem/31665649 rdar://problem/31666638
63 KiB
63 KiB