浏览代码

allow overrides in core_api

Nicolas Cannasse 13 年之前
父节点
当前提交
ba5161c3e0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      typeload.ml

+ 1 - 1
typeload.ml

@@ -662,7 +662,7 @@ let init_core_api ctx c =
 			) fcore;
 			PMap.iter (fun i f ->
 				let p = (match f.cf_expr with None -> c.cl_pos | Some e -> e.epos) in
-				if f.cf_public && not (PMap.mem f.cf_name fcore) then error ("Public field " ^ i ^ " is not part of core type") p;
+				if f.cf_public && not (PMap.mem f.cf_name fcore) && not (List.mem f.cf_name c.cl_overrides) then error ("Public field " ^ i ^ " is not part of core type") p;
 			) fl;
 		in
 		check_fields ccore.cl_fields c.cl_fields;