aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/CompilerServices/CompilerServices.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/CompilerServices/CompilerServices.cs')
-rw-r--r--src/CompilerServices/CompilerServices.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/CompilerServices/CompilerServices.cs b/src/CompilerServices/CompilerServices.cs
index 96f12963..305c9a5f 100644
--- a/src/CompilerServices/CompilerServices.cs
+++ b/src/CompilerServices/CompilerServices.cs
@@ -362,7 +362,7 @@ namespace Crow
il.Emit (OpCodes.Callvirt, tostring.Method);
} else if (!sourceValueType.IsValueType)
il.Emit (OpCodes.Castclass, sourceValueType);
- else if (b.Source.Property.PropertyType != sourceValueType) {
+ else if (b.Source.Property.PropertyType != sourceValueType && b.Source.Property.PropertyType != typeof(object)) {
il.Emit (OpCodes.Callvirt, CompilerServices.GetConvertMethod (b.Source.Property.PropertyType));
} else
il.Emit (OpCodes.Unbox_Any, b.Source.Property.PropertyType);