"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.
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 1 | |Component/s | Compiler | |Labels | Improvement, DiagnosticsQoI, TypeChecker | |Assignee | None | |Priority | Medium | md5: 8c7922d3a5fa72593814951d5e61330aIssue 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.