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

fix: Wrong semantic token for renamed imported classes #4976

Merged
merged 1 commit into from Feb 16, 2023

Conversation

jkciesluk
Copy link
Member

package example

import util.{Failure => NoBad}
import math.{floor => _, _}

class Imports {
  // rename reference
  NoBad(null) // we have two symbols here: `Failure` class and `apply` method
  max(1, 2)
}

From two symbols on NoBad, we were first trying to pick the one with name matching text, but the name is Failure, not NoBad. This issue only appeared when imported name was the same length as apply (5 letters)

Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tgodzik tgodzik merged commit c0b0597 into scalameta:main Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants