Skip to content
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

[SR-13892] Improve diagnostics involving "covariant 'Self'" #56289

Open
typesanitizer opened this issue Nov 24, 2020 · 1 comment
Open

[SR-13892] Improve diagnostics involving "covariant 'Self'" #56289

typesanitizer opened this issue Nov 24, 2020 · 1 comment
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation improvement type checker Area → compiler: Semantic analysis

Comments

@typesanitizer
Copy link

Previous ID SR-13892
Radar rdar://problem/71694596
Original Reporter @typesanitizer
Type Improvement
Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Improvement, DiagnosticsQoI, TypeChecker
Assignee None
Priority Medium

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.

@typesanitizer
Copy link
Author

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation improvement type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

1 participant