Skip to content

Sema: Avoid diagnosing missing imports for desugared typealiases in non-resilient modules #63278

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

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
Copy link
Contributor Author

@swift-ci please smoke test

…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 force-pushed the avoid-diagnosing-missing-import-for-desugared-typealias-in-non-resilient-modules branch from cd642ed to d4abf8f Compare January 29, 2023 16:53
@tshortli
Copy link
Contributor Author

@swift-ci please smoke test

@tshortli tshortli merged commit 484847e into swiftlang:main Jan 30, 2023
@tshortli tshortli deleted the avoid-diagnosing-missing-import-for-desugared-typealias-in-non-resilient-modules branch January 30, 2023 16:10
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