pouryafard75 / RM-ASTDiff

MIT License
2 stars 1 forks source link

Type mismatch when Generic is replaced with Diamond operator #98

Open tsantalis opened 5 months ago

tsantalis commented 5 months ago

@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

https://github.com/NLPchina/ansj_seg/commit/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 commented 5 months ago

@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 commented 4 months ago

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

tsantalis commented 3 months ago

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