Bug 104167

Summary: [1.5][compiler] incorrect 'unread field' diagnosis
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: art.dyer
Version: 3.1   
Target Milestone: 3.1.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Adam Kiezun CLA 2005-07-17 21:55:33 EDT
3.1
if A is not generic, then the warning goes away

public class A<T> {
  private static class B{
    private int foo; //incorrectly identified as unused
  }
  void bar(B b){
    if (b.foo == 0)
      return;
  }
}
Comment 1 Philipe Mulet CLA 2005-07-18 07:26:52 EDT
ASTNode#isFieldUseDeprecated was not tagging the original field, but the
parameterized instance of it.
Comment 2 Philipe Mulet CLA 2005-07-18 07:27:08 EDT
Fixed. Added GenericTypeTest#test783
Comment 3 Olivier Thomann CLA 2005-08-09 11:52:35 EDT
Verified for 3.2M1 (I20050808-2000)
Comment 4 David Audel CLA 2005-09-26 11:40:24 EDT
Verified using M20050923-1430 for 3.1.1
Comment 5 Philipe Mulet CLA 2006-02-13 17:33:05 EST
*** Bug 126105 has been marked as a duplicate of this bug. ***