Fixed unboxing for value types

このコミットが含まれているのは:
Sergio Pedri committed 2019-09-15 15:15:45 +02:00
1 親 6a63c9cb8e
コミット f5093e21b8
1ファイル変更
+1 -1
+1 -1
ファイルの表示
@@ -47,7 +47,7 @@ namespace ComputeSharp.Shaders.Translation.Models
// Load the argument (the object instance) and cast it to the right type
il.Emit(OpCodes.Ldarg_0);
il.Emit(OpCodes.Castclass, DeclaringType);
il.Emit(DeclaringType.IsValueType ? OpCodes.Unbox : OpCodes.Castclass, DeclaringType);
// Get the member value with the appropriate method
if (Property != null) il.EmitCall(OpCodes.Callvirt, Property.GetMethod, null);