aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/CompilerServices
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-06-22 12:48:11 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2015-06-22 12:48:11 +0200
commit8c99bee3d98f7c3221e969c2924d87729ba7faea (patch)
treea9d397745c633f2306762e740486da8413b84223 /src/CompilerServices
parentdc995bd1da98971009454f4efe043d6237d00729 (diff)
- simplify value change with only actual value, not the old one
- First tests with Scrollbar
Diffstat (limited to 'src/CompilerServices')
-rw-r--r--src/CompilerServices/CompilerServices.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/CompilerServices/CompilerServices.cs b/src/CompilerServices/CompilerServices.cs
index ae4b700a..7bd91805 100644
--- a/src/CompilerServices/CompilerServices.cs
+++ b/src/CompilerServices/CompilerServices.cs
@@ -270,8 +270,10 @@ namespace go
if (!srcValueType.IsValueType)
il.Emit(OpCodes.Castclass, srcValueType);
+ else if (piTarget.PropertyType != srcValueType)
+ il.Emit(OpCodes.Callvirt, GetConvertMethod( piTarget.PropertyType ));
else
- il.Emit( OpCodes.Callvirt, GetConvertMethod( piTarget.PropertyType ));
+ il.Emit(OpCodes.Unbox_Any, piTarget.PropertyType);
// if (piTarget.PropertyType == typeof(string))
// else if ( srcValueType != piTarget.PropertyType)
//