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

name conflict between field and method #10

Open
jbfaden opened this issue Oct 28, 2022 · 1 comment
Open

name conflict between field and method #10

jbfaden opened this issue Oct 28, 2022 · 1 comment

Comments

@jbfaden
Copy link
Owner

jbfaden commented Oct 28, 2022

Java allows a class field and a method to have the same name. I had the variable "format" and a method "format", and in Python this resulted in my field definition to be clobbered by the field definition without a compile error. This was a very confusing bug to figure out.

The converter needs to check for name conflicts like this, and at least throw an error.

@jbfaden
Copy link
Owner Author

jbfaden commented Oct 28, 2022

This will also catch where method overloading is used and needs to be resolved.

jbfaden added a commit to uri-templates-time/uri-templates that referenced this issue Oct 28, 2022
refactor rename format instance variable to formatStr to avoid name
conflict.
jbfaden added a commit that referenced this issue Oct 28, 2022
include a line which will cause a syntax error in the output.
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

No branches or pull requests

1 participant