Skip to content

[5.7] Revert "[TypeChecker] Adjust Double<->CGFloat conversion to always pr… #59896

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
Jul 6, 2022

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jul 5, 2022

…eserve its location"

These changes broke a case where conversion is used in a literal array
element position passed as an argument to a call i.e.:

enum E {
  case test([CGFloat])
}

struct Container {
  var prop: E
}

struct Point {
  var x: Double
  var y: Double
}

func test(cont: inout Container, point: Point) {
  cont.prop = .test([point.x, point.y])
}

Reverting only from 5.7 and going to fix the issue on main.

Resolves: rdar://96469597

This reverts commit 7777e3a.

…eserve its location"

These changes broke a case where conversion is used in a literal array
element position passed as an argument to a call i.e.:

```
enum E {
  case test([CGFloat])
}

struct Container {
  var prop: E
}

struct Point {
  var x: Double
  var y: Double
}

func test(cont: inout Container, point: Point) {
  cont.prop = .test([point.x, point.y])
}
```

This reverts commit 7777e3a.
@xedin xedin requested a review from hborla July 5, 2022 22:14
@xedin xedin requested a review from a team as a code owner July 5, 2022 22:14
@xedin
Copy link
Contributor Author

xedin commented Jul 5, 2022

@swift-ci please test

@xedin xedin changed the title Revert "[TypeChecker] Adjust Double<->CGFloat conversion to always pr… [5.7] Revert "[TypeChecker] Adjust Double<->CGFloat conversion to always pr… Jul 5, 2022
@xedin xedin added the r5.7 label Jul 5, 2022
@xedin xedin merged commit f1c35d5 into swiftlang:release/5.7 Jul 6, 2022
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.7 labels Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.7
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants