Skip to content

Commit

Permalink
Support @:haxe.warning options for @:enum deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed May 7, 2023
1 parent c6dcecc commit 34afe73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/typing/typeloadModule.ml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,9 @@ module ModuleLevel = struct
begin match p_enum_meta with
| None when a.a_enum -> a.a_meta <- (Meta.Enum,[],null_pos) :: a.a_meta; (* HAXE5: remove *)
| 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;
decls := (TAbstractDecl a, decl) :: !decls;
match d.d_data with
Expand Down

0 comments on commit 34afe73

Please sign in to comment.