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

Summary: Language change: Function parameters are immutable
Product: javafx Reporter: David Strupl <dstrupl>
Component: EditorAssignee: David Strupl <dstrupl>
Status: VERIFIED WORKSFORME    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: TASK Exception Reporter:

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