Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 359302 - Error in generated Java on resize array function
Summary: Error in generated Java on resize array function
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-28 16:32 EDT by broy2 CLA
Modified: 2017-02-23 14:16 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.