瀏覽代碼

2006-01-17 Cesar Lopez Nataren <[email protected]>

	* Parser.cs: Propagate the proper parent.  Fixes #75166.

svn path=/trunk/mcs/; revision=55705
César Natarén 20 年之前
父節點
當前提交
012f7ec92e

+ 3 - 2
mcs/class/Microsoft.JScript/Microsoft.JScript/ChangeLog

@@ -1,8 +1,9 @@
 2006-01-17  Cesar Lopez Nataren  <[email protected]>
 
+	* Parser.cs: Propagate the proper parent.  Fixes #75166.
+
 	* ast.cs: Added virtual method PropagateParent for recovering a
-	lost parent or set it up properly if previously set to null. Fixes
-	#75166.
+	lost parent or set it up properly if previously set to null.
 
 	* Statement.cs (If,Jump,Break.PropagateParent): recover
 	the proper parent.

+ 1 - 1
mcs/class/Microsoft.JScript/Microsoft.JScript/Parser.cs

@@ -639,7 +639,7 @@ namespace Microsoft.JScript {
 					pn = new ForIn (parent, init, cond, body, new Location (ts.SourceName, ts.LineNumber));
 				else
 					pn = new For (parent, init, cond, incr, body, new Location (ts.SourceName, ts.LineNumber));
-				body.parent = pn;
+				body.PropagateParent (pn);
 			} else if (tt == Token.TRY) {
 				int line_number = ts.LineNumber;
 				AST try_block;