2024-03-29 11:02 AEDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000530mercuryFeature Requestpublic2022-01-25 01:41
Reporterzs 
Assigned Tozs 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
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

~0001160

zs (developer)

Feature implemented on 2021 dec 30.
+Notes

-Issue History
Date Modified Username Field Change
2021-02-26 18:03 zs New Issue
2022-01-25 01:41 zs Assigned To => zs
2022-01-25 01:41 zs Status new => resolved
2022-01-25 01:41 zs Resolution open => fixed
2022-01-25 01:41 zs Note Added: 0001160
+Issue History