From 987f2ffcf62795f9967138d2e8460e7ca0066762 Mon Sep 17 00:00:00 2001 From: herbelin Date: Sat, 19 Nov 2005 10:36:08 +0000 Subject: Correction de la correction du test sur le nombre de parametres d'une projection git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7590 85f007b7-540e-0410-9357-904b9bb8a0f7 --- interp/constrintern.ml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'interp') diff --git a/interp/constrintern.ml b/interp/constrintern.ml index b7be8502d..d59d3871d 100644 --- a/interp/constrintern.ml +++ b/interp/constrintern.ml @@ -651,13 +651,13 @@ let merge_impargs l args = | _ -> a::l) l args -let check_projection isproj r = +let check_projection isproj nargs r = match (r,isproj) with - | RRef (loc, ref), Some nth -> + | RRef (loc, ref), Some _ -> (try let n = Recordops.find_projection_nparams ref + 1 in - if nth < n then - user_err_loc (loc,"",str "Projection has not enough parameters"); + if nargs <> n then + user_err_loc (loc,"",str "Projection has not the right number of explicit parameters"); with Not_found -> user_err_loc (loc,"",pr_global_env Idset.empty ref ++ str " is not a registered projection")) @@ -862,7 +862,7 @@ let internalise sigma env allow_soapp lvar c = intern (ids,None,find_delimiters_scope loc key::scopes) e | CAppExpl (loc, (isproj,ref), args) -> let (f,_,args_scopes,_) = intern_reference env lvar ref in - check_projection isproj f; + check_projection isproj (List.length args) f; RApp (loc, f, intern_args env args_scopes args) | CApp (loc, (isproj,f), args) -> let isproj,f,args = match f with @@ -879,7 +879,7 @@ let internalise sigma env allow_soapp lvar c = | x -> (intern env f,[],[],[]) in let args = intern_impargs c env impargs args_scopes (merge_impargs l args) in - check_projection isproj c; + check_projection isproj (List.length args) c; (match c with (* Now compact "(f args') args" *) | RApp (loc', f', args') -> RApp (join_loc loc' loc, f',args'@args) -- cgit v1.2.3