| Summary: | Compile error on generated code for declaration with initializer | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Matt Heitz <mheitz> |
| Component: | EDT | Assignee: | Project Inbox <edt.javagen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jeffdouglas, jqian |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
*** Bug 357676 has been marked as a duplicate of this bug. *** fixed Verified. |
I'm using the latest code from CVS. The testcase below has two cases that ought to be generated the same way. However, in the second case the code for the temporary string variable is inserted in the middle of c2's declaration, causing a Java syntax error. package x; program StaticET function main() try c1 Class?; c1 = Class.forName("my.test"); /* Class c1 = null; java.lang.String eze$Temp1 = Constants.EMPTY_STRING; eze$Temp1 = "my.test"; c1 = Class.forName(eze$Temp1); */ c2 Class? = Class.forName("my.test"); /* Class java.lang.String eze$Temp2 = Constants.EMPTY_STRING; eze$Temp2 = "my.test"; c2 = Class.forName(eze$Temp2); */ end end end externalType Class type JavaObject{packageName = "java.lang"} static function forName(name string in) returns(Class); end