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 ReplaceConstantWithAnotherConstant not work when contains import conflict #5225

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ckcd
Copy link
Contributor

@ckcd ckcd commented Mar 27, 2025

Fix #5224

What's changed?

Update ReplaceConstantWithAnotherConstant recipe to handle more cases with import conflict.

What's your motivation?

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

…lict

Signed-off-by: Kun Chang <curtis@mail.ustc.edu.cn>
@timtebeek timtebeek self-requested a review March 27, 2025 10:32
@knutwannheden
Copy link
Contributor

Can we check if we as an alternative can leverage ShortenFullyQualifiedTypeReferences? We often use this visitor and recipe for this purpose. The simplest way is to just use it as an after visitor. But it can also be used in a way such that it doesn't modify any other subtrees.

@greg-at-moderne
Copy link
Contributor

@ckcd, have you seen the question from Knut above?

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

Successfully merging this pull request may close these issues.

ReplaceConstantWithAnotherConstant not work when import is conflict
3 participants