Browse Source

Fix #1200: assertion in TransformInlineAssignmentLocal when reconstructed stack slot (after async-await transform) has small integer type.

The assertion was unnecessary, because we already check 'IsImplicitTruncation(inst.Value, inst.Variable.Type)'.
pull/1243/head
Daniel Grunwald 7 years ago
parent
commit
066da1ea16
  1. 1
      ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs

1
ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs

@ -337,7 +337,6 @@ namespace ICSharpCode.Decompiler.IL.Transforms
return false; return false;
if (inst.Variable.Kind != VariableKind.StackSlot) if (inst.Variable.Kind != VariableKind.StackSlot)
return false; return false;
Debug.Assert(!inst.Variable.Type.IsSmallIntegerType());
if (!(nextInst.Variable.Kind == VariableKind.Local || nextInst.Variable.Kind == VariableKind.Parameter)) if (!(nextInst.Variable.Kind == VariableKind.Local || nextInst.Variable.Kind == VariableKind.Parameter))
return false; return false;
if (!nextInst.Value.MatchLdLoc(inst.Variable)) if (!nextInst.Value.MatchLdLoc(inst.Variable))

Loading…
Cancel
Save