Browse Source

require abstracts with subtypes to have an implementation (fixed issue #1414)

Simon Krajewski 12 years ago
parent
commit
a6ed460433
1 changed files with 1 additions and 0 deletions
  1. 1 0
      typeload.ml

+ 1 - 0
typeload.ml

@@ -1889,6 +1889,7 @@ let rec init_module_type ctx context_init do_init (decl,p) =
 			| AFromType t -> a.a_from <- (load_type t, None) :: a.a_from
 			| AToType t -> a.a_to <- (load_type t, None) :: a.a_to
 			| AIsType t ->
+				if a.a_impl = None then error "Abstracts with subtypes must have an implementation" a.a_pos;
 				a.a_this <- load_complex_type ctx p t;
 				is_type := true;
 			| APrivAbstract -> ()