浏览代码

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

Simon Krajewski 12 年之前
父节点
当前提交
a6ed460433
共有 1 个文件被更改,包括 1 次插入0 次删除
  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 -> ()