Parcourir la source

Use WDeprecatedEnumAbstract for @:enum deprecation warnings

Rudy Ges il y a 2 ans
Parent
commit
ea57ab1ef6
2 fichiers modifiés avec 6 ajouts et 1 suppressions
  1. 5 0
      src-json/warning.json
  2. 1 1
      src/typing/typeloadModule.ml

+ 5 - 0
src-json/warning.json

@@ -63,6 +63,11 @@
 		"doc": "This define is deprecated and should no longer be used",
 		"parent": "WDeprecated"
 	},
+	{
+		"name": "WDeprecatedEnumAbstract",
+		"doc": "`@:enum abstract` is deprecated, `enum abstract` should be used instead",
+		"parent": "WDeprecated"
+	},
 	{
 		"name": "WVarInit",
 		"doc": "A local variable might be used before being assigned a value",

+ 1 - 1
src/typing/typeloadModule.ml

@@ -204,7 +204,7 @@ module ModuleLevel = struct
 					| None -> ()
 					| Some p ->
 						let options = Warning.from_meta d.d_meta in
-						ctx.com.warning WDeprecated options "`@:enum abstract` is deprecated in favor of `enum abstract`" p
+						ctx.com.warning WDeprecatedEnumAbstract options "`@:enum abstract` is deprecated in favor of `enum abstract`" p
 				end;
 				decls := (TAbstractDecl a, decl) :: !decls;
 				match d.d_data with