Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 369756

Summary: Dynamic access of an array field in a record as an any throws an exception
Product: z_Archived Reporter: Joseph Vincens <jvincens>
Component: EDTAssignee: Project Inbox <edt.javascriptgen-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hjiyong, mheitz, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
testcase none

Description Joseph Vincens CLA 2012-01-25 18:06:27 EST
Attached is a test handler.
[CRRUI2095E] Could not find the EGL function calls leading to this error

Could not render UI

      ()
      H1.js?contextKey=95:98 ()
      H1.js?contextKey=95:9 ()
      edt_runtime_all.js?contextKey=95:751 ()
      H1.html?contextKey=95:39 ()
      edt_core.js:131 eze$$loadScripts([object Array],(function () {try {initFunc();} catch (e) {egl.crashTerminateSession();if (e == "eze$$HandlerLoadErr") {egl.println("Internal generation error. Found no definition for samples.client.HelloWorldView. Try Project > Clean...");} else {egl.printError("Could not render UI", e);}throw e;}}))
      edt_core.js:71 ()
      edt_core.js:69 ([object Event])
      edt_core.js:57 


a1.checkIndex is not a function
Comment 1 Joseph Vincens CLA 2012-01-25 18:07:00 EST
Created attachment 210088 [details]
testcase
Comment 2 Joseph Vincens CLA 2012-01-25 18:07:38 EST
This blocks the successful completion of the JSON tests.
Comment 3 Matt Heitz CLA 2012-12-20 12:31:37 EST
The attached testcase does an array access on a record.  The expression in the writeStdout line should be a1.f1[1] not a1[1].

    	a1 any = new MyRec{f1 = new string[]{"abc", "def"}};
    	Syslib.writeStdout(a1[1]);

Once I corrected that, the test worked.  But I think the corrected code would not have worked until earlier today when I fixed a different bug.