Bug 68927 - 'non-static access to static member' problem not reported for super field access
Summary: 'non-static access to static member' problem not reported for super field access
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.1 M3   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-29 16:35 EDT by Luc Bourlier CLA
Modified: 2004-11-02 10:23 EST (History)
0 users

See Also:


Attachments
Apply on HEAD (917 bytes, patch)
2004-08-09 11:42 EDT, Olivier Thomann CLA
no flags Details | Diff
Apply on HEAD (8.67 KB, patch)
2004-08-09 11:43 EDT, Olivier Thomann CLA
no flags Details | Diff

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