From d5b03d4b052023012b859071e2bd6ff754256cab Mon Sep 17 00:00:00 2001 From: herbelin Date: Wed, 28 Oct 2009 17:37:01 +0000 Subject: Fixed a bug when reporting unexisting reference to an inductive (introduced in r12323). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12438 85f007b7-540e-0410-9357-904b9bb8a0f7 --- interp/smartlocate.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'interp/smartlocate.ml') diff --git a/interp/smartlocate.ml b/interp/smartlocate.ml index f16f5363c..9b4ff860c 100644 --- a/interp/smartlocate.ml +++ b/interp/smartlocate.ml @@ -37,11 +37,13 @@ let locate_global_with_alias (loc,qid) = str " is bound to a notation that does not denote a reference") let global_inductive_with_alias r = - match locate_global_with_alias (qualid_of_reference r) with + let (loc,qid as lqid) = qualid_of_reference r in + try match locate_global_with_alias lqid with | IndRef ind -> ind | ref -> user_err_loc (loc_of_reference r,"global_inductive", pr_reference r ++ spc () ++ str "is not an inductive type") + with Not_found -> Nametab.error_global_not_found_loc loc qid let global_with_alias r = let (loc,qid as lqid) = qualid_of_reference r in -- cgit v1.2.3