Skip to content

[ConstraintSystem] Tally implicit optional wraps into impact of point… #32029

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
May 27, 2020

Conversation

xedin
Copy link
Contributor

@xedin xedin commented May 26, 2020

…er mismatch

Impact of cases where pointer types mismatch after implict optional
wrap(s) should be higher than mismatch alone.

Distinguishing that helps to disambiguate following case (and other similar ones)
without using ranking:

func foo(_: UnsafePointer<Int>) {}
func foo(_: UnsafePointer<Int>?) {}

func test(_ ptr: UnsafePointer<Float>) {
  foo(ptr)
}

…er mismatch

Impact of cases where pointer types mismatch after implict optional
wrap(s) should be higher than mismatch alone.

Distinguishing that helps to disambiguate following case (and other similar ones)
without using ranking:

```swift
func foo(_: UnsafePointer<Int>) {}
func foo(_: UnsafePointer<Int>?) {}

func test(_ ptr: UnsafePointer<Float>) {
  foo(ptr)
}
```
@xedin xedin requested a review from hborla May 26, 2020 22:29
@xedin
Copy link
Contributor Author

xedin commented May 26, 2020

@swift-ci please smoke test

@xedin
Copy link
Contributor Author

xedin commented May 27, 2020

@swift-ci please smoke test Linux platform

@xedin xedin merged commit 9d322fe into swiftlang:master May 27, 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.

2 participants