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
end
(*
Local Variables:
compile-command: "unset LANG; make -C ../../.. bench/programs/bad-typing/old3"
End:
*)
\ 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
in
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 ->
......
Markdown is supported
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