Bug #3041
ambiguous field references are allowed in a CAN-FIND
Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version:
Related issues
History
#1 Updated by Greg Shah about 8 years ago
The following code demonstrates the issue (it is checked in as testcases/uast/ambiguous_field_refs_in_can_find_are_allowed.p
):
def temp-table my-ambig field num1 as int field num2 as int. create my-ambig. num1 = 14. num2 = -14. create my-ambig. num1 = 100. num2 = -100. /* ambiguous names are allowed in can-find, this one references num1 */ /* this also works for permanent tables, we haven't determined the definitive rule for */ /* how the ambiguity is resolved */ if can-find( first my-ambig no-lock where my-ambig.num > 0 ) then message "num1". else message "num2". /* the following code will fail with compile error "num matches multiple fields in my-ambig. (3509)" */ /* if my-ambig.num > 0 then message "this won't compile". */