Commit 0ef80f1a authored by Jean-Christophe Filliâtre's avatar Jean-Christophe Filliâtre
Browse files

old not allowed in programs

parent 0f220a20
(* old not allowed in programs *)
module Test
use import module ref.Refint
let test (x: ref int) =
if !x = old !x then 1 else 2
Local Variables:
compile-command: "unset LANG; make -C ../../.. bench/programs/bad-typing/old3"
\ No newline at end of file
......@@ -410,6 +410,7 @@ and dexpr_desc ~ghost env loc = function
with Not_found ->
errorm ~loc "unbound symbol %a" print_qualid p
if ls_equal ls fs_old then errorm ~loc "old not allowed in programs";
let ps = get_psymbol ls in
begin match ps.ps_kind with
| PSvar v ->
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment