Summary: | Synthetic constructors can exceed 255 parameters -> ClassFormatError | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Matt McCutchen <hashproduct+eclipse> | ||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | trivial | ||||||||
Priority: | P3 | CC: | Olivier_Thomann, satyam.kandula | ||||||
Version: | 3.7 | ||||||||
Target Milestone: | 3.7 M2 | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Matt McCutchen
2010-07-30 22:30:46 EDT
Created attachment 175636 [details]
Test case
I think I have a fix for this. We would report: The synthetic method created to access A(int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int) of type SyntheticConstructorTooManyArgs.A has too many parameters How does this look ? And then a problem type is created for the corresponding class. The error message sounds good. I'm not clear on what you are proposing with the "problem type", but it sounds like it might be overkill. Eclipse should be able to compile all code that references A and its members except for calls to the problematic synthetic method. (In reply to comment #3) > The error message sounds good. I'm not clear on what you are proposing with > the "problem type", but it sounds like it might be overkill. Eclipse should be > able to compile all code that references A and its members except for calls to > the problematic synthetic method. Yes, but when the synthetic method cannot be created because it has too many parameters, then an error is issued and inside the environment this ends up as a problem type. A problem type is a type where each method is a problem method. So the methods exist, but they cannot be run without throwing an exception. This prevents lots of secondary errors. Created attachment 178069 [details]
Proposed fix
This should be good enough for this corner case.
I will test the patch. But why does it change "report" to "eport" in an unrelated test case? This is unrelated. When I create a test case, I end up with \r\n and I replace them with \bn. \report was causing me grief when I did a replace all. So I removed the 'r' from report. It is just that I released both changes at the same time. Released for 3.7M2. I reverted the confusing change in test 81. Eclipse compiler now behaves similar to the javac, but both compilers fail when the inner class is not static. For private constructors of non-static inner classes, the synthetic method takes two additional parameters. Filed bug 325321 to take care of it. As the mentioned bug is fixed, am marking this verified. Verified for 3.7M2 using build I20100909-1700 |