Browse Source

Fix #778: Errors about decompiling local variables and default for switch-cases

pull/887/head
Siegfried Pammer 8 years ago
parent
commit
180f534178
  1. 12
      ICSharpCode.Decompiler/IL/Transforms/DelegateConstruction.cs

12
ICSharpCode.Decompiler/IL/Transforms/DelegateConstruction.cs

@ -228,6 +228,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -228,6 +228,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
public TransformDisplayClassUsages(IInstructionWithVariableOperand targetLoad, BlockContainer captureScope, List<ILInstruction> orphanedVariableInits)
{
this.currentFunction = captureScope.Ancestors.OfType<ILFunction>().First();
this.targetLoad = targetLoad;
this.captureScope = captureScope;
this.orphanedVariableInits = orphanedVariableInits;
@ -241,17 +242,6 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -241,17 +242,6 @@ namespace ICSharpCode.Decompiler.IL.Transforms
}
}
protected internal override void VisitILFunction(ILFunction function)
{
var old = currentFunction;
currentFunction = function;
try {
base.VisitILFunction(function);
} finally {
currentFunction = old;
}
}
protected internal override void VisitStLoc(StLoc inst)
{
base.VisitStLoc(inst);

Loading…
Cancel
Save