CadixDev / Mercury

A source transformation and -remapping framework for Java.
Eclipse Public License 2.0
54 stars 23 forks source link

Adjust local variable names if param mappings conflict + other fixes #35

Closed DenWav closed 3 years ago

DenWav commented 3 years ago

If a method parameter mapping exists which will conflict with an existing local variable after remap, Mercury will now adjust that local variable name by appending a number (starting from 1) to the name of the local variable.

This commit attempts to fix local variables defined in the method itself as well as any local variables defined in lambda expressions contained by said methods.


I've pushed a couple more commits, one is a simple misc fix in AccessTransformerRewriter, and the other is another fix related to param mapping.


Okay I added another commit which fixes a quirk with inner class remapping.


And last commit fixes an issue with implicit imports of package-private inner classes of super classes.