Bug 104167 - [1.5][compiler] incorrect 'unread field' diagnosis
Summary: [1.5][compiler] incorrect 'unread field' diagnosis
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 126105 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-07-17 21:55 EDT by Adam Kiezun CLA
Modified: 2006-02-13 17:33 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***