| Summary: | various problems with array literals | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Matt Heitz <mheitz> |
| Component: | EDT | Assignee: | Project Inbox <edt.javagen-inbox> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | broy2 |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Matt Heitz
We shouldn't try dealing with the second case until bug 352370 is done. It's the enhancement to support the number type. *** Bug 356527 has been marked as a duplicate of this bug. *** Due to the recent set of language changes, "x1 int[] = [1, 2, 3];" is no longer valid. It's an assignment of a smallint array to an int array, and they're not compatible types. The second example is invalid for the same reason. And, the type of the array literal [1, 2, 178793] is correct: it's supposed to be number not int. If we used type conversions to dictate the array's type, [ 3, "hello" ] would be an array of strings! Closing. |