diff options
author | Son Ho | 2022-01-14 11:56:28 +0100 |
---|---|---|
committer | Son Ho | 2022-01-14 11:56:28 +0100 |
commit | 5b9e24c7ddcd53bc5c1a71a6efb6eecff757e151 (patch) | |
tree | 55c66f8d64928a3bb7fd141b3e8cfacbe9708f44 /src/Invariants.ml | |
parent | e6ee5e6fda235e71283c6cccecbfc631457cc949 (diff) |
Update aproj to make AEndedProjLoans take an `aproj option` and add the
AIgnoredProjBorrows variant
Diffstat (limited to 'src/Invariants.ml')
-rw-r--r-- | src/Invariants.ml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Invariants.ml b/src/Invariants.ml index 73a18312..7664f70e 100644 --- a/src/Invariants.ml +++ b/src/Invariants.ml @@ -605,7 +605,14 @@ let check_typing_invariant (ctx : C.eval_ctx) : unit = * otherwise they should have been reduced to `_` *) let abs = Option.get info in assert (ty_has_regions_in_set abs.regions sv.V.sv_ty) - | V.AEndedProjLoans | V.AEndedProjBorrows -> ()) + | V.AEndedProjLoans (Some proj) -> ( + match proj with + | V.AProjBorrows (_sv, ty') -> assert (ty' = ty) + | V.AEndedProjBorrows -> () + | _ -> failwith "Unexpected") + | V.AEndedProjLoans None + | V.AEndedProjBorrows | V.AIgnoredProjBorrows -> + ()) | V.AIgnored, _ -> () | _ -> failwith "Erroneous typing"); (* Continue exploring to inspect the subterms *) |