Bug #3328
BUFFER-COPY EXCEPT list containing field with the same name as a variable is translated to non-compilable code
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
08/18/2017
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version:
History
#1 Updated by Jaroslaw Haziak over 6 years ago
Example (where "TestDoc" table contains fields named "aaa", "bbb"):
DEF VAR aaa AS CHAR NO-UNDO. DEF BUFFER b1_TestDoc FOR TestDoc. DEF BUFFER b2_TestDoc FOR TestDoc. BUFFER-COPY b1_TestDoc EXCEPT aaa bbb TO b2_TestDoc.
is translated to non-compilable code:
public void execute() { character aaa = TypeFactory.character(); externalProcedure(TestProc5.this, TransactionType.FULL, new Block((Body) () -> { RecordBuffer.openScope(b1Testdoc, b2Testdoc); RecordBuffer.copy(b1Testdoc, new String[] { aaa, "bbb" }, true, b2Testdoc, true); })); }
Name 'aaa' in EXCEPT's list is treated here as variable, but EXCEPT contains only names of table fields.