Bug 68927

Summary: 'non-static access to static member' problem not reported for super field access
Product: [Eclipse Project] JDT Reporter: Luc Bourlier <eclipse>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Apply on HEAD
none
Apply on HEAD none

Description Luc Bourlier CLA 2004-06-29 16:35:33 EDT
R3.0

No problem is reported when accessing a static field using the 'super' keyword.

public class Bug_53102 {
  public static final String s= "string";
}
class Exts extends Bug_53102 {
  public static final String s= "string";
  public void foo() {
    System.out.println(super.s +   // problem not reported
                        this.s);   // problem correctly reported
  }
}
Comment 1 Olivier Thomann CLA 2004-08-09 11:42:52 EDT
Created attachment 13823 [details]
Apply on HEAD

Proposed patch
Comment 2 Olivier Thomann CLA 2004-08-09 11:43:16 EDT
Created attachment 13824 [details]
Apply on HEAD

Patch for the Negative tests.
Comment 3 Philipe Mulet CLA 2004-09-22 09:41:08 EDT
Fix looks good, pls apply it (post M2)
Comment 4 Olivier Thomann CLA 2004-09-27 11:12:00 EDT
Fixed and released in HEAD.
Existing tests have been updated.
Comment 5 Olivier Thomann CLA 2004-09-27 13:02:07 EDT
Added new regression tests.
Comment 6 David Audel CLA 2004-11-02 10:23:16 EST
Verified for 3.1M3 with build I20041101.