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-11377] _NativeClass layout constraint leaks into diagnostics #53778

Closed
swift-ci opened this issue Aug 26, 2019 · 2 comments
Closed

[SR-11377] _NativeClass layout constraint leaks into diagnostics #53778

swift-ci opened this issue Aug 26, 2019 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-11377
Radar rdar://problem/88519088
Original Reporter owenvoorhees (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI
Assignee None
Priority Medium

md5: 94dd0628e4fb8057c4c5cb4446456564

Issue Description:

If I write:

class MyClass {}
protocol MyProto: AnyObject, MyClass {}

The resulting error:

/Users/owenvoorhees/Desktop/hello.swift:5:27: warning: redundant constraint 'Self' : 'AnyObject' [redundant_layout_constraint]
public protocol SubProto: AnyObject, MyClass {}
                          ^
/Users/owenvoorhees/Desktop/hello.swift:5:38: note: constraint 'Self' : '_NativeClass' implied here [previous_layout_constraint]
public protocol SubProto: AnyObject, MyClass {}
                                     ^

Refers to the _NativeClass constraint. This is technically correct, but probably not the best way to present this to the user.

@slavapestov
Copy link
Member

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@slavapestov
Copy link
Member

Redundant requirement warnings are now disabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation
Projects
None yet
Development

No branches or pull requests

2 participants