Skip to content

Commit

Permalink
Fix bug: Warn for all removed stable variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-blaeser committed Jul 11, 2024
1 parent 6564cda commit 19e5d92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/mo_frontend/stability.ml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ let match_stab_sig tfs1 tfs2 : unit Diag.result =
| tf1 :: tfs1', [] ->
(* dropping fields is allowed, but with a warning *)
warning_discard s tf1;
Some ()
go tfs1' []
| tf1::tfs1', tf2::tfs2' ->
(match Type.compare_field tf1 tf2 with
| 0 ->
Expand Down
3 changes: 3 additions & 0 deletions test/cmp/ok/neg-xyz-x.cmp.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
(unknown location): warning [M0169], stable variable y of previous type
Int
will be discarded. This may cause data loss. Are you sure?
(unknown location): warning [M0169], stable variable z of previous type
Bool
will be discarded. This may cause data loss. Are you sure?
TRUE

0 comments on commit 19e5d92

Please sign in to comment.