tobil4sk 2 gadi atpakaļ
vecāks
revīzija
3478049d71

+ 10 - 0
tests/misc/projects/Issue5854/NamedLocal.hx

@@ -0,0 +1,10 @@
+class NamedLocal {
+	static function main() {
+		// shouldn't be parsed as a call
+		function test(str) {
+			trace(str);
+			throw "This function shouldn't have been called!!";
+		}
+		("hello");
+	}
+}

+ 8 - 0
tests/misc/projects/Issue5854/UnnamedLocal.hx

@@ -0,0 +1,8 @@
+class UnnamedLocal {
+	static function main() {
+		function(str) {
+			trace(str);
+		}
+		("hello");
+	}
+}

+ 1 - 0
tests/misc/projects/Issue5854/compile-fail.hxml

@@ -0,0 +1 @@
+--main UnnamedLocal

+ 1 - 0
tests/misc/projects/Issue5854/compile-fail.hxml.stderr

@@ -0,0 +1 @@
+UnnamedLocal.hx:3: lines 3-5 : Unnamed lvalue functions are not supported

+ 1 - 0
tests/misc/projects/Issue5854/compile.hxml

@@ -0,0 +1 @@
+--run NamedLocal

+ 0 - 0
tests/misc/projects/Issue5854/compile.hxml.stderr