Bug 62205 - 'this = null' do not occur a compile error.
Summary: 'this = null' do not occur a compile error.
Status: RESOLVED DUPLICATE of bug 46918
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M9   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-13 21:27 EDT by yasuyasu CLA
Modified: 2004-05-14 06:59 EDT (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 yasuyasu CLA 2004-05-13 21:27:41 EDT
I report something strange.
Using Eclipse2.1, a Java code like followings don't occured a compile error.
Its code occured an error with Eclipse2.0.
Although it's basically a stupid code, in the world, there is some people who 
believe it's OK.
For such a people, I hope it occurs an error.
Perhaps, are there some reason to be like this?
-------------------------
public void foo(){
 this = null;
}
-------------------------
Comment 1 Olivier Thomann CLA 2004-05-13 22:24:53 EDT
In 2.1.3 and latest 3.0, this produces an error:

The left-hand side of an assignment must be a variable
Comment 2 Philipe Mulet CLA 2004-05-14 06:59:55 EDT
This was addressed a long time ago.

*** This bug has been marked as a duplicate of 46918 ***