Skip to content

Commit 4bb675b

Browse files
committed
Print better error messages when the number of type params is wrong
1 parent 28d4367 commit 4bb675b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/boot/me/semant.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -978,7 +978,12 @@ let rec rebuild_ty_under_params
978978
(resolve_names:bool)
979979
: Ast.ty =
980980
if (Array.length params) <> (Array.length args)
981-
then err None "mismatched type-params"
981+
then
982+
err None
983+
"mismatched type-params: %s has %d param(s) but %d given"
984+
(Ast.sprintf_ty () ty)
985+
(Array.length params)
986+
(Array.length args)
982987
else
983988
let nmap = Hashtbl.create (Array.length args) in
984989
let pmap = Hashtbl.create (Array.length args) in

0 commit comments

Comments
 (0)