-
Notifications
You must be signed in to change notification settings - Fork 248
Open
Description
type box t = | Box of t
let unbox (Box x) = x
let works (Box a : box int) (Box x : box int {x > 0}) : pos = x
let fails (Box a : box int) (Box x : box int {a + x > 0}) : pos = a+xThe last definition fails pointing to the a in the refinement with:
* Error 230 at Parsing.fst(8,46-8,47):
- Variable "a" not found
This also fails the same way:
let fails (Box a : box int) (_ : unit {a > 0}) : pos = aAnd this one fails more interestingly:
let fails (Box a : box int) (_ : squash (a > 0)) : pos = a* Error 189 at Parsing.fst(8,41-8,42):
- Expected expression of type Prims.int got expression a of type box Prims.int
- See also Parsing.fst(8,11-8,16)
Metadata
Metadata
Assignees
Labels
No labels