Summary: | Local variable declaration hides another field or variable | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Daniel <leonard.daniel> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | fraenkel |
Version: | 3.0 | Keywords: | polish, ui |
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Daniel
2004-07-07 20:59:22 EDT
I suppose we could implement the fact that methods without no body would not be flagged (abstract or native). Something like the following?? Index: Argument.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/comp iler/ast/Argument.java,v retrieving revision 1.38 diff -u -r1.38 Argument.java --- Argument.java 6 Jul 2004 11:15:03 -0000 1.38 +++ Argument.java 11 Jul 2004 22:33:23 -0000 @@ -37,6 +37,9 @@ // record the resolved type into the type reference int modifierFlag = this.modifiers; + if ((scope.getDeclarationModifiers() & (AccAbstract | AccNative)) != 0) + return; + Binding existingVariable = scope.getBinding(name, BindingIds.VARIABLE, this, false /*do not resolve hidden field*/); if (existingVariable != null && existingVariable.isValidBinding ()){ if (existingVariable instanceof LocalVariableBinding && this.hiddenVariableDepth == 0) { or maybe, we could consider only flagging used variable declarations only. Deferring post 3.1 As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you. |