Skip to content

[5.1 04-24-2019] Sema: don't consider opaque types distinct for overloading purposes. #24305

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

Conversation

jckarter
Copy link
Contributor

This is necessary because:

func foo() -> some P
func foo() -> some P

theoretically defines two distinct return types, but there'd be no way to disambiguate them. Disallow overloading only by opaque return type.

This is necessary because:

```
func foo() -> some P
func foo() -> some P
```

theoretically defines two distinct return types, but there'd be no way to disambiguate them. Disallow overloading only by opaque return type.
@jckarter jckarter requested a review from a team as a code owner April 26, 2019 03:52
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 359ea9e

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 359ea9e

@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter
Copy link
Contributor Author

I had to pull in @Jumhyn's fix in #23457 since, previously, we apparently didn't correctly handle overload checking on subscripts at all.

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 359ea9e

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 359ea9e

@jckarter jckarter merged commit e60279b into swiftlang:swift-5.1-branch-04-24-2019 Apr 29, 2019
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.

4 participants