Skip to content

Commit ad705b2

Browse files
committed
Not ambiguous after all.
1 parent bef73de commit ad705b2

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

proposals/0243-character-operators.md

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The Swift community previously considered single-quote syntax for character lite
1616

1717
This improvement was validated through our work on [PR 2439](https://github.com/apple/swift-syntax/pull/2439#issuecomment-1922292277). The patch showcased how to streamline character-binary integer interchange for low level code. This proposal offers the same readable solution that seamlessly integrates with the established character and style of Swift. Additionally, it provides a slight performance boost, making it a valuable enhancement for performant code.
1818

19-
To see of how the proposal simplifies code, consider how the PR above resulted in the following changes from:
19+
To see how the proposal simplifies code, consider how the PR above resulted in the following changes from:
2020

2121
```Swift
2222
switch self.previous {
@@ -159,17 +159,7 @@ This last initializer is optional. It provides an alternate to the existing `Int
159159

160160
## Source compatibility
161161

162-
Our proposed operator suite is additive. After running the existing test suite, it does change diagnostics on a limited part of pattern matching code. We believe this diagnostic information was already flawed, and the change inconsequential. Finally, the last initializer (the one we noted as optional) may affect currently valid code, such as the following:
163-
164-
```
165-
unicodeScalars.map(UInt32.init)
166-
```
167-
168-
Upon adoption, this becomes ambiguous and will need to be rewritten explicitly as:
169-
170-
```
171-
unicodeScalars.map { UInt32($0) }
172-
```
162+
Our proposed operator suite is additive. After running the existing test suite, it does change diagnostics on a limited part of invalid pattern matching code. We believe this diagnostic information was already flawed, and the change inconsequential.
173163

174164
## Effect on ABI stability
175165

0 commit comments

Comments
 (0)