Browse Source

add no-deprecation-warnings check for typedefs (closes #4317)

Simon Krajewski 10 years ago
parent
commit
c904006689
1 changed files with 2 additions and 1 deletions
  1. 2 1
      typer.ml

+ 2 - 1
typer.ml

@@ -860,7 +860,8 @@ let rec type_module_type ctx t tparams p =
 		mk (TTypeExpr (TEnumDecl e)) (TType (e.e_type,types)) p
 		mk (TTypeExpr (TEnumDecl e)) (TType (e.e_type,types)) p
 	| TTypeDecl s ->
 	| TTypeDecl s ->
 		let t = apply_params s.t_params (List.map (fun _ -> mk_mono()) s.t_params) s.t_type in
 		let t = apply_params s.t_params (List.map (fun _ -> mk_mono()) s.t_params) s.t_type in
-		Codegen.DeprecationCheck.check_typedef ctx.com s p;
+		if not (Common.defined ctx.com Define.NoDeprecationWarnings) then
+			Codegen.DeprecationCheck.check_typedef ctx.com s p;
 		(match follow t with
 		(match follow t with
 		| TEnum (e,params) ->
 		| TEnum (e,params) ->
 			type_module_type ctx (TEnumDecl e) (Some params) p
 			type_module_type ctx (TEnumDecl e) (Some params) p