Community
Participate
Working Groups
Build Identifier: 201110090901 The constructor Delegate() is undefined Reproducible: Always Steps to Reproduce: 1. Check out project "org.eclipse.edt.eunit.test" from kan-cvs. 2. Add java generator to the project. 3. Clean the whole workspace. 4. The error exists in: fvt.delegates.TestDelegate01Lib.java
The TestDelegate01Lib library seems to have issues with JavaGen for 2 variations: 1) testDelegateAsINParameter1a - generates: AnyBoxedObject<org.eclipse.edt.javart.Delegate> eze$Temp3 = EAny.ezeWrap(new org.eclipse.edt.javart.Delegate()); with the error: the constructor is undefined 2) testDelegateAsINOUTParameter - generates: new org.eclipse.edt.javart.Delegate("testerForINOUT", this, String.class) = EString.ezeCast(eze$Temp1.ezeUnbox()); with the error: The left-hand side of an assignment must be a variable Commenting out these two variations should make the rest of the library usable, so I am lowering this to a Normal Severity and changing the priority to P1.
PengFei, Please do NOT comment out the test case, as it will be hard to find it later please use LogResult.skip("Bug360419") instead for these 2 test cases.
I have updated javagen to handle delegates, HOWEVER ... this testcase is invalid because it is trying to pass the name of a function as an inout (and out) delegate parameter. This is not allowed and validation needs to prevent this. Think about it. How can the name of a function be modified by inout or out?
This was fixed indirectly by Bug 362587. The function is now considered to be a value type and so cannot be passed to the inout/out reference parm (delegate).
Verified in build 201111170946 & closed.