Skip to content

Commit

Permalink
[macro] only apply @:native for extern enums
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Apr 12, 2024
1 parent 5c52e4d commit 0ef4b33
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/typing/macroContext.ml
Original file line number Diff line number Diff line change
Expand Up @@ -633,13 +633,9 @@ and flush_macro_context mint mctx =
()
in
(* Apply native paths for externs only *)
let maybe_apply_native_paths t =
let apply_native = match t with
| TClassDecl c -> has_class_flag c CExtern
| TEnumDecl e -> e.e_extern
| _ -> false
in
if apply_native then Naming.apply_native_paths t
let maybe_apply_native_paths t = match t with
| TEnumDecl e when e.e_extern -> Naming.apply_native_paths t
| _ -> ()
in
let type_filters = [
FiltersCommon.remove_generic_base;
Expand Down

0 comments on commit 0ef4b33

Please sign in to comment.