Browse Source

Recover collection initializers using call opcode

pull/309/head
Jb Evain 14 years ago
parent
commit
8e4d8226f1
  1. 2
      ICSharpCode.Decompiler/ILAst/InitializerPeepholeTransforms.cs

2
ICSharpCode.Decompiler/ILAst/InitializerPeepholeTransforms.cs

@ -367,7 +367,7 @@ namespace ICSharpCode.Decompiler.ILAst @@ -367,7 +367,7 @@ namespace ICSharpCode.Decompiler.ILAst
{
MethodReference addMethod;
List<ILExpression> args;
if (expr.Match(ILCode.Callvirt, out addMethod, out args)) {
if (expr.Match(ILCode.Callvirt, out addMethod, out args) || expr.Match(ILCode.Call, out addMethod, out args)) {
if (addMethod.Name == "Add" && addMethod.HasThis) {
return args.Count >= 2;
}

Loading…
Cancel
Save