; Fieldtest cut55-3b — decision (c), WRONG mode on purpose. ; ; An author who reasons "n is only read, never consumed, so borrow it" ; writes `(borrow (con Int))`. The ledger says this is illegal: borrow on ; a value type is a check error, own is the only legal mode there. I ; expect a `borrow-over-value` error that NAMES the param and tells me to ; use `own`. ; ; Expected: ail check -> error [borrow-over-value], exit 1. (module cut55_3b_borrow_over_value (fn double (doc "Borrow a value-typed Int — illegal, own is the only legal mode.") (type (fn-type (params (borrow (con Int))) (ret (own (con Int))))) (params n) (body (app + n n))))