Skip to content

[CSSimplify] CGFloat-Double: Fix ambiguity when assigning CGFloat to … #77592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Nov 13, 2024

…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://139675914

@xedin
Copy link
Contributor Author

xedin commented Nov 13, 2024

@swift-ci please test

…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://139675914
@xedin
Copy link
Contributor Author

xedin commented Nov 13, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Nov 13, 2024

@swift-ci please test source compatibility

@xedin
Copy link
Contributor Author

xedin commented Nov 19, 2024

@swift-ci please smoke test

2 similar comments
@xedin
Copy link
Contributor Author

xedin commented Nov 19, 2024

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Nov 20, 2024

@swift-ci please smoke test

@xedin xedin merged commit 9665b0d into swiftlang:main Nov 20, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant