VST icon indicating copy to clipboard operation
VST copied to clipboard

future-coercion-class-field warning

Open andrew-appel opened this issue 2 years ago • 2 comments

In veric/ghosts.v, floyd/printf.v, and in some other files in msl/, veric/, floyd/, there are Class declarations that are newly marked as deprecated in Coq 8.17, and will stop working sometime in the future. Below is an example of the message. I'm not sure what's the best way to fix this, especially in a way that stays compatible with Coq 8.16.

File "./veric/ghosts.v", line 174, characters 0-275:
Warning: A coercion will be introduced instead of an instance in future
versions when using ':>' in 'Class' declarations. Replace ':>' with '::' (or
use '#[global] Existing Instance field.' for compatibility with Coq < 8.17).
Beware that the default locality for '::' is #[export], as opposed to
#[global] for ':>' currently. Add an explicit #[global] attribute to the
field if you need to keep the current behavior. For example: "Class foo := {
#[global] field :: bar }." [future-coercion-class-field,records]

andrew-appel avatar Mar 30 '23 19:03 andrew-appel

Oh, interesting! I'll try a few approaches. I also noticed that they've finally included "Disable Notation", which might help with some of the map notation clashes.

mansky1 avatar Mar 30 '23 19:03 mansky1

also msl/predicates_hered.v

andrew-appel avatar Mar 30 '23 22:03 andrew-appel

This seems to have been fixed by #677.

andrew-appel avatar Mar 14 '24 17:03 andrew-appel