Commit 1ae0fb6f authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-08-01 15:01:35 by cvscast] Bugfix: ill-formed patterns were accepted in...

[r2003-08-01 15:01:35 by cvscast] Bugfix: ill-formed patterns were accepted in tge toplevel because of
memoization

Original author: cvscast
Date: 2003-08-01 15:01:35+00:00
parent 85011edc
...@@ -568,9 +568,12 @@ and pat_node s : Patterns.node = ...@@ -568,9 +568,12 @@ and pat_node s : Patterns.node =
try SlotTable.find pat_nodes s try SlotTable.find pat_nodes s
with Not_found -> with Not_found ->
let x = Patterns.make (fv_slot s) in let x = Patterns.make (fv_slot s) in
SlotTable.add pat_nodes s x; try
Patterns.define x (pat (descr s)); SlotTable.add pat_nodes s x;
x Patterns.define x (pat (descr s));
x
with exn -> SlotTable.remove pat_nodes s; raise exn
(* For the toplevel ... *)
let register_types glb b = let register_types glb b =
List.iter List.iter
......
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