Skip to content

Commit

Permalink
[macro] Fix abstract casts for local statics (#11301)
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz authored Aug 31, 2023
1 parent 0b9e384 commit 8878b58
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/typing/macroContext.ml
Original file line number Diff line number Diff line change
Expand Up @@ -608,8 +608,8 @@ and flush_macro_context mint mctx =
mctx.com.Common.modules <- modules;
(* we should maybe ensure that all filters in Main are applied. Not urgent atm *)
let expr_filters = [
"local_statics",Filters.LocalStatic.run mctx;
"handle_abstract_casts",AbstractCast.handle_abstract_casts mctx;
"local_statics",Filters.LocalStatic.run mctx;
"Exceptions",Exceptions.filter mctx;
"captured_vars",CapturedVars.captured_vars mctx.com;
] in
Expand Down
6 changes: 6 additions & 0 deletions tests/misc/projects/Issue11193/Macro.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class Macro {
static function test() {
static var m:Map<Int, String> = [];
trace(m);
}
}
1 change: 1 addition & 0 deletions tests/misc/projects/Issue11193/compile.hxml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--macro Macro.test()

0 comments on commit 8878b58

Please sign in to comment.