Skip to content

[5.8] Sema: Avoid diagnosing missing imports for desugared typealiases in non-resilient modules #63279

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

tshortli
Copy link
Contributor

@tshortli tshortli commented Jan 28, 2023

Cherry-pick of #63278.

The following diagnostic is meant to prevent broken swiftinterfaces from being emitted:

'SomeAlias' aliases 'SomeDesugaredType' and cannot be used here because 'DesugaredTypeModule' was not imported by this file; this is an error in Swift 6

If the module exporting the reference to the typealias is non-resilient, though, then the module is not expected to have a buildable swiftinterface and therefore the diagnostic is superfluous.

Resolves rdar://104749045

…on-resilient modules.

The following diagnostic is meant to prevent broken swiftinterfaces from being emitted:

```
'SomeAlias' aliases 'SomeDesugaredType' and cannot be used here because 'DesugaredTypeModule' was not imported by this file; this is an error in Swift 6
```

If the module exporting the reference to the typealias is non-resilient, though, then the module is not expected to have a buildable `swiftinterface` and therefore the diagnostic is superfluous.

Resolves rdar://104749045
@tshortli tshortli added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.8 labels Jan 28, 2023
@tshortli
Copy link
Contributor Author

@swift-ci please test

@tshortli tshortli requested a review from nkcsgexi January 28, 2023 01:34
@tshortli tshortli merged commit 548a773 into swiftlang:release/5.8 Jan 30, 2023
@tshortli tshortli deleted the avoid-diagnosing-missing-import-for-desugared-typealias-in-non-resilient-modules-5.8 branch January 30, 2023 16:09
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants