File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -673,14 +673,19 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
673
673
in
674
674
let arg_ty_opts = Array. map (fun ty -> Some ty) arg_tys in
675
675
ignore (demand_fn ~param_handler: param_handler arg_ty_opts ty);
676
- let get_subst subst_opt =
676
+ let get_subst i subst_opt =
677
677
match subst_opt with
678
678
Some subst -> subst
679
679
| None ->
680
- Common. bug ()
681
- " internal_check_outer_lval: subst not found"
680
+ Common. err
681
+ None
682
+ " not enough context to instantiate parameter %d of the \
683
+ function with type '%a'; please supply type parameters \
684
+ explicitly"
685
+ (i + 1 )
686
+ sprintf_ltype lty
682
687
in
683
- let substs = Array. map get_subst substs in
688
+ let substs = Array. mapi get_subst substs in
684
689
begin
685
690
match beta_reduce (Semant. lval_base_id lval) lty substs with
686
691
LTYPE_mono ty -> yield_ty ty
You can’t perform that action at this time.
0 commit comments