2021-07-25 10:39 AEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000530mercuryFeature Requestpublic2021-02-26 18:03
Reporterzs 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusnewResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0000530: diagnose inapplicable insts in mode declarations
DescriptionThis 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.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-Issue History
Date Modified Username Field Change
2021-02-26 18:03 zs New Issue
+Issue History