Bug 38143 - this = null; should raise compile time error
Summary: this = null; should raise compile time error
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 major (vote)
Target Milestone: 3.0 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-27 06:23 EDT by Ilja Preuss CLA
Modified: 2003-06-05 09:36 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ilja Preuss CLA 2003-05-27 06:23:53 EDT
The following compiles in Eclipse, but raises a compile time error using the 
Sun compiler:

public class Foo {
  public void foo() {
    this = null;
  }
}
Comment 1 Philipe Mulet CLA 2003-05-27 06:52:09 EDT
Fixed, will now report: "The left-hand side of an assignment must be a variable"
Comment 2 Philipe Mulet CLA 2003-05-27 06:52:28 EDT
Fixed, regression test added.
Comment 3 David Audel CLA 2003-06-05 09:36:42 EDT
Verified.