Skip to content

Conversation

@xedin
Copy link
Contributor

@xedin xedin commented Mar 8, 2020

… through argument conversions"

Reverts #30006. It caused a regression that we'd like to address before re-landing:

struct X {
  var cgf: CGFloat
}

func test(x: X?) {
  let _ = (x?.cgf ?? 0) <= 0.5
}

This reverts commit 0a6b444.
This reverts commit ed25559.
This reverts commit 3e01160.
This reverts commit 96297b7.

Resolves: rdar://problem/60185506

xedin added 2 commits March 7, 2020 20:16
… through argument conversions"

Reverts swiftlang#30006. It caused a regression that we'd like to address before re-landing:

```swift
struct X {
  var cgf: CGFloat
}

func test(x: X?) {
  let _ = (x?.cgf ?? 0) <= 0.5
}
```

This reverts commit 0a6b444.
This reverts commit ed25559.
This reverts commit 3e01160.
This reverts commit 96297b7.

Resolves: rdar://problem/60185506
@xedin
Copy link
Contributor Author

xedin commented Mar 8, 2020

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented Mar 8, 2020

I have also added a test-case to make sure that everything works correctly.

@xedin
Copy link
Contributor Author

xedin commented Mar 8, 2020

I figured out what the problem is - while comparing bindings it check for literal kind which is in one case Float and another one Atom even though Atom has better overall bindings it's still rejected.

@xedin xedin merged commit a1987ec into swiftlang:master Mar 8, 2020
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