Bug 421043 - [quick fix] Add quickfix for = instead of ==
Summary: [quick fix] Add quickfix for = instead of ==
Status: CLOSED DUPLICATE of bug 44157
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-05 01:48 EST by llewellyn falco CLA
Modified: 2013-11-06 06:48 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description llewellyn falco CLA 2013-11-05 01:48:11 EST
Say you have the java code

int a = 1;
if (a = 5)
{
 //...some code    
}

You will get the error :
Type mismatch: cannot convert from int to boolean

If you then try a QuickFix you will get :
No suggestions available


I would suggest the addition of an "Use comparison (==) instead of assignment (=)"

While I know this is trivial for most seasoned programmers, it is not for new programmers. Furthermore, the lack of consistent help prevents the habit of looking to the quickfixs from forming in the being of the learning process.

The addition of these simple quickfixes can really help students.

thanks,
llewellyn
Comment 1 Dani Megert CLA 2013-11-06 06:48:32 EST

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