-
-
Notifications
You must be signed in to change notification settings - Fork 357
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
review: fix: issue #2237 reject invalid names #3189
Conversation
nice! |
Hi @MartinWitt, how does it go with the failing test cases? |
JDT and spoon does not allow to follow jls 100%, so there are some minor deviation made from jls to be compatible.
still working on, but tests still failing |
what about slightly changing the JDT name before called setSimpleName?
|
…package is not an allowed identifier
replace new->foo, because new is an identifier and not allowed replace package->foo, because package is an identifier
I wouldn´t change the jdt name. I the current solution all correct identifier and empty, starting with number and follow the format $identifier@$Number identfier are allowed.
|
I agree. Thanks a lot for the test updates, LGTM. |
Thanks a lot, that's very nice! |
fix #2237
this should fix issue #2237. But a lot of Code uses CtReferenceImpl::setSimpleName for creating illegal references. This code must be changed for this small issue. Like CodeFactory::createClassAccess creates a fieldReference with simpleName "class", which is a illegal identifier.