Skip to content

Commit 89bc3a7

Browse files
committed
---
yaml --- r: 856 b: refs/heads/master c: 679dca8 h: refs/heads/master v: v3
1 parent e366645 commit 89bc3a7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: b3c4c1426a54d3dfbfae9ab4e54d18875d01885e
2+
refs/heads/master: 679dca854167cf3004f5d9f3d8a2e81921e5e2cc

trunk/src/boot/me/type.ml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -673,14 +673,19 @@ let check_stmt (cx:Semant.ctxt) : (fn_ctx -> Ast.stmt -> unit) =
673673
in
674674
let arg_ty_opts = Array.map (fun ty -> Some ty) arg_tys in
675675
ignore (demand_fn ~param_handler:param_handler arg_ty_opts ty);
676-
let get_subst subst_opt =
676+
let get_subst i subst_opt =
677677
match subst_opt with
678678
Some subst -> subst
679679
| 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
682687
in
683-
let substs = Array.map get_subst substs in
688+
let substs = Array.mapi get_subst substs in
684689
begin
685690
match beta_reduce (Semant.lval_base_id lval) lty substs with
686691
LTYPE_mono ty -> yield_ty ty

0 commit comments

Comments
 (0)