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

Bad symbol position if def is infix and rangepos is false #12074

Closed
som-snytt opened this issue Jul 7, 2020 · 5 comments · Fixed by scala/scala#9111
Closed

Bad symbol position if def is infix and rangepos is false #12074

som-snytt opened this issue Jul 7, 2020 · 5 comments · Fixed by scala/scala#9111
Assignees
Milestone

Comments

@som-snytt
Copy link

reproduction steps

using Scala 2.13.3,

[warn] /Users/.../NumericRangeTest.scala:66:63: local val nr in method t11152_BigDecimalMakesProgress is never used
[warn]       val nr = (BigDecimal("-7", mc2) to BigDecimal("7", mc2) by BigDecimal("0.01", mc2))
[warn]                                                               ^
[warn] /Users/.../NumericRangeTest.scala:67:33: local val upscale in method t11152_BigDecimalMakesProgress is never used
[warn]       val upscale = -700 to 700 by 1
[warn]                                 ^
[warn] two warnings found

problem

Normally it points to the unused identifier.

@SethTisue SethTisue added the lint label Jul 8, 2020
@SethTisue SethTisue added this to the Backlog milestone Jul 8, 2020
@som-snytt
Copy link
Author

The position is correct under -Yrangepos.

@som-snytt som-snytt added positions and removed lint labels Jul 10, 2020
@som-snytt som-snytt changed the title Bad caret position on unused local message Bad symbol position if def is infix and rangepos is off Jul 10, 2020
@som-snytt
Copy link
Author

Per previous comment.

@SethTisue SethTisue modified the milestones: Backlog, 2.13.4 Jan 6, 2021
@som-snytt som-snytt changed the title Bad symbol position if def is infix and rangepos is off Bad symbol position if def is infix and rangepos is disabled Feb 18, 2022
@som-snytt som-snytt closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2024
@som-snytt
Copy link
Author

That is no excuse.

@som-snytt som-snytt reopened this Dec 15, 2024
@som-snytt
Copy link
Author

The Position API is lax about what is the result of operations on positions.

@SethTisue SethTisue modified the milestones: 2.13.4, Backlog Dec 16, 2024
@som-snytt som-snytt changed the title Bad symbol position if def is infix and rangepos is disabled Bad symbol position if def is infix and rangepos is false Dec 17, 2024
@som-snytt
Copy link
Author

The OP was fixed in 2.13.13 probably by scala/scala#10522

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants