Commit 7c35c88
committed
[CSSimplify] CGFloat-Double: Fix ambiguity when assigning CGFloat to double property/variable
Situations like:
```
let _: Double = <<CGFloat>>
<var/property of type Double> = <<CGFloat>>
```
Used to be supported due to an incorrect fix added in
diagnostic mode. Lower impact here means that right-hand
side of the assignment is allowed to maintain CGFloat
until the very end which minimizes the number of conversions
used and keeps literals as Double when possible.
Resolves: rdar://1396759141 parent 11f9ea7 commit 7c35c88
File tree
2 files changed
+63
-1
lines changed- lib/Sema
- validation-test/Sema
2 files changed
+63
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14664 | 14664 | | |
14665 | 14665 | | |
14666 | 14666 | | |
14667 | | - | |
| 14667 | + | |
14668 | 14668 | | |
14669 | 14669 | | |
14670 | 14670 | | |
14671 | 14671 | | |
14672 | 14672 | | |
14673 | 14673 | | |
| 14674 | + | |
| 14675 | + | |
| 14676 | + | |
| 14677 | + | |
| 14678 | + | |
| 14679 | + | |
| 14680 | + | |
| 14681 | + | |
| 14682 | + | |
| 14683 | + | |
| 14684 | + | |
| 14685 | + | |
| 14686 | + | |
14674 | 14687 | | |
14675 | 14688 | | |
14676 | 14689 | | |
| |||
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
0 commit comments