File tree 3 files changed +11
-7
lines changed
3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 3d0da7545588e22c734c21d1bf81d610a3d3f3cc
2
+ refs/heads/master: b3c4c1426a54d3dfbfae9ab4e54d18875d01885e
Original file line number Diff line number Diff line change @@ -768,12 +768,12 @@ let pattern_resolving_visitor
768
768
end
769
769
in
770
770
771
- let resolve_arm { node = arm ; id = _ } =
771
+ let resolve_arm { node = arm ; id = id } =
772
772
match fst arm with
773
773
Ast. PAT_tag (lval , pats ) ->
774
774
let lval_nm = lval_to_name lval in
775
775
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
777
777
if defn_id_is_item cx tag_ctor_id
778
778
779
779
(* FIXME (issue #76): we should actually check here that the
Original file line number Diff line number Diff line change @@ -1406,7 +1406,7 @@ let exports_permit (view:Ast.mod_view) (ident:Ast.ident) : bool =
1406
1406
;;
1407
1407
1408
1408
(* 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 =
1410
1410
match lval with
1411
1411
Ast. LVAL_base _ ->
1412
1412
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 =
1429
1429
in
1430
1430
match htab_search items i with
1431
1431
| 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);
1435
1439
check_concrete base_item.node.Ast. decl_params sub
1436
1440
| _ -> err (Some (lval_base_id lval))
1437
1441
" unknown module item '%s'" i
You can’t perform that action at this time.
0 commit comments