diff options
author | 2013-03-22 16:45:35 +0000 | |
---|---|---|
committer | 2013-03-22 16:45:35 +0000 | |
commit | 1cc5c0da0b5335c8773efd27e678178ef5e9c5f1 (patch) | |
tree | 67feba4f2ab227bec5cdbee24f936046d40b1dcf /pretyping | |
parent | 8646837a56962c9319d7fd428a72223b947ac141 (diff) |
Fix bug# 2994, 2971 about better error messages.
Fix bug# 2956, porting fix from 8.4 branch
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16349 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'pretyping')
-rw-r--r-- | pretyping/typeclasses.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pretyping/typeclasses.ml b/pretyping/typeclasses.ml index 80207f652..34f8f07f9 100644 --- a/pretyping/typeclasses.ml +++ b/pretyping/typeclasses.ml @@ -382,7 +382,9 @@ let add_class cl = List.iter (fun (n, inst, body) -> match inst with | Some (Backward, pri) -> - declare_instance pri false (ConstRef (Option.get body)) + (match body with + | None -> Errors.error "Non-definable projection can not be declared as a subinstance" + | Some b -> declare_instance pri false (ConstRef b)) | _ -> ()) cl.cl_projs |