Browse Source

Add a test to make sure invalid paths in expression macros error too

Jens Fischer 6 years ago
parent
commit
a5130990c7

+ 15 - 0
tests/misc/projects/Issue8019/Main.hx

@@ -0,0 +1,15 @@
+import haxe.macro.Expr;
+import haxe.macro.Context;
+
+class Main {
+	static function main() {
+		invalidPackage();
+	}
+
+	static macro function invalidPackage() {
+		return {
+			expr: ENew({name: "Foo", pack: ["0"]}, []),
+			pos: Context.currentPos()
+		};
+	}
+}

+ 1 - 0
tests/misc/projects/Issue8019/compile2-fail.hxml

@@ -0,0 +1 @@
+-main Main

+ 2 - 0
tests/misc/projects/Issue8019/compile2-fail.hxml.stderr

@@ -0,0 +1,2 @@
+Type not found : 0.Foo
+Main.hx:4: lines 4-15 : Defined in this class