Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357983 - Type mismatch on myString = my2Dimension[2][2] when my2Dimension string[][] = [["State"],["Carolina","Duke"]];
Summary: Type mismatch on myString = my2Dimension[2][2] when my2Dimension string[][] ...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-16 15:12 EDT by broy2 CLA
Modified: 2017-02-23 14:15 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-16 15:12:58 EDT
20110916 build

Debug or run generated:

program javaError type BasicProgram {}    
    my2Dimension  string[][] = [["State"],["Carolina","Duke"]];
    myString string;    
    function main()
        myString = my2Dimension[2,2];
        sysLib.writeStdout(myString);
    end    
end

Get:
egl.lang.TypeCastException
Comment 1 Matt Heitz CLA 2011-09-16 15:21:29 EDT
Brenda, try changing my2Dimension[2,2] to my2Dimension[2][2] and see if it works.  I saw a similar bug go by, and Tim said we're only going to allow one subscript per set of square brackets.

I don't know if there's already a defect on validation not rejecting that expression.
Comment 2 broy2 CLA 2011-09-16 15:26:24 EDT
I changed it to my2Dimension[2][2] and got:

org.eclipse.edt.javart.AnyBoxedObject cannot be cast to egl.lang.EglList
Comment 3 broy2 CLA 2011-09-20 12:18:00 EDT
Now I get:

Type mismatch: cannot convert from EglList<EglAny> to EglList<EglList<String>>
Comment 4 Jeff Douglas CLA 2011-09-20 16:13:54 EDT
fixed
Comment 5 broy2 CLA 2011-09-21 10:37:57 EDT
Verified in 20110921 build.