-
Notifications
You must be signed in to change notification settings - Fork 30
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
get rid of some of the warnings in Java2Swift generated sources: generics #200
base: main
Are you sure you want to change the base?
Conversation
if translator.usedGenericParameterNames.contains(name) { | ||
name = "\(baseName)\(index)" | ||
} | ||
return name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would probably have to be more contextual "in this context (of a function or type) there already was a T used so make it a T1". Especially with types nested in other types where there's a T outside and then another T etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's roughly the idea, other than pursuing it more and trying what will work out in the end I'm not sure I have much hints to provide here. You'll have to work out how to avoid the conflicts and just think through edge cases you uncover
I tried running Even without my changes, these files result in a different order of methods and variables:
And this file generates a non-valid class:
Should I file an issue on this? |
Huh I see, then yeah please file an issue and ofc help on resolving it would also be welcome but otherwise we'll find some time :) |
I'd really like to help! But for now and until mid-January, I will be busy with college projects and final exams. As of the state of this PR, should I resume working on it when the issue is resolved? |
Tries to solve #169
I got rid of some of the warning but I'm now stuck.
The following classes were translated appropriately
These classes were generated with a different order of methods and variables, I don't know why that happened.
This class generates a bad translation which is not a valid class, I don't know why that happedned.