diff options
| author | Patrick Walton <[email protected]> | 2010-10-22 15:10:48 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-10-22 15:12:48 -0700 |
| commit | fc8b5155a87b5a9ae2313f7282cab9893f4b9f3e (patch) | |
| tree | cbe23737b6920e1f0f33e29ba5cf81d4115e52bd /src/boot/me/semant.ml | |
| parent | Add makefile bits to run rustc on the testsuite as part of 'make check'. Most... (diff) | |
| download | rust-fc8b5155a87b5a9ae2313f7282cab9893f4b9f3e.tar.xz rust-fc8b5155a87b5a9ae2313f7282cab9893f4b9f3e.zip | |
rustboot: If the user tries to instantiate a non-parametric type with type parameters, report the location of the error
Diffstat (limited to 'src/boot/me/semant.ml')
| -rw-r--r-- | src/boot/me/semant.ml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/boot/me/semant.ml b/src/boot/me/semant.ml index 4f278d12..63b52445 100644 --- a/src/boot/me/semant.ml +++ b/src/boot/me/semant.ml @@ -1043,6 +1043,7 @@ let rec pretty_ty_str (cx:ctxt) (fallback:(Ast.ty -> string)) (ty:Ast.ty) = ;; let rec rebuild_ty_under_params + ?node_id:id_opt (cx:ctxt) (src_tag:Ast.ty_tag option) (ty:Ast.ty) @@ -1052,7 +1053,7 @@ let rec rebuild_ty_under_params : Ast.ty = if (Array.length params) <> (Array.length args) then - err None + err id_opt "mismatched type-params: %s has %d param(s) but %d given" (pretty_ty_str cx (Ast.sprintf_ty ()) ty) (Array.length params) |