Author: marek
Date: 2008-01-03 06:56:14 -0500 (Thu, 03 Jan 2008)
New Revision: 92163
Modified:
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/statement.cs
Log:
2008-01-03 Marek Safar <[EMAIL PROTECTED]>
A fix for bug #351157
* class.cs (Using): Fixed yet another broken cloning.
(Block): Put back more sensible default value for statements.
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2008-01-03 09:51:38 UTC (rev 92162)
+++ trunk/mcs/mcs/ChangeLog 2008-01-03 11:56:14 UTC (rev 92163)
@@ -1,3 +1,10 @@
+2008-01-03 Marek Safar <[EMAIL PROTECTED]>
+
+ A fix for bug #351157
+ * class.cs (Using): Fixed yet another broken cloning.
+
+ (Block): Put back more sensible default value for statements.
+
2008-01-01 Gert Driesen <[EMAIL PROTECTED]>
* codegen.cs: Allow AssemblyVersion with only major version component.
Modified: trunk/mcs/mcs/statement.cs
===================================================================
--- trunk/mcs/mcs/statement.cs 2008-01-03 09:51:38 UTC (rev 92162)
+++ trunk/mcs/mcs/statement.cs 2008-01-03 11:56:14 UTC (rev 92163)
@@ -1572,7 +1572,7 @@
this.EndLocation = end;
this.loc = start;
this_id = id++;
- statements = new ArrayList (1);
+ statements = new ArrayList (4);
}
public Block CreateSwitchBlock (Location start)
@@ -4731,10 +4731,22 @@
{
Using target = (Using) t;
- if (expression_or_block is Expression)
+ if (expression_or_block is Expression) {
target.expression_or_block = ((Expression)
expression_or_block).Clone (clonectx);
- else
- target.expression_or_block = ((Statement)
expression_or_block).Clone (clonectx);
+ } else {
+ DictionaryEntry de = (DictionaryEntry)
expression_or_block;
+ ArrayList var_list = (ArrayList) de.Value;
+ ArrayList target_var_list = new ArrayList
(var_list.Count);
+
+ foreach (DictionaryEntry de_variable in
var_list)
+ target_var_list.Add (new
DictionaryEntry (
+ ((Expression)
de_variable.Key).Clone (clonectx),
+ ((Expression)
de_variable.Value).Clone (clonectx)));
+
+ target.expression_or_block = new
DictionaryEntry (
+ ((Expression) de.Key).Clone (clonectx),
+ target_var_list);
+ }
target.Statement = Statement.Clone (clonectx);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches