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-10296] Warning about redundancy of internal(set) should only suggest to remove (set) part #52696

Closed
xedin opened this issue Apr 3, 2019 · 1 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 good first issue Good for newcomers

Comments

@xedin
Copy link
Member

xedin commented Apr 3, 2019

Previous ID SR-10296
Radar rdar://problem/49262203
Original Reporter @xedin
Type Bug
Status Resolved
Resolution Invalid
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI, StarterBug
Assignee None
Priority Medium

md5: dd542fbba38d47b87905fa7bc3bf234b

Issue Description:

Currently it's suggested to remove whole keyword e.g.

struct S {
  internal(set) var foo = 0
}

Produced following warning:

warning: 'internal(set)' modifier is redundant for an internal property
    internal(set) var foo = 0
    ^~~~~~~~~~~~~~

Instead fix-it should only remove `(set)` part and leave `internal`.

@belkadan
Copy link
Contributor

belkadan commented Apr 4, 2019

The current behavior is correct. The access control fix-its are aimed at an implicit-internal style, and writing, say, private(set) does not imply private.

@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
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 good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants