Sfoglia il codice sorgente

add test for #6067, mention the fix in changelog

Dan Korostelev 8 anni fa
parent
commit
ceab7d1f7c
2 ha cambiato i file con 20 aggiunte e 0 eliminazioni
  1. 1 0
      extra/CHANGES.txt
  2. 19 0
      tests/unit/src/unit/issues/Issue6067.hx

+ 1 - 0
extra/CHANGES.txt

@@ -7,6 +7,7 @@ next release
 	Bugfixes:
 
 	all : fixed compilation server issue with two identical @:native paths on extern abstracts (#5993)
+	all : fixed invalid inling in a specific case (#6067)
 	php : fixed FileSystem.stat() for directories on Windows (#6057)
 	php/php7 : fixed invalid result of Web.getPostData() (#6033)
 	php7 : fixed invalid access to length of string in some cases (#6055)

+ 19 - 0
tests/unit/src/unit/issues/Issue6067.hx

@@ -0,0 +1,19 @@
+package unit.issues;
+
+class Issue6067 extends unit.Test {
+	function doIt(v) {
+		var r = 1;
+		(function() {
+			if (v) {
+				function f() return 1;
+				r = 2;
+			}
+			r = 3;
+		})();
+		return r;
+	}
+
+	function test() {
+		eq(3, doIt(true));
+	}
+}