fix PR#5858

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13137 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Jacques Garrigue 2012-12-18 09:58:32 +00:00
parent e174901c93
commit 37406cc484
4 changed files with 14 additions and 3 deletions

View File

@ -69,7 +69,7 @@ Bug fixes:
- PR#5798: add ARM VFPv2 support for Raspbian (ocamlopt)
- PR#5806: ensure that backtrace tests are always run (testsuite)
- PR#5810: error in switch printing when using -dclambda
- PR#5858: Assert failure during typing of class
OCaml 4.00.1:
-------------

View File

@ -0,0 +1,2 @@
class type c = object end;;
module type S = sig class c: c end;;

View File

@ -0,0 +1,7 @@
# class type c = object end
# Characters 29-30:
module type S = sig class c: c end;;
^
Error: The class type c is not yet completely defined
#

View File

@ -682,8 +682,10 @@ let path_subst_last path id =
| Papply (p1, p2) -> assert false
let mark_type_path env path =
let decl = try find_type path env with Not_found -> assert false in
mark_type_used (Path.last path) decl
try
let decl = find_type path env in
mark_type_used (Path.last path) decl
with Not_found -> ()
let ty_path t =
match repr t with