]> O.S.I.I.S - jp/crow.git/commitdiff
replace castclass by IsInst when sure it's not null
authorjpbruyere <jp.bruyere@hotmail.com>
Thu, 22 Dec 2016 09:41:50 +0000 (10:41 +0100)
committerjpbruyere <jp.bruyere@hotmail.com>
Thu, 22 Dec 2016 09:41:50 +0000 (10:41 +0100)
src/Instantiator.cs

index 90cb80451d7578c9fdf572d643401a10a47ceae3..d4178dbf4781e34d481fdf4f5e965e21163fad41 100644 (file)
@@ -1124,7 +1124,7 @@ namespace Crow
                        if (dstType.IsValueType)
                                il.Emit (OpCodes.Unbox_Any, dstType);
                        else
-                               il.Emit (OpCodes.Castclass, dstType);
+                               il.Emit (OpCodes.Isinst, dstType);
                        il.Emit (OpCodes.Br, endConvert);
 
                        il.MarkLabel (convert);