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-14022] Simplify unused l-value diagnostics wording #56413

Closed
LucianoPAlmeida opened this issue Jan 7, 2021 · 3 comments
Closed

[SR-14022] Simplify unused l-value diagnostics wording #56413

LucianoPAlmeida opened this issue Jan 7, 2021 · 3 comments
Labels
compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation good first issue Good for newcomers improvement

Comments

@LucianoPAlmeida
Copy link
Collaborator

Previous ID SR-14022
Radar rdar://problem/72890751
Original Reporter @LucianoPAlmeida
Type Improvement
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, DiagnosticsQoI, StarterBug
Assignee mininny (JIRA)
Priority Medium

md5: 180690efa07d12e514e379ac1d6db3f6

Issue Description:

Cases like

func f() {
  var a: Int = 1
  a // warning: expression resolves to an unused variable
}

currently (on main) it produces a "expression resolves to an unused variable" diagnostic which as discussed here is a bit jargon-heavy.
So the idea is to improve the wording for this diagnostic `expression_unused_lvalue`

Here are few possible improvements:

  • "result produced from expression is unused"

  • "result value produced from expression is unused"

  • "result value of the expression is unused"

  • "expression result in an unused %select{variable|property|subscript}0"

@LucianoPAlmeida
Copy link
Collaborator Author

cc theindigamer (JIRA User)

@typesanitizer
Copy link

@swift-ci create

@LucianoPAlmeida
Copy link
Collaborator Author

Fixed by #35367
Thanks mininny (JIRA User)

@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
Projects
None yet
Development

No branches or pull requests

2 participants