Просмотр исходного кода

Support @:haxe.warning options for @:enum deprecation warning

Rudy Ges 2 лет назад
Родитель
Сommit
34afe73f3c
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/typing/typeloadModule.ml

+ 3 - 1
src/typing/typeloadModule.ml

@@ -202,7 +202,9 @@ module ModuleLevel = struct
 				begin match p_enum_meta with
 				begin match p_enum_meta with
 					| None when a.a_enum -> a.a_meta <- (Meta.Enum,[],null_pos) :: a.a_meta; (* HAXE5: remove *)
 					| None when a.a_enum -> a.a_meta <- (Meta.Enum,[],null_pos) :: a.a_meta; (* HAXE5: remove *)
 					| None -> ()
 					| None -> ()
-					| Some p -> warning ctx WDeprecated "`@:enum abstract` is deprecated in favor of `enum abstract`" p
+					| 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
 				end;
 				end;
 				decls := (TAbstractDecl a, decl) :: !decls;
 				decls := (TAbstractDecl a, decl) :: !decls;
 				match d.d_data with
 				match d.d_data with