Bug 44435 - [introduce parameter] should not do it for assignments
Summary: [introduce parameter] should not do it for assignments
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-08 09:57 EDT by Dani Megert CLA
Modified: 2010-09-05 13:57 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 Dani Megert CLA 2003-10-08 09:57:48 EDT
I20031008

Having :
int i;
i= 3;

Introduce param for "i= 3"
==> compile error.

Introducing a param for an assignment doesn't seem to make that much sense even
though it is an expression that might result in a value.
Comment 1 Markus Keller CLA 2004-05-21 10:48:44 EDT
moving target milestone
Comment 2 Markus Keller CLA 2004-06-09 07:09:12 EDT
It doesn't lead to compile errors in general (e.g. when assignment is to a
field). We could consider raising a warning, but we should not block it if the
user wants to do it.

There are 2 issues:
(a) raise an error when extracting an expression containing local variables or
fields which are not accessible form all call sites.
(b) raise a warning when extracting an assigned expression.

Not for 3.0.