Summary: | Error message "method is defined in an inherited type and an enclosing scope | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Steve Witt <switt> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | ||
Version: | 2.1 | ||
Target Milestone: | 3.0 M2 | ||
Hardware: | PC | ||
OS: | Windows NT | ||
Whiteboard: |
Description
Steve Witt
2003-07-01 11:41:40 EDT
Bug 32342 was indeed a bug, but this behavior is intended in 1.3 compliant mode. javac 1.3.1 will also report problems: Enclosing.java:16: setText(java.lang.String) is inherited from EnabledTextField and hides method in outer class Enclosing. An explicit 'this' qualifier must be used to select the desired instance. setText(value.toString()); ^ Enclosing.java:18: setText(java.lang.String) is inherited from EnabledTextField and hides method in outer class Enclosing. An explicit 'this' qualifier must be used to select the desired instance. setText(null); ^ Enclosing.java:23: getText() is inherited from javax.swing.text.JTextComponent and hides method in o uter class Enclosing. An explicit 'this' qualifier must be used to select the desired instance. return getText(); ^ 4 errors If you switch our compliance setting to 1.4, then the problem will go away since in 1.4 mode, the inherited implementation is always privileged. Preferences>Java>Compiler>Compliance and Classfiles>Compiler Compliance Level>1.4 |