Summary: | compiler: "field defined in an inherited type and an enclosing scope" error | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Fabrizio Giustina <fgiust> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | CLOSED INVALID | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | ||
Version: | 3.1 | ||
Target Milestone: | 3.1 M7 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Fabrizio Giustina
2005-04-30 04:30:42 EDT
Which compliance are you using ? I suspect you use 1.3 compliance, where the error is legite. Checked javac 1.3 which agrees with us: TestDuplicateField .java:14: simpleField is inherited from TestDuplicateField .InnerOne and hides variable in outer class TestDuplicateField . An explicit 'this' qualifier must be used to select the desired instance. simpleField = 1; ^ 1 error In compliance 1.4 and above, no error is reported. Only a warning (optional) is surfaced to flag the field override. verified, I was using the default settings with 1.3 compliance. Sorry for the invalid report and thanks. No problem, and thanks for checking. |