| Summary: | Static external type function ignoring packageName property | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Justin Spadea <jspadea> |
| Component: | EDT | Assignee: | Matt Heitz <mheitz> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | mheitz |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
Fixed with a change to ExternalTypeTemplates. When accessing static functions and fields, we'll pay attention to @packageName and @externalName on the ET. Note, at the moment there's a separate bug in the generator which prevents your testcase from generating clean code. To work around it, put the declaration and initialization of variable 'c' in different statements. Verified |
externalType Class type JavaObject{packageName = "java.lang"} static function forName(name string in) returns(Class); end package pkg; program prog function main() c Class? = Class.forName("my.test"); end end Generates: Class c = null; String eze$Temp1 = Constants.EMPTY_STRING; eze$Temp1 = "my.test"; c = pkg.Class.forName(eze$Temp1); It's using the EGL package instead of the value from packageName.