|
@@ -661,7 +661,6 @@ let add_rtti ctx t =
|
|
|
let remove_extern_fields ctx t = match t with
|
|
|
| TClassDecl c ->
|
|
|
let do_remove f =
|
|
|
- (match follow f.cf_type with TAbstract({a_path=[],"Void"},_) -> error "Fields of type Void are not allowed" f.cf_pos | _ -> ());
|
|
|
(not ctx.in_macro && f.cf_kind = Method MethMacro) || has_meta ":extern" f.cf_meta || has_meta ":generic" f.cf_meta
|
|
|
in
|
|
|
if not (Common.defined ctx.com Define.DocGen) then begin
|
|
@@ -776,6 +775,17 @@ let check_remove_metadata ctx t = match t with
|
|
|
| _ ->
|
|
|
()
|
|
|
|
|
|
+(* Checks for Void class fields *)
|
|
|
+let check_void_field ctx t = match t with
|
|
|
+ | TClassDecl c ->
|
|
|
+ let check f =
|
|
|
+ match follow f.cf_type with TAbstract({a_path=[],"Void"},_) -> error "Fields of type Void are not allowed" f.cf_pos | _ -> ();
|
|
|
+ in
|
|
|
+ List.iter check c.cl_ordered_fields;
|
|
|
+ List.iter check c.cl_ordered_statics;
|
|
|
+ | _ ->
|
|
|
+ ()
|
|
|
+
|
|
|
(* -------------------------------------------------------------------------- *)
|
|
|
(* LOCAL VARIABLES USAGE *)
|
|
|
|