Browse Source

Fix another instance of #951: Incorrect decompilation of anonymous delegate

pull/987/head
Siegfried Pammer 8 years ago
parent
commit
f8afa6051d
  1. 18
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.cs
  2. 100
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.il
  3. 92
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.opt.il
  4. 318
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.opt.roslyn.il
  5. 328
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.roslyn.il
  6. 2
      ICSharpCode.Decompiler/IL/Transforms/DelegateConstruction.cs

18
ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.cs

@ -27,6 +27,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{ {
private class InstanceTests private class InstanceTests
{ {
public struct SomeData
{
public string Value;
}
public Action CaptureOfThis() public Action CaptureOfThis()
{ {
return delegate { return delegate {
@ -113,6 +118,15 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
}); });
} }
public void Bug951c(SomeData data)
{
this.DoAction(delegate {
this.DoAction(delegate {
this.DoSomething(data.Value);
});
});
}
private void DoAction(Action action) private void DoAction(Action action)
{ {
} }
@ -120,6 +134,10 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
private void NoOp(int a) private void NoOp(int a)
{ {
} }
private void DoSomething(string text)
{
}
} }
public static void Test(this string a) public static void Test(this string a)

100
ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.il

@ -15,7 +15,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0 .ver 4:0:0:0
} }
.assembly uuulcfez .assembly '0kytvwpf'
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
@ -26,15 +26,15 @@
.hash algorithm 0x00008004 .hash algorithm 0x00008004
.ver 0:0:0:0 .ver 0:0:0:0
} }
.module uuulcfez.dll .module '0kytvwpf.dll'
// MVID: {018169C5-0E25-41DF-A239-DEF2F357B8C3} // MVID: {BE56C518-B5DE-4D51-B8A3-26964CEEA341}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000 .imagebase 0x10000000
.file alignment 0x00000200 .file alignment 0x00000200
.stackreserve 0x00100000 .stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI .subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY .corflags 0x00000001 // ILONLY
// Image base: 0x00E90000 // Image base: 0x00FC0000
// =============== CLASS MEMBERS DECLARATION =================== // =============== CLASS MEMBERS DECLARATION ===================
@ -46,6 +46,12 @@
.class auto ansi nested private beforefieldinit InstanceTests .class auto ansi nested private beforefieldinit InstanceTests
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.class sequential ansi sealed nested public beforefieldinit SomeData
extends [mscorlib]System.ValueType
{
.field public string Value
} // end of class SomeData
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass22' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass22'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
@ -345,6 +351,57 @@
} // end of class '<>c__DisplayClass3c' } // end of class '<>c__DisplayClass3c'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass40'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests '<>4__this'
.field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData data
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>c__DisplayClass40'::.ctor
.method public hidebysig instance void
'<Bug951c>b__3e'() cil managed
{
// Code size 26 (0x1a)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::'<>4__this'
IL_0007: ldarg.0
IL_0008: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::'<Bug951c>b__3f'()
IL_000e: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_0018: nop
IL_0019: ret
} // end of method '<>c__DisplayClass40'::'<Bug951c>b__3e'
.method public hidebysig instance void
'<Bug951c>b__3f'() cil managed
{
// Code size 25 (0x19)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::'<>4__this'
IL_0007: ldarg.0
IL_0008: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::data
IL_000d: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData::Value
IL_0012: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoSomething(string)
IL_0017: nop
IL_0018: ret
} // end of method '<>c__DisplayClass40'::'<Bug951c>b__3f'
} // end of class '<>c__DisplayClass40'
.field private static class [mscorlib]System.Threading.ThreadStart 'CS$<>9__CachedAnonymousMethodDelegate35' .field private static class [mscorlib]System.Threading.ThreadStart 'CS$<>9__CachedAnonymousMethodDelegate35'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig instance class [mscorlib]System.Action .method public hidebysig instance class [mscorlib]System.Action
@ -745,6 +802,32 @@
IL_002e: ret IL_002e: ret
} // end of method InstanceTests::Bug951b } // end of method InstanceTests::Bug951b
.method public hidebysig instance void
Bug951c(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData data) cil managed
{
// Code size 42 (0x2a)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldarg.1
IL_0008: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::data
IL_000d: ldloc.0
IL_000e: ldarg.0
IL_000f: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::'<>4__this'
IL_0014: nop
IL_0015: ldarg.0
IL_0016: ldloc.0
IL_0017: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::'<Bug951c>b__3e'()
IL_001d: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_0022: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_0027: nop
IL_0028: nop
IL_0029: ret
} // end of method InstanceTests::Bug951c
.method private hidebysig instance void .method private hidebysig instance void
DoAction(class [mscorlib]System.Action action) cil managed DoAction(class [mscorlib]System.Action action) cil managed
{ {
@ -763,6 +846,15 @@
IL_0001: ret IL_0001: ret
} // end of method InstanceTests::NoOp } // end of method InstanceTests::NoOp
.method private hidebysig instance void
DoSomething(string text) cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method InstanceTests::DoSomething
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {

92
ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.opt.il

@ -15,7 +15,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0 .ver 4:0:0:0
} }
.assembly q15gqlgx .assembly yf3oha4w
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
@ -26,15 +26,15 @@
.hash algorithm 0x00008004 .hash algorithm 0x00008004
.ver 0:0:0:0 .ver 0:0:0:0
} }
.module q15gqlgx.dll .module yf3oha4w.dll
// MVID: {0ECBA5A5-AD56-41FA-BC89-44E9A1AE0799} // MVID: {CDC95C8E-FB20-4924-8805-3F3D95A5736B}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000 .imagebase 0x10000000
.file alignment 0x00000200 .file alignment 0x00000200
.stackreserve 0x00100000 .stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI .subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY .corflags 0x00000001 // ILONLY
// Image base: 0x00D00000 // Image base: 0x00AB0000
// =============== CLASS MEMBERS DECLARATION =================== // =============== CLASS MEMBERS DECLARATION ===================
@ -46,6 +46,12 @@
.class auto ansi nested private beforefieldinit InstanceTests .class auto ansi nested private beforefieldinit InstanceTests
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.class sequential ansi sealed nested public beforefieldinit SomeData
extends [mscorlib]System.ValueType
{
.field public string Value
} // end of class SomeData
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass22' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass22'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
@ -318,6 +324,53 @@
} // end of class '<>c__DisplayClass3c' } // end of class '<>c__DisplayClass3c'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass40'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests '<>4__this'
.field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData data
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>c__DisplayClass40'::.ctor
.method public hidebysig instance void
'<Bug951c>b__3e'() cil managed
{
// Code size 24 (0x18)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::'<>4__this'
IL_0006: ldarg.0
IL_0007: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::'<Bug951c>b__3f'()
IL_000d: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_0012: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_0017: ret
} // end of method '<>c__DisplayClass40'::'<Bug951c>b__3e'
.method public hidebysig instance void
'<Bug951c>b__3f'() cil managed
{
// Code size 23 (0x17)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::'<>4__this'
IL_0006: ldarg.0
IL_0007: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::data
IL_000c: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData::Value
IL_0011: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoSomething(string)
IL_0016: ret
} // end of method '<>c__DisplayClass40'::'<Bug951c>b__3f'
} // end of class '<>c__DisplayClass40'
.field private static class [mscorlib]System.Threading.ThreadStart 'CS$<>9__CachedAnonymousMethodDelegate35' .field private static class [mscorlib]System.Threading.ThreadStart 'CS$<>9__CachedAnonymousMethodDelegate35'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig instance class [mscorlib]System.Action .method public hidebysig instance class [mscorlib]System.Action
@ -633,6 +686,29 @@
IL_002b: ret IL_002b: ret
} // end of method InstanceTests::Bug951b } // end of method InstanceTests::Bug951b
.method public hidebysig instance void
Bug951c(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData data) cil managed
{
// Code size 39 (0x27)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldarg.1
IL_0008: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::data
IL_000d: ldloc.0
IL_000e: ldarg.0
IL_000f: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::'<>4__this'
IL_0014: ldarg.0
IL_0015: ldloc.0
IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass40'::'<Bug951c>b__3e'()
IL_001c: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_0021: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_0026: ret
} // end of method InstanceTests::Bug951c
.method private hidebysig instance void .method private hidebysig instance void
DoAction(class [mscorlib]System.Action action) cil managed DoAction(class [mscorlib]System.Action action) cil managed
{ {
@ -649,6 +725,14 @@
IL_0000: ret IL_0000: ret
} // end of method InstanceTests::NoOp } // end of method InstanceTests::NoOp
.method private hidebysig instance void
DoSomething(string text) cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method InstanceTests::DoSomething
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {

318
ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.opt.roslyn.il

@ -31,14 +31,14 @@
.ver 0:0:0:0 .ver 0:0:0:0
} }
.module DelegateConstruction.dll .module DelegateConstruction.dll
// MVID: {7CD915CD-DFC0-4B74-85B2-3BF06B3C53EF} // MVID: {F5BE0762-9125-4B48-8F46-BEC064B8B43B}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000 .imagebase 0x10000000
.file alignment 0x00000200 .file alignment 0x00000200
.stackreserve 0x00100000 .stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI .subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY .corflags 0x00000001 // ILONLY
// Image base: 0x02FE0000 // Image base: 0x010B0000
// =============== CLASS MEMBERS DECLARATION =================== // =============== CLASS MEMBERS DECLARATION ===================
@ -50,7 +50,13 @@
.class auto ansi nested private beforefieldinit InstanceTests .class auto ansi nested private beforefieldinit InstanceTests
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1_0' .class sequential ansi sealed nested public beforefieldinit SomeData
extends [mscorlib]System.ValueType
{
.field public string Value
} // end of class SomeData
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -64,7 +70,7 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass1_0'::.ctor } // end of method '<>c__DisplayClass2_0'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<CaptureOfThisAndParameter>b__0'() cil managed '<CaptureOfThisAndParameter>b__0'() cil managed
@ -72,22 +78,22 @@
// Code size 19 (0x13) // Code size 19 (0x13)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::'<>4__this' IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'<>4__this'
IL_0006: ldarg.0 IL_0006: ldarg.0
IL_0007: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::a IL_0007: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::a
IL_000c: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32) IL_000c: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32)
IL_0011: pop IL_0011: pop
IL_0012: ret IL_0012: ret
} // end of method '<>c__DisplayClass1_0'::'<CaptureOfThisAndParameter>b__0' } // end of method '<>c__DisplayClass2_0'::'<CaptureOfThisAndParameter>b__0'
} // end of class '<>c__DisplayClass1_0' } // end of class '<>c__DisplayClass2_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass3_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 item .field public int32 item
.field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1' 'CS$<>8__locals1' .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' 'CS$<>8__locals1'
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -96,7 +102,7 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass2_0'::.ctor } // end of method '<>c__DisplayClass3_0'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<CaptureOfThisAndParameterInForEach>b__0'() cil managed '<CaptureOfThisAndParameterInForEach>b__0'() cil managed
@ -104,22 +110,22 @@
// Code size 36 (0x24) // Code size 36 (0x24)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'CS$<>8__locals1' IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1'
IL_0006: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1'::'<>4__this' IL_0006: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::'<>4__this'
IL_000b: ldarg.0 IL_000b: ldarg.0
IL_000c: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::item IL_000c: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item
IL_0011: ldarg.0 IL_0011: ldarg.0
IL_0012: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'CS$<>8__locals1' IL_0012: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1'
IL_0017: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1'::a IL_0017: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::a
IL_001c: add IL_001c: add
IL_001d: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32) IL_001d: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32)
IL_0022: pop IL_0022: pop
IL_0023: ret IL_0023: ret
} // end of method '<>c__DisplayClass2_0'::'<CaptureOfThisAndParameterInForEach>b__0' } // end of method '<>c__DisplayClass3_0'::'<CaptureOfThisAndParameterInForEach>b__0'
} // end of class '<>c__DisplayClass2_0' } // end of class '<>c__DisplayClass3_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_1' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass3_1'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -133,16 +139,16 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass2_1'::.ctor } // end of method '<>c__DisplayClass3_1'::.ctor
} // end of class '<>c__DisplayClass2_1' } // end of class '<>c__DisplayClass3_1'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass3_0' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass4_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 item .field public int32 item
.field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' 'CS$<>8__locals1' .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1' 'CS$<>8__locals1'
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -151,11 +157,11 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass3_0'::.ctor } // end of method '<>c__DisplayClass4_0'::.ctor
} // end of class '<>c__DisplayClass3_0' } // end of class '<>c__DisplayClass4_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass3_1' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass4_1'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -169,16 +175,16 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass3_1'::.ctor } // end of method '<>c__DisplayClass4_1'::.ctor
} // end of class '<>c__DisplayClass3_1' } // end of class '<>c__DisplayClass4_1'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass3_2' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass4_2'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 copyOfItem .field public int32 copyOfItem
.field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' 'CS$<>8__locals2' .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' 'CS$<>8__locals2'
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -187,7 +193,7 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass3_2'::.ctor } // end of method '<>c__DisplayClass4_2'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<CaptureOfThisAndParameterInForEachWithItemCopy>b__0'() cil managed '<CaptureOfThisAndParameterInForEachWithItemCopy>b__0'() cil managed
@ -195,33 +201,33 @@
// Code size 58 (0x3a) // Code size 58 (0x3a)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_0006: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1' IL_0006: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::'CS$<>8__locals1'
IL_000b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::'<>4__this' IL_000b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1'::'<>4__this'
IL_0010: ldarg.0 IL_0010: ldarg.0
IL_0011: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_0011: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_0016: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item IL_0016: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::item
IL_001b: ldarg.0 IL_001b: ldarg.0
IL_001c: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_001c: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_0021: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1' IL_0021: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::'CS$<>8__locals1'
IL_0026: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::a IL_0026: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1'::a
IL_002b: add IL_002b: add
IL_002c: ldarg.0 IL_002c: ldarg.0
IL_002d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::copyOfItem IL_002d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::copyOfItem
IL_0032: add IL_0032: add
IL_0033: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32) IL_0033: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32)
IL_0038: pop IL_0038: pop
IL_0039: ret IL_0039: ret
} // end of method '<>c__DisplayClass3_2'::'<CaptureOfThisAndParameterInForEachWithItemCopy>b__0' } // end of method '<>c__DisplayClass4_2'::'<CaptureOfThisAndParameterInForEachWithItemCopy>b__0'
} // end of class '<>c__DisplayClass3_2' } // end of class '<>c__DisplayClass4_2'
.class auto ansi serializable sealed nested private beforefieldinit '<>c' .class auto ansi serializable sealed nested private beforefieldinit '<>c'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c' '<>9' .field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c' '<>9'
.field public static class [mscorlib]System.Threading.ThreadStart '<>9__7_0' .field public static class [mscorlib]System.Threading.ThreadStart '<>9__8_0'
.method private hidebysig specialname rtspecialname static .method private hidebysig specialname rtspecialname static
void .cctor() cil managed void .cctor() cil managed
{ {
@ -243,16 +249,16 @@
} // end of method '<>c'::.ctor } // end of method '<>c'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<Bug955>b__7_0'() cil managed '<Bug955>b__8_0'() cil managed
{ {
// Code size 1 (0x1) // Code size 1 (0x1)
.maxstack 8 .maxstack 8
IL_0000: ret IL_0000: ret
} // end of method '<>c'::'<Bug955>b__7_0' } // end of method '<>c'::'<Bug955>b__8_0'
} // end of class '<>c' } // end of class '<>c'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass8_0' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass9_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -266,7 +272,7 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass8_0'::.ctor } // end of method '<>c__DisplayClass9_0'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<Bug951>b__0'() cil managed '<Bug951>b__0'() cil managed
@ -274,22 +280,22 @@
// Code size 40 (0x28) // Code size 40 (0x28)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::amount IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount
IL_0006: ldc.i4.0 IL_0006: ldc.i4.0
IL_0007: bge.s IL_0010 IL_0007: bge.s IL_0010
IL_0009: ldarg.0 IL_0009: ldarg.0
IL_000a: ldc.i4.0 IL_000a: ldc.i4.0
IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::amount IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount
IL_0010: ldarg.0 IL_0010: ldarg.0
IL_0011: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::'<>4__this' IL_0011: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this'
IL_0016: ldarg.0 IL_0016: ldarg.0
IL_0017: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::'<Bug951>b__1'() IL_0017: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<Bug951>b__1'()
IL_001d: newobj instance void [mscorlib]System.Action::.ctor(object, IL_001d: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_0022: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action) IL_0022: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_0027: ret IL_0027: ret
} // end of method '<>c__DisplayClass8_0'::'<Bug951>b__0' } // end of method '<>c__DisplayClass9_0'::'<Bug951>b__0'
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<Bug951>b__1'() cil managed '<Bug951>b__1'() cil managed
@ -297,16 +303,16 @@
// Code size 18 (0x12) // Code size 18 (0x12)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::'<>4__this' IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this'
IL_0006: ldarg.0 IL_0006: ldarg.0
IL_0007: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::amount IL_0007: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount
IL_000c: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::NoOp(int32) IL_000c: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::NoOp(int32)
IL_0011: ret IL_0011: ret
} // end of method '<>c__DisplayClass8_0'::'<Bug951>b__1' } // end of method '<>c__DisplayClass9_0'::'<Bug951>b__1'
} // end of class '<>c__DisplayClass8_0' } // end of class '<>c__DisplayClass9_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass9_0' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass10_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -320,7 +326,7 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass9_0'::.ctor } // end of method '<>c__DisplayClass10_0'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<Bug951b>b__0'() cil managed '<Bug951b>b__0'() cil managed
@ -328,22 +334,22 @@
// Code size 40 (0x28) // Code size 40 (0x28)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::amount
IL_0006: ldc.i4.0 IL_0006: ldc.i4.0
IL_0007: bge.s IL_0010 IL_0007: bge.s IL_0010
IL_0009: ldarg.0 IL_0009: ldarg.0
IL_000a: ldc.i4.0 IL_000a: ldc.i4.0
IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::amount
IL_0010: ldarg.0 IL_0010: ldarg.0
IL_0011: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this' IL_0011: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::'<>4__this'
IL_0016: ldarg.0 IL_0016: ldarg.0
IL_0017: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<Bug951b>b__1'() IL_0017: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::'<Bug951b>b__1'()
IL_001d: newobj instance void [mscorlib]System.Action::.ctor(object, IL_001d: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_0022: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action) IL_0022: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_0027: ret IL_0027: ret
} // end of method '<>c__DisplayClass9_0'::'<Bug951b>b__0' } // end of method '<>c__DisplayClass10_0'::'<Bug951b>b__0'
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<Bug951b>b__1'() cil managed '<Bug951b>b__1'() cil managed
@ -351,14 +357,61 @@
// Code size 18 (0x12) // Code size 18 (0x12)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this' IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::'<>4__this'
IL_0006: ldarg.0 IL_0006: ldarg.0
IL_0007: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount IL_0007: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::amount
IL_000c: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::NoOp(int32) IL_000c: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::NoOp(int32)
IL_0011: ret IL_0011: ret
} // end of method '<>c__DisplayClass9_0'::'<Bug951b>b__1' } // end of method '<>c__DisplayClass10_0'::'<Bug951b>b__1'
} // end of class '<>c__DisplayClass9_0' } // end of class '<>c__DisplayClass10_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass11_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData data
.field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests '<>4__this'
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>c__DisplayClass11_0'::.ctor
.method assembly hidebysig instance void
'<Bug951c>b__0'() cil managed
{
// Code size 24 (0x18)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::'<>4__this'
IL_0006: ldarg.0
IL_0007: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::'<Bug951c>b__1'()
IL_000d: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_0012: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_0017: ret
} // end of method '<>c__DisplayClass11_0'::'<Bug951c>b__0'
.method assembly hidebysig instance void
'<Bug951c>b__1'() cil managed
{
// Code size 23 (0x17)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::'<>4__this'
IL_0006: ldarg.0
IL_0007: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::data
IL_000c: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData::Value
IL_0011: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoSomething(string)
IL_0016: ret
} // end of method '<>c__DisplayClass11_0'::'<Bug951c>b__1'
} // end of class '<>c__DisplayClass11_0'
.method public hidebysig instance class [mscorlib]System.Action .method public hidebysig instance class [mscorlib]System.Action
CaptureOfThis() cil managed CaptureOfThis() cil managed
@ -366,7 +419,7 @@
// Code size 13 (0xd) // Code size 13 (0xd)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::'<CaptureOfThis>b__0_0'() IL_0001: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::'<CaptureOfThis>b__1_0'()
IL_0007: newobj instance void [mscorlib]System.Action::.ctor(object, IL_0007: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_000c: ret IL_000c: ret
@ -377,14 +430,14 @@
{ {
// Code size 31 (0x1f) // Code size 31 (0x1f)
.maxstack 8 .maxstack 8
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::.ctor()
IL_0005: dup IL_0005: dup
IL_0006: ldarg.0 IL_0006: ldarg.0
IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::'<>4__this' IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'<>4__this'
IL_000c: dup IL_000c: dup
IL_000d: ldarg.1 IL_000d: ldarg.1
IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::a IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::a
IL_0013: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::'<CaptureOfThisAndParameter>b__0'() IL_0013: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'<CaptureOfThisAndParameter>b__0'()
IL_0019: newobj instance void [mscorlib]System.Action::.ctor(object, IL_0019: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_001e: ret IL_001e: ret
@ -395,18 +448,18 @@
{ {
// Code size 106 (0x6a) // Code size 106 (0x6a)
.maxstack 2 .maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1' V_0, .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' V_0,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1, class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1,
class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0' V_2, class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' V_2,
class [mscorlib]System.Action V_3) class [mscorlib]System.Action V_3)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1'::'<>4__this' IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::'<>4__this'
IL_000d: ldloc.0 IL_000d: ldloc.0
IL_000e: ldarg.1 IL_000e: ldarg.1
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1'::a IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::a
IL_0014: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Empty<int32>() IL_0014: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Empty<int32>()
IL_0019: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator() IL_0019: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_001e: stloc.1 IL_001e: stloc.1
@ -414,22 +467,22 @@
{ {
IL_001f: br.s IL_0052 IL_001f: br.s IL_0052
IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::.ctor() IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::.ctor()
IL_0026: stloc.2 IL_0026: stloc.2
IL_0027: ldloc.2 IL_0027: ldloc.2
IL_0028: ldloc.0 IL_0028: ldloc.0
IL_0029: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'CS$<>8__locals1' IL_0029: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1'
IL_002e: ldloc.2 IL_002e: ldloc.2
IL_002f: ldloc.1 IL_002f: ldloc.1
IL_0030: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current() IL_0030: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0035: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::item IL_0035: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item
IL_003a: ldloc.2 IL_003a: ldloc.2
IL_003b: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::item IL_003b: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item
IL_0040: ldc.i4.0 IL_0040: ldc.i4.0
IL_0041: ble.s IL_0052 IL_0041: ble.s IL_0052
IL_0043: ldloc.2 IL_0043: ldloc.2
IL_0044: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'<CaptureOfThisAndParameterInForEach>b__0'() IL_0044: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'<CaptureOfThisAndParameterInForEach>b__0'()
IL_004a: newobj instance void [mscorlib]System.Action::.ctor(object, IL_004a: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_004f: stloc.3 IL_004f: stloc.3
@ -463,19 +516,19 @@
{ {
// Code size 143 (0x8f) // Code size 143 (0x8f)
.maxstack 2 .maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' V_0, .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1' V_0,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1, class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1,
class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' V_2, class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' V_2,
class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2' V_3, class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2' V_3,
class [mscorlib]System.Action V_4) class [mscorlib]System.Action V_4)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::'<>4__this' IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1'::'<>4__this'
IL_000d: ldloc.0 IL_000d: ldloc.0
IL_000e: ldarg.1 IL_000e: ldarg.1
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::a IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1'::a
IL_0014: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Empty<int32>() IL_0014: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Empty<int32>()
IL_0019: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator() IL_0019: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_001e: stloc.1 IL_001e: stloc.1
@ -483,33 +536,33 @@
{ {
IL_001f: br.s IL_0076 IL_001f: br.s IL_0076
IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::.ctor() IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::.ctor()
IL_0026: stloc.2 IL_0026: stloc.2
IL_0027: ldloc.2 IL_0027: ldloc.2
IL_0028: ldloc.0 IL_0028: ldloc.0
IL_0029: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1' IL_0029: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::'CS$<>8__locals1'
IL_002e: ldloc.2 IL_002e: ldloc.2
IL_002f: ldloc.1 IL_002f: ldloc.1
IL_0030: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current() IL_0030: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0035: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item IL_0035: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::item
IL_003a: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::.ctor() IL_003a: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::.ctor()
IL_003f: stloc.3 IL_003f: stloc.3
IL_0040: ldloc.3 IL_0040: ldloc.3
IL_0041: ldloc.2 IL_0041: ldloc.2
IL_0042: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_0042: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_0047: ldloc.3 IL_0047: ldloc.3
IL_0048: ldloc.3 IL_0048: ldloc.3
IL_0049: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_0049: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_004e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item IL_004e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::item
IL_0053: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::copyOfItem IL_0053: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::copyOfItem
IL_0058: ldloc.3 IL_0058: ldloc.3
IL_0059: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_0059: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_005e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item IL_005e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::item
IL_0063: ldc.i4.0 IL_0063: ldc.i4.0
IL_0064: ble.s IL_0076 IL_0064: ble.s IL_0076
IL_0066: ldloc.3 IL_0066: ldloc.3
IL_0067: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'<CaptureOfThisAndParameterInForEachWithItemCopy>b__0'() IL_0067: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'<CaptureOfThisAndParameterInForEachWithItemCopy>b__0'()
IL_006d: newobj instance void [mscorlib]System.Action::.ctor(object, IL_006d: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_0072: stloc.s V_4 IL_0072: stloc.s V_4
@ -550,7 +603,7 @@
IL_0004: ldarg.0 IL_0004: ldarg.0
IL_0005: ldarg.0 IL_0005: ldarg.0
IL_0006: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::'<LambdaInForLoop>b__4_0'() IL_0006: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::'<LambdaInForLoop>b__5_0'()
IL_000c: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object, IL_000c: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int) native int)
IL_0011: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Bar(class [mscorlib]System.Func`1<int32>) IL_0011: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Bar(class [mscorlib]System.Func`1<int32>)
@ -587,17 +640,17 @@
{ {
// Code size 38 (0x26) // Code size 38 (0x26)
.maxstack 8 .maxstack 8
IL_0000: ldsfld class [mscorlib]System.Threading.ThreadStart ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9__7_0' IL_0000: ldsfld class [mscorlib]System.Threading.ThreadStart ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9__8_0'
IL_0005: dup IL_0005: dup
IL_0006: brtrue.s IL_001f IL_0006: brtrue.s IL_001f
IL_0008: pop IL_0008: pop
IL_0009: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9' IL_0009: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9'
IL_000e: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<Bug955>b__7_0'() IL_000e: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<Bug955>b__8_0'()
IL_0014: newobj instance void [mscorlib]System.Threading.ThreadStart::.ctor(object, IL_0014: newobj instance void [mscorlib]System.Threading.ThreadStart::.ctor(object,
native int) native int)
IL_0019: dup IL_0019: dup
IL_001a: stsfld class [mscorlib]System.Threading.ThreadStart ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9__7_0' IL_001a: stsfld class [mscorlib]System.Threading.ThreadStart ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9__8_0'
IL_001f: newobj instance void [mscorlib]System.Threading.Thread::.ctor(class [mscorlib]System.Threading.ThreadStart) IL_001f: newobj instance void [mscorlib]System.Threading.Thread::.ctor(class [mscorlib]System.Threading.ThreadStart)
IL_0024: pop IL_0024: pop
IL_0025: ret IL_0025: ret
@ -608,18 +661,18 @@
{ {
// Code size 39 (0x27) // Code size 39 (0x27)
.maxstack 3 .maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0' V_0) .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::'<>4__this' IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this'
IL_000d: ldloc.0 IL_000d: ldloc.0
IL_000e: ldarg.1 IL_000e: ldarg.1
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::amount IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount
IL_0014: ldarg.0 IL_0014: ldarg.0
IL_0015: ldloc.0 IL_0015: ldloc.0
IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::'<Bug951>b__0'() IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<Bug951>b__0'()
IL_001c: newobj instance void [mscorlib]System.Action::.ctor(object, IL_001c: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_0021: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action) IL_0021: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
@ -631,25 +684,48 @@
{ {
// Code size 44 (0x2c) // Code size 44 (0x2c)
.maxstack 3 .maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0' V_0) .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this' IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::'<>4__this'
IL_000d: ldloc.0 IL_000d: ldloc.0
IL_000e: ldarg.0 IL_000e: ldarg.0
IL_000f: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Foo() IL_000f: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Foo()
IL_0014: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount IL_0014: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::amount
IL_0019: ldarg.0 IL_0019: ldarg.0
IL_001a: ldloc.0 IL_001a: ldloc.0
IL_001b: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<Bug951b>b__0'() IL_001b: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::'<Bug951b>b__0'()
IL_0021: newobj instance void [mscorlib]System.Action::.ctor(object, IL_0021: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_0026: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action) IL_0026: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_002b: ret IL_002b: ret
} // end of method InstanceTests::Bug951b } // end of method InstanceTests::Bug951b
.method public hidebysig instance void
Bug951c(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData data) cil managed
{
// Code size 39 (0x27)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::'<>4__this'
IL_000d: ldloc.0
IL_000e: ldarg.1
IL_000f: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::data
IL_0014: ldarg.0
IL_0015: ldloc.0
IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::'<Bug951c>b__0'()
IL_001c: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_0021: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_0026: ret
} // end of method InstanceTests::Bug951c
.method private hidebysig instance void .method private hidebysig instance void
DoAction(class [mscorlib]System.Action action) cil managed DoAction(class [mscorlib]System.Action action) cil managed
{ {
@ -666,6 +742,14 @@
IL_0000: ret IL_0000: ret
} // end of method InstanceTests::NoOp } // end of method InstanceTests::NoOp
.method private hidebysig instance void
DoSomething(string text) cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method InstanceTests::DoSomething
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -677,7 +761,7 @@
} // end of method InstanceTests::.ctor } // end of method InstanceTests::.ctor
.method private hidebysig instance void .method private hidebysig instance void
'<CaptureOfThis>b__0_0'() cil managed '<CaptureOfThis>b__1_0'() cil managed
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8) // Code size 8 (0x8)
@ -686,10 +770,10 @@
IL_0001: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThis() IL_0001: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThis()
IL_0006: pop IL_0006: pop
IL_0007: ret IL_0007: ret
} // end of method InstanceTests::'<CaptureOfThis>b__0_0' } // end of method InstanceTests::'<CaptureOfThis>b__1_0'
.method private hidebysig instance int32 .method private hidebysig instance int32
'<LambdaInForLoop>b__4_0'() cil managed '<LambdaInForLoop>b__5_0'() cil managed
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7) // Code size 7 (0x7)
@ -697,7 +781,7 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Foo() IL_0001: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Foo()
IL_0006: ret IL_0006: ret
} // end of method InstanceTests::'<LambdaInForLoop>b__4_0' } // end of method InstanceTests::'<LambdaInForLoop>b__5_0'
} // end of class InstanceTests } // end of class InstanceTests

328
ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.roslyn.il

@ -31,14 +31,14 @@
.ver 0:0:0:0 .ver 0:0:0:0
} }
.module DelegateConstruction.dll .module DelegateConstruction.dll
// MVID: {FB18F278-AE87-4B57-9460-E08BF17BCEAB} // MVID: {6914DD72-BE03-4BA0-9025-522152E6E42F}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000 .imagebase 0x10000000
.file alignment 0x00000200 .file alignment 0x00000200
.stackreserve 0x00100000 .stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI .subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY .corflags 0x00000001 // ILONLY
// Image base: 0x01630000 // Image base: 0x010C0000
// =============== CLASS MEMBERS DECLARATION =================== // =============== CLASS MEMBERS DECLARATION ===================
@ -50,7 +50,13 @@
.class auto ansi nested private beforefieldinit InstanceTests .class auto ansi nested private beforefieldinit InstanceTests
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1_0' .class sequential ansi sealed nested public beforefieldinit SomeData
extends [mscorlib]System.ValueType
{
.field public string Value
} // end of class SomeData
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -65,7 +71,7 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop IL_0006: nop
IL_0007: ret IL_0007: ret
} // end of method '<>c__DisplayClass1_0'::.ctor } // end of method '<>c__DisplayClass2_0'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<CaptureOfThisAndParameter>b__0'() cil managed '<CaptureOfThisAndParameter>b__0'() cil managed
@ -74,22 +80,22 @@
.maxstack 8 .maxstack 8
IL_0000: nop IL_0000: nop
IL_0001: ldarg.0 IL_0001: ldarg.0
IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::'<>4__this' IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'<>4__this'
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::a IL_0008: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::a
IL_000d: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32) IL_000d: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32)
IL_0012: pop IL_0012: pop
IL_0013: ret IL_0013: ret
} // end of method '<>c__DisplayClass1_0'::'<CaptureOfThisAndParameter>b__0' } // end of method '<>c__DisplayClass2_0'::'<CaptureOfThisAndParameter>b__0'
} // end of class '<>c__DisplayClass1_0' } // end of class '<>c__DisplayClass2_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass3_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 item .field public int32 item
.field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1' 'CS$<>8__locals1' .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' 'CS$<>8__locals1'
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -99,7 +105,7 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop IL_0006: nop
IL_0007: ret IL_0007: ret
} // end of method '<>c__DisplayClass2_0'::.ctor } // end of method '<>c__DisplayClass3_0'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<CaptureOfThisAndParameterInForEach>b__0'() cil managed '<CaptureOfThisAndParameterInForEach>b__0'() cil managed
@ -108,22 +114,22 @@
.maxstack 8 .maxstack 8
IL_0000: nop IL_0000: nop
IL_0001: ldarg.0 IL_0001: ldarg.0
IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'CS$<>8__locals1' IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1'
IL_0007: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1'::'<>4__this' IL_0007: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::'<>4__this'
IL_000c: ldarg.0 IL_000c: ldarg.0
IL_000d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::item IL_000d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item
IL_0012: ldarg.0 IL_0012: ldarg.0
IL_0013: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'CS$<>8__locals1' IL_0013: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1'
IL_0018: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1'::a IL_0018: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::a
IL_001d: add IL_001d: add
IL_001e: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32) IL_001e: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32)
IL_0023: pop IL_0023: pop
IL_0024: ret IL_0024: ret
} // end of method '<>c__DisplayClass2_0'::'<CaptureOfThisAndParameterInForEach>b__0' } // end of method '<>c__DisplayClass3_0'::'<CaptureOfThisAndParameterInForEach>b__0'
} // end of class '<>c__DisplayClass2_0' } // end of class '<>c__DisplayClass3_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_1' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass3_1'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -138,16 +144,16 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop IL_0006: nop
IL_0007: ret IL_0007: ret
} // end of method '<>c__DisplayClass2_1'::.ctor } // end of method '<>c__DisplayClass3_1'::.ctor
} // end of class '<>c__DisplayClass2_1' } // end of class '<>c__DisplayClass3_1'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass3_0' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass4_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 item .field public int32 item
.field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' 'CS$<>8__locals1' .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1' 'CS$<>8__locals1'
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -157,11 +163,11 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop IL_0006: nop
IL_0007: ret IL_0007: ret
} // end of method '<>c__DisplayClass3_0'::.ctor } // end of method '<>c__DisplayClass4_0'::.ctor
} // end of class '<>c__DisplayClass3_0' } // end of class '<>c__DisplayClass4_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass3_1' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass4_1'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -176,16 +182,16 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop IL_0006: nop
IL_0007: ret IL_0007: ret
} // end of method '<>c__DisplayClass3_1'::.ctor } // end of method '<>c__DisplayClass4_1'::.ctor
} // end of class '<>c__DisplayClass3_1' } // end of class '<>c__DisplayClass4_1'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass3_2' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass4_2'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 copyOfItem .field public int32 copyOfItem
.field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' 'CS$<>8__locals2' .field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' 'CS$<>8__locals2'
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -195,7 +201,7 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop IL_0006: nop
IL_0007: ret IL_0007: ret
} // end of method '<>c__DisplayClass3_2'::.ctor } // end of method '<>c__DisplayClass4_2'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<CaptureOfThisAndParameterInForEachWithItemCopy>b__0'() cil managed '<CaptureOfThisAndParameterInForEachWithItemCopy>b__0'() cil managed
@ -204,33 +210,33 @@
.maxstack 8 .maxstack 8
IL_0000: nop IL_0000: nop
IL_0001: ldarg.0 IL_0001: ldarg.0
IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_0007: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1' IL_0007: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::'CS$<>8__locals1'
IL_000c: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::'<>4__this' IL_000c: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1'::'<>4__this'
IL_0011: ldarg.0 IL_0011: ldarg.0
IL_0012: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_0012: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_0017: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item IL_0017: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::item
IL_001c: ldarg.0 IL_001c: ldarg.0
IL_001d: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_001d: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_0022: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1' IL_0022: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::'CS$<>8__locals1'
IL_0027: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::a IL_0027: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1'::a
IL_002c: add IL_002c: add
IL_002d: ldarg.0 IL_002d: ldarg.0
IL_002e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::copyOfItem IL_002e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::copyOfItem
IL_0033: add IL_0033: add
IL_0034: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32) IL_0034: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThisAndParameter(int32)
IL_0039: pop IL_0039: pop
IL_003a: ret IL_003a: ret
} // end of method '<>c__DisplayClass3_2'::'<CaptureOfThisAndParameterInForEachWithItemCopy>b__0' } // end of method '<>c__DisplayClass4_2'::'<CaptureOfThisAndParameterInForEachWithItemCopy>b__0'
} // end of class '<>c__DisplayClass3_2' } // end of class '<>c__DisplayClass4_2'
.class auto ansi serializable sealed nested private beforefieldinit '<>c' .class auto ansi serializable sealed nested private beforefieldinit '<>c'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c' '<>9' .field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c' '<>9'
.field public static class [mscorlib]System.Threading.ThreadStart '<>9__7_0' .field public static class [mscorlib]System.Threading.ThreadStart '<>9__8_0'
.method private hidebysig specialname rtspecialname static .method private hidebysig specialname rtspecialname static
void .cctor() cil managed void .cctor() cil managed
{ {
@ -253,17 +259,17 @@
} // end of method '<>c'::.ctor } // end of method '<>c'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<Bug955>b__7_0'() cil managed '<Bug955>b__8_0'() cil managed
{ {
// Code size 2 (0x2) // Code size 2 (0x2)
.maxstack 8 .maxstack 8
IL_0000: nop IL_0000: nop
IL_0001: ret IL_0001: ret
} // end of method '<>c'::'<Bug955>b__7_0' } // end of method '<>c'::'<Bug955>b__8_0'
} // end of class '<>c' } // end of class '<>c'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass8_0' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass9_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -278,7 +284,7 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop IL_0006: nop
IL_0007: ret IL_0007: ret
} // end of method '<>c__DisplayClass8_0'::.ctor } // end of method '<>c__DisplayClass9_0'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<Bug951>b__0'() cil managed '<Bug951>b__0'() cil managed
@ -288,7 +294,7 @@
.locals init (bool V_0) .locals init (bool V_0)
IL_0000: nop IL_0000: nop
IL_0001: ldarg.0 IL_0001: ldarg.0
IL_0002: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::amount IL_0002: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount
IL_0007: ldc.i4.0 IL_0007: ldc.i4.0
IL_0008: clt IL_0008: clt
IL_000a: stloc.0 IL_000a: stloc.0
@ -298,18 +304,18 @@
IL_000e: nop IL_000e: nop
IL_000f: ldarg.0 IL_000f: ldarg.0
IL_0010: ldc.i4.0 IL_0010: ldc.i4.0
IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::amount IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount
IL_0016: nop IL_0016: nop
IL_0017: ldarg.0 IL_0017: ldarg.0
IL_0018: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::'<>4__this' IL_0018: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this'
IL_001d: ldarg.0 IL_001d: ldarg.0
IL_001e: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::'<Bug951>b__1'() IL_001e: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<Bug951>b__1'()
IL_0024: newobj instance void [mscorlib]System.Action::.ctor(object, IL_0024: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_0029: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action) IL_0029: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_002e: nop IL_002e: nop
IL_002f: ret IL_002f: ret
} // end of method '<>c__DisplayClass8_0'::'<Bug951>b__0' } // end of method '<>c__DisplayClass9_0'::'<Bug951>b__0'
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<Bug951>b__1'() cil managed '<Bug951>b__1'() cil managed
@ -318,17 +324,17 @@
.maxstack 8 .maxstack 8
IL_0000: nop IL_0000: nop
IL_0001: ldarg.0 IL_0001: ldarg.0
IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::'<>4__this' IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this'
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::amount IL_0008: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount
IL_000d: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::NoOp(int32) IL_000d: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::NoOp(int32)
IL_0012: nop IL_0012: nop
IL_0013: ret IL_0013: ret
} // end of method '<>c__DisplayClass8_0'::'<Bug951>b__1' } // end of method '<>c__DisplayClass9_0'::'<Bug951>b__1'
} // end of class '<>c__DisplayClass8_0' } // end of class '<>c__DisplayClass9_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass9_0' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass10_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -343,7 +349,7 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop IL_0006: nop
IL_0007: ret IL_0007: ret
} // end of method '<>c__DisplayClass9_0'::.ctor } // end of method '<>c__DisplayClass10_0'::.ctor
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<Bug951b>b__0'() cil managed '<Bug951b>b__0'() cil managed
@ -353,7 +359,7 @@
.locals init (bool V_0) .locals init (bool V_0)
IL_0000: nop IL_0000: nop
IL_0001: ldarg.0 IL_0001: ldarg.0
IL_0002: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount IL_0002: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::amount
IL_0007: ldc.i4.0 IL_0007: ldc.i4.0
IL_0008: clt IL_0008: clt
IL_000a: stloc.0 IL_000a: stloc.0
@ -363,18 +369,18 @@
IL_000e: nop IL_000e: nop
IL_000f: ldarg.0 IL_000f: ldarg.0
IL_0010: ldc.i4.0 IL_0010: ldc.i4.0
IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::amount
IL_0016: nop IL_0016: nop
IL_0017: ldarg.0 IL_0017: ldarg.0
IL_0018: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this' IL_0018: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::'<>4__this'
IL_001d: ldarg.0 IL_001d: ldarg.0
IL_001e: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<Bug951b>b__1'() IL_001e: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::'<Bug951b>b__1'()
IL_0024: newobj instance void [mscorlib]System.Action::.ctor(object, IL_0024: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_0029: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action) IL_0029: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_002e: nop IL_002e: nop
IL_002f: ret IL_002f: ret
} // end of method '<>c__DisplayClass9_0'::'<Bug951b>b__0' } // end of method '<>c__DisplayClass10_0'::'<Bug951b>b__0'
.method assembly hidebysig instance void .method assembly hidebysig instance void
'<Bug951b>b__1'() cil managed '<Bug951b>b__1'() cil managed
@ -383,15 +389,67 @@
.maxstack 8 .maxstack 8
IL_0000: nop IL_0000: nop
IL_0001: ldarg.0 IL_0001: ldarg.0
IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this' IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::'<>4__this'
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount IL_0008: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::amount
IL_000d: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::NoOp(int32) IL_000d: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::NoOp(int32)
IL_0012: nop IL_0012: nop
IL_0013: ret IL_0013: ret
} // end of method '<>c__DisplayClass9_0'::'<Bug951b>b__1' } // end of method '<>c__DisplayClass10_0'::'<Bug951b>b__1'
} // end of class '<>c__DisplayClass9_0' } // end of class '<>c__DisplayClass10_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass11_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData data
.field public class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests '<>4__this'
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method '<>c__DisplayClass11_0'::.ctor
.method assembly hidebysig instance void
'<Bug951c>b__0'() cil managed
{
// Code size 26 (0x1a)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::'<>4__this'
IL_0007: ldarg.0
IL_0008: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::'<Bug951c>b__1'()
IL_000e: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_0018: nop
IL_0019: ret
} // end of method '<>c__DisplayClass11_0'::'<Bug951c>b__0'
.method assembly hidebysig instance void
'<Bug951c>b__1'() cil managed
{
// Code size 25 (0x19)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::'<>4__this'
IL_0007: ldarg.0
IL_0008: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::data
IL_000d: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData::Value
IL_0012: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoSomething(string)
IL_0017: nop
IL_0018: ret
} // end of method '<>c__DisplayClass11_0'::'<Bug951c>b__1'
} // end of class '<>c__DisplayClass11_0'
.method public hidebysig instance class [mscorlib]System.Action .method public hidebysig instance class [mscorlib]System.Action
CaptureOfThis() cil managed CaptureOfThis() cil managed
@ -401,7 +459,7 @@
.locals init (class [mscorlib]System.Action V_0) .locals init (class [mscorlib]System.Action V_0)
IL_0000: nop IL_0000: nop
IL_0001: ldarg.0 IL_0001: ldarg.0
IL_0002: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::'<CaptureOfThis>b__0_0'() IL_0002: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::'<CaptureOfThis>b__1_0'()
IL_0008: newobj instance void [mscorlib]System.Action::.ctor(object, IL_0008: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_000d: stloc.0 IL_000d: stloc.0
@ -416,19 +474,19 @@
{ {
// Code size 38 (0x26) // Code size 38 (0x26)
.maxstack 2 .maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0' V_0, .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0' V_0,
class [mscorlib]System.Action V_1) class [mscorlib]System.Action V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::'<>4__this' IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'<>4__this'
IL_000d: ldloc.0 IL_000d: ldloc.0
IL_000e: ldarg.1 IL_000e: ldarg.1
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::a IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::a
IL_0014: nop IL_0014: nop
IL_0015: ldloc.0 IL_0015: ldloc.0
IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass1_0'::'<CaptureOfThisAndParameter>b__0'() IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'<CaptureOfThisAndParameter>b__0'()
IL_001c: newobj instance void [mscorlib]System.Action::.ctor(object, IL_001c: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_0021: stloc.1 IL_0021: stloc.1
@ -443,19 +501,19 @@
{ {
// Code size 121 (0x79) // Code size 121 (0x79)
.maxstack 2 .maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1' V_0, .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' V_0,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1, class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1,
class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0' V_2, class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' V_2,
bool V_3, bool V_3,
class [mscorlib]System.Action V_4) class [mscorlib]System.Action V_4)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1'::'<>4__this' IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::'<>4__this'
IL_000d: ldloc.0 IL_000d: ldloc.0
IL_000e: ldarg.1 IL_000e: ldarg.1
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1'::a IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::a
IL_0014: nop IL_0014: nop
IL_0015: nop IL_0015: nop
IL_0016: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Empty<int32>() IL_0016: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Empty<int32>()
@ -465,18 +523,18 @@
{ {
IL_0021: br.s IL_005c IL_0021: br.s IL_005c
IL_0023: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::.ctor() IL_0023: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::.ctor()
IL_0028: stloc.2 IL_0028: stloc.2
IL_0029: ldloc.2 IL_0029: ldloc.2
IL_002a: ldloc.0 IL_002a: ldloc.0
IL_002b: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'CS$<>8__locals1' IL_002b: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1'
IL_0030: ldloc.2 IL_0030: ldloc.2
IL_0031: ldloc.1 IL_0031: ldloc.1
IL_0032: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current() IL_0032: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0037: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::item IL_0037: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item
IL_003c: nop IL_003c: nop
IL_003d: ldloc.2 IL_003d: ldloc.2
IL_003e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::item IL_003e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item
IL_0043: ldc.i4.0 IL_0043: ldc.i4.0
IL_0044: cgt IL_0044: cgt
IL_0046: stloc.3 IL_0046: stloc.3
@ -485,7 +543,7 @@
IL_004a: nop IL_004a: nop
IL_004b: ldloc.2 IL_004b: ldloc.2
IL_004c: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass2_0'::'<CaptureOfThisAndParameterInForEach>b__0'() IL_004c: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'<CaptureOfThisAndParameterInForEach>b__0'()
IL_0052: newobj instance void [mscorlib]System.Action::.ctor(object, IL_0052: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_0057: stloc.s V_4 IL_0057: stloc.s V_4
@ -522,20 +580,20 @@
{ {
// Code size 158 (0x9e) // Code size 158 (0x9e)
.maxstack 2 .maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' V_0, .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1' V_0,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1, class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1,
class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' V_2, class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' V_2,
class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2' V_3, class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2' V_3,
bool V_4, bool V_4,
class [mscorlib]System.Action V_5) class [mscorlib]System.Action V_5)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::'<>4__this' IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1'::'<>4__this'
IL_000d: ldloc.0 IL_000d: ldloc.0
IL_000e: ldarg.1 IL_000e: ldarg.1
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1'::a IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1'::a
IL_0014: nop IL_0014: nop
IL_0015: nop IL_0015: nop
IL_0016: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Empty<int32>() IL_0016: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Empty<int32>()
@ -545,29 +603,29 @@
{ {
IL_0021: br.s IL_0081 IL_0021: br.s IL_0081
IL_0023: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::.ctor() IL_0023: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::.ctor()
IL_0028: stloc.2 IL_0028: stloc.2
IL_0029: ldloc.2 IL_0029: ldloc.2
IL_002a: ldloc.0 IL_002a: ldloc.0
IL_002b: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::'CS$<>8__locals1' IL_002b: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_1' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::'CS$<>8__locals1'
IL_0030: ldloc.2 IL_0030: ldloc.2
IL_0031: ldloc.1 IL_0031: ldloc.1
IL_0032: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current() IL_0032: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0037: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item IL_0037: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::item
IL_003c: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::.ctor() IL_003c: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::.ctor()
IL_0041: stloc.3 IL_0041: stloc.3
IL_0042: ldloc.3 IL_0042: ldloc.3
IL_0043: ldloc.2 IL_0043: ldloc.2
IL_0044: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_0044: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_0049: nop IL_0049: nop
IL_004a: ldloc.3 IL_004a: ldloc.3
IL_004b: ldloc.3 IL_004b: ldloc.3
IL_004c: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_004c: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_0051: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item IL_0051: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::item
IL_0056: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::copyOfItem IL_0056: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::copyOfItem
IL_005b: ldloc.3 IL_005b: ldloc.3
IL_005c: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'CS$<>8__locals2' IL_005c: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'CS$<>8__locals2'
IL_0061: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_0'::item IL_0061: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_0'::item
IL_0066: ldc.i4.0 IL_0066: ldc.i4.0
IL_0067: cgt IL_0067: cgt
IL_0069: stloc.s V_4 IL_0069: stloc.s V_4
@ -576,7 +634,7 @@
IL_006f: nop IL_006f: nop
IL_0070: ldloc.3 IL_0070: ldloc.3
IL_0071: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass3_2'::'<CaptureOfThisAndParameterInForEachWithItemCopy>b__0'() IL_0071: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass4_2'::'<CaptureOfThisAndParameterInForEachWithItemCopy>b__0'()
IL_0077: newobj instance void [mscorlib]System.Action::.ctor(object, IL_0077: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_007c: stloc.s V_5 IL_007c: stloc.s V_5
@ -623,7 +681,7 @@
IL_0005: nop IL_0005: nop
IL_0006: ldarg.0 IL_0006: ldarg.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::'<LambdaInForLoop>b__4_0'() IL_0008: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::'<LambdaInForLoop>b__5_0'()
IL_000e: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object, IL_000e: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int) native int)
IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Bar(class [mscorlib]System.Func`1<int32>) IL_0013: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Bar(class [mscorlib]System.Func`1<int32>)
@ -673,17 +731,17 @@
// Code size 39 (0x27) // Code size 39 (0x27)
.maxstack 8 .maxstack 8
IL_0000: nop IL_0000: nop
IL_0001: ldsfld class [mscorlib]System.Threading.ThreadStart ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9__7_0' IL_0001: ldsfld class [mscorlib]System.Threading.ThreadStart ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9__8_0'
IL_0006: dup IL_0006: dup
IL_0007: brtrue.s IL_0020 IL_0007: brtrue.s IL_0020
IL_0009: pop IL_0009: pop
IL_000a: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9' IL_000a: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9'
IL_000f: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<Bug955>b__7_0'() IL_000f: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<Bug955>b__8_0'()
IL_0015: newobj instance void [mscorlib]System.Threading.ThreadStart::.ctor(object, IL_0015: newobj instance void [mscorlib]System.Threading.ThreadStart::.ctor(object,
native int) native int)
IL_001a: dup IL_001a: dup
IL_001b: stsfld class [mscorlib]System.Threading.ThreadStart ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9__7_0' IL_001b: stsfld class [mscorlib]System.Threading.ThreadStart ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c'::'<>9__8_0'
IL_0020: newobj instance void [mscorlib]System.Threading.Thread::.ctor(class [mscorlib]System.Threading.ThreadStart) IL_0020: newobj instance void [mscorlib]System.Threading.Thread::.ctor(class [mscorlib]System.Threading.ThreadStart)
IL_0025: pop IL_0025: pop
IL_0026: ret IL_0026: ret
@ -694,19 +752,19 @@
{ {
// Code size 41 (0x29) // Code size 41 (0x29)
.maxstack 3 .maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0' V_0) .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::'<>4__this' IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this'
IL_000d: ldloc.0 IL_000d: ldloc.0
IL_000e: ldarg.1 IL_000e: ldarg.1
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::amount IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount
IL_0014: nop IL_0014: nop
IL_0015: ldarg.0 IL_0015: ldarg.0
IL_0016: ldloc.0 IL_0016: ldloc.0
IL_0017: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass8_0'::'<Bug951>b__0'() IL_0017: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<Bug951>b__0'()
IL_001d: newobj instance void [mscorlib]System.Action::.ctor(object, IL_001d: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_0022: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action) IL_0022: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
@ -719,20 +777,20 @@
{ {
// Code size 46 (0x2e) // Code size 46 (0x2e)
.maxstack 3 .maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0' V_0) .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<>4__this' IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::'<>4__this'
IL_000d: nop IL_000d: nop
IL_000e: ldloc.0 IL_000e: ldloc.0
IL_000f: ldarg.0 IL_000f: ldarg.0
IL_0010: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Foo() IL_0010: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Foo()
IL_0015: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::amount IL_0015: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::amount
IL_001a: ldarg.0 IL_001a: ldarg.0
IL_001b: ldloc.0 IL_001b: ldloc.0
IL_001c: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass9_0'::'<Bug951b>b__0'() IL_001c: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass10_0'::'<Bug951b>b__0'()
IL_0022: newobj instance void [mscorlib]System.Action::.ctor(object, IL_0022: newobj instance void [mscorlib]System.Action::.ctor(object,
native int) native int)
IL_0027: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action) IL_0027: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
@ -740,6 +798,31 @@
IL_002d: ret IL_002d: ret
} // end of method InstanceTests::Bug951b } // end of method InstanceTests::Bug951b
.method public hidebysig instance void
Bug951c(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData data) cil managed
{
// Code size 41 (0x29)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::'<>4__this'
IL_000d: ldloc.0
IL_000e: ldarg.1
IL_000f: stfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/SomeData ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::data
IL_0014: nop
IL_0015: ldarg.0
IL_0016: ldloc.0
IL_0017: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests/'<>c__DisplayClass11_0'::'<Bug951c>b__0'()
IL_001d: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_0022: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::DoAction(class [mscorlib]System.Action)
IL_0027: nop
IL_0028: ret
} // end of method InstanceTests::Bug951c
.method private hidebysig instance void .method private hidebysig instance void
DoAction(class [mscorlib]System.Action action) cil managed DoAction(class [mscorlib]System.Action action) cil managed
{ {
@ -758,6 +841,15 @@
IL_0001: ret IL_0001: ret
} // end of method InstanceTests::NoOp } // end of method InstanceTests::NoOp
.method private hidebysig instance void
DoSomething(string text) cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method InstanceTests::DoSomething
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -770,7 +862,7 @@
} // end of method InstanceTests::.ctor } // end of method InstanceTests::.ctor
.method private hidebysig instance void .method private hidebysig instance void
'<CaptureOfThis>b__0_0'() cil managed '<CaptureOfThis>b__1_0'() cil managed
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 9 (0x9) // Code size 9 (0x9)
@ -780,10 +872,10 @@
IL_0002: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThis() IL_0002: call instance class [mscorlib]System.Action ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::CaptureOfThis()
IL_0007: pop IL_0007: pop
IL_0008: ret IL_0008: ret
} // end of method InstanceTests::'<CaptureOfThis>b__0_0' } // end of method InstanceTests::'<CaptureOfThis>b__1_0'
.method private hidebysig instance int32 .method private hidebysig instance int32
'<LambdaInForLoop>b__4_0'() cil managed '<LambdaInForLoop>b__5_0'() cil managed
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7) // Code size 7 (0x7)
@ -791,7 +883,7 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Foo() IL_0001: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.DelegateConstruction/InstanceTests::Foo()
IL_0006: ret IL_0006: ret
} // end of method InstanceTests::'<LambdaInForLoop>b__4_0' } // end of method InstanceTests::'<LambdaInForLoop>b__5_0'
} // end of class InstanceTests } // end of class InstanceTests

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

@ -305,6 +305,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms
return; return;
var field = (IField)inst.Field.MemberDefinition; var field = (IField)inst.Field.MemberDefinition;
if (!initValues.TryGetValue(field, out DisplayClassVariable info)) { if (!initValues.TryGetValue(field, out DisplayClassVariable info)) {
if (!translatedDisplayClasses.Contains(field.DeclaringTypeDefinition))
return;
var v = currentFunction.RegisterVariable(VariableKind.Local, field.Type, field.Name); var v = currentFunction.RegisterVariable(VariableKind.Local, field.Type, field.Name);
v.CaptureScope = captureScope; v.CaptureScope = captureScope;
inst.ReplaceWith(new LdLoca(v)); inst.ReplaceWith(new LdLoca(v));

Loading…
Cancel
Save