From d49bc44d3a21b277c002fa0812133e67b4e3d839 Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Tue, 18 Oct 2016 18:03:07 +0200 Subject: [PATCH] dont try to find covertion methode to object in emitted MSIL --- src/CompilerServices/CompilerServices.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.47.3