This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 143469 - Language change: Function parameters are immutable
Summary: Language change: Function parameters are immutable
Status: VERIFIED WORKSFORME
Alias: None
Product: javafx
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: David Strupl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-11 14:07 UTC by David Strupl
Modified: 2008-09-19 10:12 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Strupl 2008-08-11 14:07:38 UTC
Code completion: should not suggest parameters on the left side of assignment.

The formal parameters of a function are immutable; assignment to them is an error.
Comment 1 David Strupl 2008-08-12 14:00:46 UTC
After closer evaluation I am closing this issue from the code completion point of view. Although the parameters cannot
be on the left side of an assignement the user might be typing something else. Consider e.g.

function f(aaa : Integer) : Void {
   aaa
}

The user has typed aaa and can leave as it is or can continue with e.g. + or = but the code completion should not stop
him. Even in case the user has this in the editor

function f(aaa : Integer) : Void {
   var x : Integer = 5;
   aaa| = 10;
}

(the | denotes the caret position) we should keep suggesting aaa since he can easily type 

;<ENTER> x = 

and he is ok with having aaa there --- resulting in 

function f(aaa : Integer) : Void {
   var x : Integer = 5;
   aaa;
   x = 10;
}
So I am closing this issue. If there is some case where our behavoiur is wrong please reopen.
Comment 2 Alexandr Scherbatiy 2008-09-19 10:12:08 UTC
verified in 2008-09-19_02-01-58.zip