summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSon Ho2022-01-06 16:28:06 +0100
committerSon Ho2022-01-06 16:28:06 +0100
commit0d330faa8a71712c8d7242d49c74dfb209092d81 (patch)
treeb7c493a80170d2ca7a13c46e9b1153c2c1b1f84f /src
parentb83b928109b528c02e16df099c6f9b132e920b12 (diff)
Fix another bug
Diffstat (limited to '')
-rw-r--r--src/Interpreter.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Interpreter.ml b/src/Interpreter.ml
index c8739394..384e0a11 100644
--- a/src/Interpreter.ml
+++ b/src/Interpreter.ml
@@ -24,11 +24,11 @@ open InterpreterStatements
module Test = struct
let initialize_context (type_context : C.type_context)
- (fun_defs : A.fun_def list) : C.eval_ctx =
+ (fun_defs : A.fun_def list) (type_vars : T.type_var list) : C.eval_ctx =
{
C.type_context;
C.fun_context = fun_defs;
- C.type_vars = [];
+ C.type_vars;
C.env = [];
C.symbolic_counter = V.SymbolicValueId.generator_zero;
C.borrow_counter = V.BorrowId.generator_zero;
@@ -57,10 +57,10 @@ module Test = struct
* for each of the backward functions. We do it only because we can
* do it, and because it gives a bit of sanity.
* *)
+ let sg = fdef.signature in
(* Create the context *)
- let ctx = initialize_context type_context fun_defs in
+ let ctx = initialize_context type_context fun_defs sg.type_params in
(* Instantiate the signature *)
- let sg = fdef.signature in
let type_params =
List.map (fun tv -> T.TypeVar tv.T.index) sg.type_params
in
@@ -127,7 +127,7 @@ module Test = struct
assert (fdef.A.arg_count = 0);
(* Create the evaluation context *)
- let ctx = initialize_context type_context fun_defs in
+ let ctx = initialize_context type_context fun_defs [] in
(* Insert the (uninitialized) local variables *)
let ctx = C.ctx_push_uninitialized_vars ctx fdef.A.locals in