Author: manjula
Date: 2005-03-08 01:15:47 -0500 (Tue, 08 Mar 2005)
New Revision: 41549
Modified:
trunk/mcs/mbas/ChangeLog
trunk/mcs/mbas/assign.cs
Log:
Bug fix - new Object creation and object assignment
Modified: trunk/mcs/mbas/ChangeLog
===================================================================
--- trunk/mcs/mbas/ChangeLog 2005-03-08 06:11:19 UTC (rev 41548)
+++ trunk/mcs/mbas/ChangeLog 2005-03-08 06:15:47 UTC (rev 41549)
@@ -1,3 +1,5 @@
+2005-03-08 Manjula GHM <[EMAIL PROTECTED]>
+ *assign.cs : Bug fix - new Object creation and object assignment
2005-03-07 Satya Sudha K <[EMAIL PROTECTED]>
* mb-parser.jay : Support for shift operators
* assign.cs : Calling 'RuntimeHelpers.GetObjectValue' during new
Object creation
Modified: trunk/mcs/mbas/assign.cs
===================================================================
--- trunk/mcs/mbas/assign.cs 2005-03-08 06:11:19 UTC (rev 41548)
+++ trunk/mcs/mbas/assign.cs 2005-03-08 06:15:47 UTC (rev 41549)
@@ -336,7 +336,7 @@
}
}
- if (source is New && target_type.IsValueType){
+ if (source is New || target_type ==
TypeManager.object_type) {
if (source_type == TypeManager.object_type) {
Expression etmp =
Mono.MonoBASIC.Parser.DecomposeQI (
"System.Runtime.CompilerServices.RuntimeHelpers.GetObjectValue",
@@ -347,10 +347,11 @@
source = e.Resolve (ec);
return this;
}
-
- New n = (New) source;
- n.ValueTypeVariable = target;
- return n;
+ if (target_type.IsValueType) {
+ New n = (New) source;
+ n.ValueTypeVariable = target;
+ return n;
+ }
}
if (target.eclass != ExprClass.Variable &&
target.eclass != ExprClass.EventAccess){
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches