[SR-13655] "Inconsistently imported as implementation-only" diagnostic unclear #56093
Labels
compiler
The Swift compiler itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
improvement
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: ad3dc1f93ade7ed3d2867519b11c7d1e
Issue Description:
If some files have normal imports and others have implementation-only imports for the same module, we ignore the
@_implementationOnly
attribute and emit warnings about the inconsistency. However, the warnings are vague and sound like they could just be some sort of style complaint:These warnings should clearly indicate that we are ignoring the
@_implementationOnly
attribute on other import statements because of this import. Perhaps something like:It may also make sense to customize the fix-its for this diagnostic in IDE mode—we could have one fix-it which adds
@_implementationOnly
wherever it's missing, and another that removes it wherever it's present.The text was updated successfully, but these errors were encountered: