Bug #3835
broken multi-assigner
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
Related issues
History
#1 Updated by Ovidiu Maxiniuc over 7 years ago
Currently the multi-assigner is broken. Example:
define variable vv as integer extent 3.
define variable cc as integer extent 3.
vv = cc.
will be converted to
integer[] vv = UndoableFactory.integerExtent(3);
integer[] cc = UndoableFactory.integerExtent(3);
internalProcedure(new Block((Body) () ->
{
vv = (integer[]) assignMulti(vv, cc);
Apparently assignMulti(vv, cc); should be enough, but the assignment was added because of #2133, notes 12/13.
The problem here is that when compiled, the following error is generated:
[ant:javac] <source-file> error: local variables referenced from a lambda expression must be final or effectively final [ant:javac] vv = (integer[]) assignMulti(vv, cc); [ant:javac] ^
#2 Updated by Greg Shah over 7 years ago
- Related to Feature #3751: implement support for OO 4GL and structured error handling added
#3 Updated by Ovidiu Maxiniuc over 7 years ago
For the moment (r11391/3750a), I enforced that this assign back to be generated only when vv above is an indeterminate extent variable (defined with define variable vv as integer extent.). This will make the example above compile successfully and will probably cover 75-90% of all cases.
However, the issue is still present and will be visible when vv is redefined as in this note (without the '3').