-
Notifications
You must be signed in to change notification settings - Fork 3.1k
SI-8900 Don't assert !isDelambdafyFunction, it may not be accurate #4049
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
Conversation
I'd like to figure what the macro was doing to generated the name that tripped this, and add a test case. |
If you don't want $lambda to appear in class names, nobody can use any identifiers which begin with lambda. |
Here's a test case. Look, Ma, no macros.
We could simply tighten up those name based checks to look only at We could also switch over to using flags or symbol annotations for these, although if we do we have to think/test carefully separate compilation scenarios. No doubt calling your package or function |
The implementations of isAnonymousClass, isAnonymousFunction, isDelambdafyFunction and isDefaultGetter check if a specific substring (eg "$lambda") exists in the symbol's name. SI-8900 shows an example where a class ends up with "$lambda" in its name even though it's not a delambdafy lambda class. In this case the conflict seems to be introduced by a macro. It is possible that the compiler itself never introduces such names, but in any case, the above methods should be implemented more robustly. This commit is band-aid, it fixes one specific known issue, but there are many calls to the mentioned methods across the compiler which are potentially wrong. Thanks to Jason for the test case!
LGTM |
PLS REBUILD ALL |
(kitty-note-to-self: ignore 59735555) |
PLS REBUILD ALL IDE fails with:
I hope this one will just go away... |
(kitty-note-to-self: ignore 59757313) |
I hit this with the repl update to javap -fun. Naturally I named something lambdaMethods. Wikipedia article on lambda has a secondary reference that says the ancient pronunciation was labda, so I went with that. I can't write lambda without thinking of baby sheep. |
PLS REBUILD ALL |
(kitty-note-to-self: ignore 59811500) |
SI-8900 Don't assert !isDelambdafyFunction, it may not be accurate
The implementations of isAnonymousClass, isAnonymousFunction,
isDelambdafyFunction and isDefaultGetter check if a specific substring
(eg "$lambda") exists in the symbol's name.
SI-8900 shows an example where a class ends up with "$lambda" in its
name even though it's not a delambdafy lambda class. In this case the
conflict seems to be introduced by a macro. It is possible that the
compiler itself never introduces such names, but in any case, the
above methods should be implemented more robustly.
This commit is band-aid, it fixes one specific known issue, but there
are many calls to the mentioned methods across the compiler which
are potentially wrong.