diff --git a/tests/misc/projects/Issue11625/Macro.hx b/tests/misc/projects/Issue11625/Macro.hx new file mode 100644 index 00000000000..f4cd459cbd3 --- /dev/null +++ b/tests/misc/projects/Issue11625/Macro.hx @@ -0,0 +1,5 @@ +function build() { + var cls = haxe.macro.Context.getLocalClass().get(); + cls.meta.add(":using", [macro Main.Extensions], cls.pos); + return null; +} diff --git a/tests/misc/projects/Issue11625/Main.hx b/tests/misc/projects/Issue11625/Main.hx new file mode 100644 index 00000000000..aa17ed4e317 --- /dev/null +++ b/tests/misc/projects/Issue11625/Main.hx @@ -0,0 +1,10 @@ +function main() { + Foo.test(); +} + +class Extensions { + public static function test(c:Class) trace("ok"); +} + +@:build(Macro.build()) +class Foo {} diff --git a/tests/misc/projects/Issue11625/compile.hxml b/tests/misc/projects/Issue11625/compile.hxml new file mode 100644 index 00000000000..42409e72918 --- /dev/null +++ b/tests/misc/projects/Issue11625/compile.hxml @@ -0,0 +1 @@ +-main Main