[SR-13892] Improve diagnostics involving "covariant 'Self'" #56289
Labels
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
improvement
type checker
Area → compiler: Semantic analysis
Additional Detail from JIRA
md5: 8c7922d3a5fa72593814951d5e61330a
Issue Description:
Confusion in forum post: https://forums.swift.org/t/why-error-covariant-self-type-cannot-be-referenced-from-a-stored-property-initializer/42235 involving the diagnostic
"covariant 'Self' type cannot be referenced from a stored property initializer"
It is not necessarily obvious to a developer what this means. We should do some combination of rewording the diagnostic, add an extra note explaining the issue, and maybe add a fix-it replacing 'Self' with the name of the class.
The text was updated successfully, but these errors were encountered: