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

Type mismatch when Generic is replaced with Diamond operator #98

Open
tsantalis opened this issue Apr 1, 2024 · 3 comments
Open

Type mismatch when Generic is replaced with Diamond operator #98

tsantalis opened this issue Apr 1, 2024 · 3 comments

Comments

@tsantalis
Copy link

tsantalis commented Apr 1, 2024

@pouryafard75
It is very strange that this happens, because in all other cases of Replace Generic with Diamond in the same file the types are matched correctly

NLPchina/ansj_seg@913704e
src/main/java/org/ansj/app/keyword/KeyWordComputer.java

L71: TreeSet<Keyword> treeSet = new TreeSet<Keyword>(tm.values());
R69: TreeSet<Keyword> treeSet = new TreeSet<>(tm.values());

Screenshot from 2024-04-01 13-45-54

@tsantalis
Copy link
Author

tsantalis commented Apr 6, 2024

@pouryafard75

Additional case studies of Replace Generic with Diamond.
L27 - R46
L34 - R75
However, in this case we have an overlapping Replace Attribute with Local Variable refactoring

Screenshot from 2024-04-06 18-25-44

@tsantalis
Copy link
Author

@pouryafard75
What is happening with this issue? We should get it fixed.

@tsantalis
Copy link
Author

This is how the diff currently looks like. There is a multi-mapping. It is better than before, but still not perfect.

Screenshot from 2024-06-07 15-49-28

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 a pull request may close this issue.

1 participant