DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
B3010: actual parameters overlap
Catalog status: active. Default severity: error. Stable name: aliased-parameters. Family: Flow and effects.
The same variable is passed for two parameters of a call where at least one is out or in out (unless the other is an in parameter passed by copy), or a variable passed as an out or in out parameter is also used by the callee as a global. The result would depend on the order of copy-back or on which name the callee uses, so Verada forbids it.
Example (Vada)
Swap (X, X);
Add_To_Total (Total); -- Add_To_Total also uses Total as a globalExample (Varc)
swap(&x, &x);
add_to_total(&total); // add_to_total also uses total as a global
What to do
Pass distinct variables, or a copy.
Regression source and further reading
Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.
See flow and effects, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.