-
Notifications
You must be signed in to change notification settings - Fork 67
Incorrect renaming when the method/field already has a numeric suffix #571
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
Comments
Multiple ways to solve this:
@liamappelbe @dcharkes wdyt? What happens in ffigen? Maybe we should use the same technique. |
The second option would require multiple traversals with visitors and saving such information somewhere. Could be done, but complicates things for users. A separator is not a bad idea, it also signals the rename to the user. |
Another way: methods with numeric suffices get an extra
As methods ending with a number are rare in Java (as Java has operator overloading), it's both correct and not ugly in the happy path. |
In this case, ffigen's |
I think I like the last way the best. @liamappelbe Feel free to do the same for ffigen to be consistent. Although eventually I want to give the users the ability to change this through transformations. |
For example, if we have three methods:
overloaded
,overloaded
andoverloaded1
. The secondoverloaded
gets converted tooverloaded1
butoverloaded1
stays the same.The text was updated successfully, but these errors were encountered: