Skip to content

Commit e366645

Browse files
committed
---
yaml --- r: 855 b: refs/heads/master c: b3c4c14 h: refs/heads/master i: 853: 08a1713 851: cbd1ae1 847: bde829b v: v3
1 parent e95b268 commit e366645

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 3d0da7545588e22c734c21d1bf81d610a3d3f3cc
2+
refs/heads/master: b3c4c1426a54d3dfbfae9ab4e54d18875d01885e

trunk/src/boot/me/resolve.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -768,12 +768,12 @@ let pattern_resolving_visitor
768768
end
769769
in
770770

771-
let resolve_arm { node = arm; id = _ } =
771+
let resolve_arm { node = arm; id = id } =
772772
match fst arm with
773773
Ast.PAT_tag (lval, pats) ->
774774
let lval_nm = lval_to_name lval in
775775
let lval_id = lval_base_id lval in
776-
let tag_ctor_id = (lval_item cx lval).id in
776+
let tag_ctor_id = (lval_item ~node_id:id cx lval).id in
777777
if defn_id_is_item cx tag_ctor_id
778778

779779
(* FIXME (issue #76): we should actually check here that the

trunk/src/boot/me/semant.ml

+8-4
Original file line numberDiff line numberDiff line change
@@ -1406,7 +1406,7 @@ let exports_permit (view:Ast.mod_view) (ident:Ast.ident) : bool =
14061406
;;
14071407

14081408
(* NB: this will fail if lval is not an item. *)
1409-
let rec lval_item (cx:ctxt) (lval:Ast.lval) : Ast.mod_item =
1409+
let rec lval_item ?node_id:node_id (cx:ctxt) (lval:Ast.lval) : Ast.mod_item =
14101410
match lval with
14111411
Ast.LVAL_base _ ->
14121412
let defn_id = lval_base_defn_id cx lval in
@@ -1429,9 +1429,13 @@ let rec lval_item (cx:ctxt) (lval:Ast.lval) : Ast.mod_item =
14291429
in
14301430
match htab_search items i with
14311431
| Some sub when exports_permit view i ->
1432-
assert
1433-
((Array.length sub.node.Ast.decl_params) =
1434-
(Array.length args));
1432+
if Array.length sub.node.Ast.decl_params !=
1433+
(Array.length args) then
1434+
err node_id
1435+
"%a has %d type-params but %d given"
1436+
Ast.sprintf_mod_item ("", sub)
1437+
(Array.length sub.node.Ast.decl_params)
1438+
(Array.length args);
14351439
check_concrete base_item.node.Ast.decl_params sub
14361440
| _ -> err (Some (lval_base_id lval))
14371441
"unknown module item '%s'" i

0 commit comments

Comments
 (0)