View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0000530 | mercury | Feature Request | public | 2021-02-26 18:03 | 2021-02-26 18:03 | ||||||||
Reporter | zs | ||||||||||||
Assigned To | |||||||||||||
Priority | normal | Severity | minor | Reproducibility | have not tried | ||||||||
Status | new | Resolution | open | ||||||||||
Product Version | |||||||||||||
Target Version | Fixed in Version | ||||||||||||
Summary | 0000530: diagnose inapplicable insts in mode declarations | ||||||||||||
Description | This is (or was) real code from library/hash_table.m: :- pred update_item_in_bucket(K, V, hash_bucket(K, V), hash_bucket(K, V)). :- mode update_item_in_bucket(in(hb_two_plus), in, in, out) is semidet :- mode update_item_in_bucket(in, in, in, out) is semidet. The in(hb_two_plus) was intended to be applied to the third argument, the initial hash bucket, not to the key, whose type is unknown, and is extremely unlikely to be a hash bucket of any size :-( The compiler should check whether the modes of arguments in mode declarations match the types (if any) of the corresponding arguments, and generate error messages for any mismatches. | ||||||||||||
Tags | No tags attached. | ||||||||||||
Attached Files |
|
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2021-02-26 18:03 | zs | New Issue |