Skip to content

Commit 641120d

Browse files
committed
[tests] add failing test demonstrating the issue
1 parent 6863504 commit 641120d

File tree

7 files changed

+39
-0
lines changed

7 files changed

+39
-0
lines changed

tests/misc/projects/Issue11740/Baz.hx

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import foo.Foo;
2+
3+
class Baz {
4+
function baz(data:foo.FooData) {}
5+
}
6+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import haxe.macro.Context;
2+
3+
class Macro {
4+
public static function build() {
5+
trace("build FooData");
6+
7+
Context.defineType({
8+
pos : Context.currentPos(),
9+
name : "FooData",
10+
pack : ["foo"],
11+
kind : TDClass(),
12+
fields : [],
13+
});
14+
15+
return null;
16+
}
17+
}
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import foo.Foo;
2+
3+
function main() {
4+
trace(Baz);
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-main Main
2+
--interp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Macro.macro.hx:5: build FooData
2+
Main.hx:4: Class<Baz>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-main Main
2+
Baz
3+
--interp
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
package foo;
2+
3+
@:build(Macro.build())
4+
class Foo {}

0 commit comments

Comments
 (0)