Summary: | [compiler] missing binding on array initializer | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Martin Aeschlimann <martinae> | ||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | ||||||
Version: | 3.2 | ||||||
Target Milestone: | 3.2 M5 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Martin Aeschlimann
2005-12-11 06:08:05 EST
Type can be inferred, based on first initializer element type (this is what we use for error reporting). Also will make resolution more resilient, and ensure dispatching resolution into all initializer expressions. In JDT.UI we have the problem that we can't create a binding, e.g. creating int[] if we have int. If we get that then I could also fo the infering myself... My fix is doing both inference and propagation through elements. Note that inference isn't very smart, simply wrappering the first element type into an array. It could be improved using lub algorithm, but this feels overkill. Created attachment 31748 [details]
Regression test
Fixed for build > M4. Added ArrayTest#test009. Added ASTConverter15Test#test0206. Verified for 3.2 M5 using build I20060214-0010 |