swift
3ef16007 - Sema: Add an access level to the fix-its for missing imports when appropriate.

Commit
1 year ago
Sema: Add an access level to the fix-its for missing imports when appropriate. When emitting fix-its for missing imports, include an access level when the module has been imported with an access level in other source files. For now, the suggested access level for will always be `internal`, even when uses of members in the file would actually require `public` or `package` visibility. In order to suggest the correct access level, name lookup will need to be refactored to repair references to inaccessible declarations, instead of leaving error nodes in the AST. In anticipation of that refactoring of name lookup, missing import diagnostics are now delayed until type checking a source file is finished so that a consistent access level can be suggested for each import fix-it for a given module. Partially resolves rdar://126637855.
Author
Committer
Parents
Loading