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-11902] Improve Error Message for Auto-synthesized Equatable Conformance on Classes #54319

Closed
CodaFi opened this issue Dec 5, 2019 · 1 comment
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers improvement type checker Area → compiler: Semantic analysis

Comments

@CodaFi
Copy link
Member

CodaFi commented Dec 5, 2019

Previous ID SR-11902
Radar rdar://57316058
Original Reporter @CodaFi
Type Improvement
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, DiagnosticsQoI, StarterBug, TypeChecker
Assignee mkita (JIRA)
Priority Medium

md5: 45d88fe5e23eebe7be372cd9482e022c

Issue Description:

Equatable Synthesis is currently restricted to structs and enums chiefly because inheritance complicates our efforts here enormously. We currently don't surface this fact when a class is declared without the == value witness:

class Foo: Equatable {}

We could offer a note that describes the reason we can't offer this conformance automatically in addition to the protocol stubs notes.

The place to do this would be `DerivedConformance::diagnoseFailedDerivation`.

@swift-ci
Copy link
Collaborator

Comment by Maksim Kita (JIRA)

#28633 merged

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
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 good first issue Good for newcomers improvement type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants