Browse Source

Fix IsUsedAsThisPointerInCall: if we deal with an unspecified generic type, we assume it's a value type as ldloca should be allowed as this pointer in those cases.

pull/897/head
Siegfried Pammer 8 years ago
parent
commit
1ebc7581d8
  1. 2
      ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs

2
ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs

@ -206,7 +206,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -206,7 +206,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
{
if (ldloca.ChildIndex != 0)
return false;
if (ldloca.Variable.Type.IsReferenceType != false)
if (ldloca.Variable.Type.IsReferenceType ?? false)
return false;
switch (ldloca.Parent.OpCode) {
case OpCode.Call:

Loading…
Cancel
Save