diff options
author | Son Ho | 2024-02-08 14:12:32 +0100 |
---|---|---|
committer | Son Ho | 2024-03-17 04:53:07 +0100 |
commit | a03373dc9e0449575771f920e419f5cd40420fb0 (patch) | |
tree | ad5e346321bf9f2642ac501d6b5d6ff8b68c837c /compiler/InterpreterStatements.ml | |
parent | 72db1ad2eb5835b00c45daa06257e46962000af5 (diff) |
Make minor updates
Diffstat (limited to '')
-rw-r--r-- | compiler/InterpreterStatements.ml | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/compiler/InterpreterStatements.ml b/compiler/InterpreterStatements.ml index c17c1563..eef9e2c9 100644 --- a/compiler/InterpreterStatements.ml +++ b/compiler/InterpreterStatements.ml @@ -769,9 +769,8 @@ let eval_transparent_function_call_symbolic_inst (call : call) (ctx : eval_ctx) ("trait method call:\n- call: " ^ call_to_string ctx call ^ "\n- method name: " ^ method_name ^ "\n- call.generics:\n" ^ generic_args_to_string ctx func.generics - ^ "\n- trait and method generics:\n" - ^ generic_args_to_string ctx - (Option.get func.trait_and_method_generic_args))); + ^ "\n- trait_ref.trait_decl_ref: " + ^ trait_decl_ref_to_string ctx trait_ref.trait_decl_ref)); (* Lookup the trait method signature - there are several possibilities depending on whethere we call a top-level trait method impl or the method from a local clause *) @@ -900,9 +899,12 @@ let eval_transparent_function_call_symbolic_inst (call : call) (ctx : eval_ctx) log#ldebug (lazy ("method:\n" ^ fun_decl_to_string ctx method_def)); (* Instantiate *) - (* When instantiating, we need to group the generics for the trait ref - and the method *) - let generics = Option.get func.trait_and_method_generic_args in + (* When instantiating, we need to group the generics for the + trait ref and the generics for the method *) + let generics = + TypesUtils.merge_generic_args + trait_ref.trait_decl_ref.decl_generics func.generics + in let regions_hierarchy = LlbcAstUtils.FunIdMap.find (FRegular method_id) ctx.fun_ctx.regions_hierarchies @@ -1030,7 +1032,6 @@ and eval_global (config : config) (dest : place) (gid : GlobalDeclId.id) : { func = FunId (FRegular global.body); generics = TypesUtils.empty_generic_args; - trait_and_method_generic_args = None; } in let call = { func = FnOpRegular func; args = []; dest } in |