| Summary: | Need validation error on the array access of [2,1] as only [2][1] is valid | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | broy2 |
| Component: | EDT | Assignee: | Project Inbox <edt.compiler-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P1 | CC: | jeffdouglas, pharmon |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
"Caroling"? You can't stand to type "Carolina"? You got that right. But I'm trying since our kid graduated from there. This error in in the IR generation instead. I am redirecting this to Paul. For this EGL, my2Dimension string[][] = [["State"],["Caroling","Duke"]]; myString string; myString = my2Dimension[2,1]; This IR statement is generated. Notice that there is only 1 ArrayAccess expression with 1 integer variable. It is leaving out the 1st variable reference altogether. <statements ID="7" eClass="org.eclipse.edt.mof.egl.AssignmentStatement" > <annotations ID="8" eClass="dynMof:org.eclipse.edt.mof.egl.Annotation:EGL_Location" len="i:29" off="i:163" line="i:8" /> <container IDREF="4"/> <expr ID="9" eClass="org.eclipse.edt.mof.egl.Assignment" operator="=" > <annotations ID="10" eClass="dynMof:org.eclipse.edt.mof.egl.Annotation:EGL_Location" len="i:28" off="i:163" line="i:8" /> <LHS ID="11" eClass="org.eclipse.edt.mof.egl.MemberName" id="myString" > <annotations ID="12" eClass="dynMof:org.eclipse.edt.mof.egl.Annotation:EGL_Location" len="i:8" off="i:163" line="i:8" /> <member IDREF="13"/> </LHS> <RHS ID="14" eClass="org.eclipse.edt.mof.egl.ArrayAccess" > <annotations ID="15" eClass="dynMof:org.eclipse.edt.mof.egl.Annotation:EGL_Location" len="i:17" off="i:174" line="i:8" /> <array ID="16" eClass="org.eclipse.edt.mof.egl.MemberName" id="my2Dimension" > <annotations ID="17" eClass="dynMof:org.eclipse.edt.mof.egl.Annotation:EGL_Location" len="i:12" off="i:174" line="i:8" /> <member IDREF="18"/> </array> <index ID="19" eClass="org.eclipse.edt.mof.egl.AsExpression" eType="egl:eglx.lang.eint" > <annotations ID="20" eClass="dynMof:org.eclipse.edt.mof.egl.Annotation:EGL_Location" len="i:1" off="i:189" line="i:8" /> <objectExpr ID="21" eClass="org.eclipse.edt.mof.egl.IntegerLiteral" value="2" isNegated="false" > <annotations ID="20" eClass="dynMof:org.eclipse.edt.mof.egl.Annotation:EGL_Location" len="i:1" off="i:189" line="i:8" /> </objectExpr> </index> </RHS> </expr> </statements> *** Bug 356530 has been marked as a duplicate of this bug. *** *** Bug 357530 has been marked as a duplicate of this bug. *** I talked with Tim on this and the syntax is invalid. Paul you need to validate out the array access of [2,1] as only [2][1] is valid. As for the testcase, please change the access to use one set of [] for each array dimension. I have added the validation Verified in 20111101 build. |
Build Identifier: 20110901 Generated Java has error: The method asAny(EglList<String>) is undefined for the type EglAny program javaError type BasicProgram {} my2Dimension string[][] = [["State"],["Caroling","Duke"]]; myString string; function main() myString = my2Dimension[2,2]; sysLib.writeStdout(myString); end end Reproducible: Always