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

Bug 359302

Summary: Error in generated Java on resize array function
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: mheitz, pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description broy2 CLA 2011-09-28 16:32:16 EDT
This was working, but now I get Java error.

program resize type BasicProgram{}
    function main()    
        myNames string[] = ["matt", "justin", "paul"];
        myNames.resize(2);
    end  
end 

The method resize(int, EList.ListElementFactory<? extends String>) in the type EList<String> is not applicable for the arguments (int, EList.ElementFactory<EString>)
Comment 1 Matt Heitz CLA 2011-09-28 17:13:10 EDT
Paul, this is caused by that intermittent problem where TypeUtils.getTypeKind() sometimes give the wrong answer.  I'm asking for the type-kind of the array's element type.  In this case it should tell me String, but instead it says I'm Not Telling.
Comment 2 Matt Heitz CLA 2011-10-05 10:31:23 EDT
Paul, in my local copy of TypeUtils I replaced the == comparisons with calls to equals(), and I haven't seen the problem since.
Comment 3 Paul Harmon CLA 2011-11-01 11:25:30 EDT
This appears to be working now
Comment 4 broy2 CLA 2011-11-01 12:47:17 EDT
Verified in 20111101 build.