From 2c0f26ca3e78da67edbbf90c64b6550b9694f90d Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 23 Jan 2019 00:24:29 +0100 Subject: [PATCH] Add unit tests --- .../TestCases/Pretty/QueryExpressions.cs | 19 ++ .../TestCases/Pretty/QueryExpressions.il | 176 ++++++++++++++++- .../TestCases/Pretty/QueryExpressions.opt.il | 141 ++++++++++++- .../Pretty/QueryExpressions.opt.roslyn.il | 178 ++++++++++++++--- .../Pretty/QueryExpressions.roslyn.il | 187 +++++++++++++++--- 5 files changed, 625 insertions(+), 76 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.cs index ebcf87829..37a16167d 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.cs @@ -213,6 +213,25 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty select (x); } + public static IEnumerable Issue1310a(bool test) + { +#if ROSLYN && OPT + IEnumerable obj = test ? (from c in Enumerable.Range(0, 255) + where char.IsLetter((char)c) + select (char)c) : (from c in Enumerable.Range(0, 255) + where char.IsDigit((char)c) + select (char)c); + return obj.Concat(obj); +#else + IEnumerable enumerable = test ? (from c in Enumerable.Range(0, 255) + where char.IsLetter((char)c) + select (char)c) : (from c in Enumerable.Range(0, 255) + where char.IsDigit((char)c) + select (char)c); + return enumerable.Concat(enumerable); +#endif + } + public static Maybe Cast(Maybe a) where TB : class { return from m in a diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.il index a73a6d0ea..2aa36ab3a 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.il @@ -17,8 +17,8 @@ { .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 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 ) .permissionset reqmin = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} .hash algorithm 0x00008004 @@ -273,6 +273,14 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .field private static class [mscorlib]System.Func`2 'CS$<>9__CachedAnonymousMethodDelegate6a' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private static class [mscorlib]System.Func`2 'CS$<>9__CachedAnonymousMethodDelegate6f' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private static class [mscorlib]System.Func`2 'CS$<>9__CachedAnonymousMethodDelegate70' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private static class [mscorlib]System.Func`2 'CS$<>9__CachedAnonymousMethodDelegate71' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private static class [mscorlib]System.Func`2 'CS$<>9__CachedAnonymousMethodDelegate72' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig instance object MultipleWhere() cil managed { @@ -1097,6 +1105,92 @@ IL_004e: ret } // end of method QueryExpressions::Issue437 + .method public hidebysig static class [mscorlib]System.Collections.Generic.IEnumerable`1 + Issue1310a(bool test) cil managed + { + // Code size 186 (0xba) + .maxstack 3 + .locals init (class [mscorlib]System.Collections.Generic.IEnumerable`1 V_0, + class [mscorlib]System.Collections.Generic.IEnumerable`1 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: brtrue.s IL_0059 + + IL_0004: ldc.i4.0 + IL_0005: ldc.i4 0xff + IL_000a: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Range(int32, + int32) + IL_000f: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate71' + IL_0014: brtrue.s IL_0029 + + IL_0016: ldnull + IL_0017: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6d'(int32) + IL_001d: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_0022: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate71' + IL_0027: br.s IL_0029 + + IL_0029: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate71' + IL_002e: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0033: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate72' + IL_0038: brtrue.s IL_004d + + IL_003a: ldnull + IL_003b: ldftn char ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6e'(int32) + IL_0041: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_0046: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate72' + IL_004b: br.s IL_004d + + IL_004d: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate72' + IL_0052: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Select(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0057: br.s IL_00ac + + IL_0059: ldc.i4.0 + IL_005a: ldc.i4 0xff + IL_005f: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Range(int32, + int32) + IL_0064: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate6f' + IL_0069: brtrue.s IL_007e + + IL_006b: ldnull + IL_006c: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6b'(int32) + IL_0072: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_0077: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate6f' + IL_007c: br.s IL_007e + + IL_007e: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate6f' + IL_0083: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0088: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate70' + IL_008d: brtrue.s IL_00a2 + + IL_008f: ldnull + IL_0090: ldftn char ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6c'(int32) + IL_0096: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_009b: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate70' + IL_00a0: br.s IL_00a2 + + IL_00a2: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate70' + IL_00a7: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Select(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_00ac: nop + IL_00ad: stloc.0 + IL_00ae: ldloc.0 + IL_00af: ldloc.0 + IL_00b0: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Concat(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00b5: stloc.1 + IL_00b6: br.s IL_00b8 + + IL_00b8: ldloc.1 + IL_00b9: ret + } // end of method QueryExpressions::Issue1310a + .method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 Cast(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 a) cil managed { @@ -1106,19 +1200,19 @@ IL_0000: nop IL_0001: ldarg.0 IL_0002: ldnull - IL_0003: ldftn class '<>f__AnonymousType11`2' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6c'(!!0) + IL_0003: ldftn class '<>f__AnonymousType11`2' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__74'(!!0) IL_0009: newobj instance void class [mscorlib]System.Func`2f__AnonymousType11`2'>::.ctor(object, native int) IL_000e: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Selectf__AnonymousType11`2'>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, class [mscorlib]System.Func`2) IL_0013: ldnull - IL_0014: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6d'(class '<>f__AnonymousType11`2') + IL_0014: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__75'(class '<>f__AnonymousType11`2') IL_001a: newobj instance void class [mscorlib]System.Func`2f__AnonymousType11`2',bool>::.ctor(object, native int) IL_001f: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Wheref__AnonymousType11`2'>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, class [mscorlib]System.Func`2) IL_0024: ldnull - IL_0025: ldftn !!1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6e'(class '<>f__AnonymousType11`2') + IL_0025: ldftn !!1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__76'(class '<>f__AnonymousType11`2') IL_002b: newobj instance void class [mscorlib]System.Func`2f__AnonymousType11`2',!!TB>::.ctor(object, native int) IL_0030: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Selectf__AnonymousType11`2',!!1>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, @@ -2055,8 +2149,70 @@ IL_0005: ret } // end of method QueryExpressions::'b__68' + .method private hidebysig static bool 'b__6b'(int32 c) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 1 + .locals init (bool V_0) + IL_0000: ldarg.0 + IL_0001: conv.u2 + IL_0002: call bool [mscorlib]System.Char::IsLetter(char) + IL_0007: stloc.0 + IL_0008: br.s IL_000a + + IL_000a: ldloc.0 + IL_000b: ret + } // end of method QueryExpressions::'b__6b' + + .method private hidebysig static char 'b__6c'(int32 c) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (char V_0) + IL_0000: ldarg.0 + IL_0001: conv.u2 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method QueryExpressions::'b__6c' + + .method private hidebysig static bool 'b__6d'(int32 c) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 12 (0xc) + .maxstack 1 + .locals init (bool V_0) + IL_0000: ldarg.0 + IL_0001: conv.u2 + IL_0002: call bool [mscorlib]System.Char::IsDigit(char) + IL_0007: stloc.0 + IL_0008: br.s IL_000a + + IL_000a: ldloc.0 + IL_000b: ret + } // end of method QueryExpressions::'b__6d' + + .method private hidebysig static char 'b__6e'(int32 c) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 1 + .locals init (char V_0) + IL_0000: ldarg.0 + IL_0001: conv.u2 + IL_0002: stloc.0 + IL_0003: br.s IL_0005 + + IL_0005: ldloc.0 + IL_0006: ret + } // end of method QueryExpressions::'b__6e' + .method private hidebysig static class '<>f__AnonymousType11`2' - 'b__6c'(!!TA m) cil managed + 'b__74'(!!TA m) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 27 (0x1b) @@ -2074,9 +2230,9 @@ IL_0019: ldloc.0 IL_001a: ret - } // end of method QueryExpressions::'b__6c' + } // end of method QueryExpressions::'b__74' - .method private hidebysig static bool 'b__6d'(class '<>f__AnonymousType11`2' '<>h__TransparentIdentifier6b') cil managed + .method private hidebysig static bool 'b__75'(class '<>f__AnonymousType11`2' '<>h__TransparentIdentifier73') cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 22 (0x16) @@ -2094,9 +2250,9 @@ IL_0014: ldloc.0 IL_0015: ret - } // end of method QueryExpressions::'b__6d' + } // end of method QueryExpressions::'b__75' - .method private hidebysig static !!TB 'b__6e'(class '<>f__AnonymousType11`2' '<>h__TransparentIdentifier6b') cil managed + .method private hidebysig static !!TB 'b__76'(class '<>f__AnonymousType11`2' '<>h__TransparentIdentifier73') cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 11 (0xb) @@ -2109,7 +2265,7 @@ IL_0009: ldloc.0 IL_000a: ret - } // end of method QueryExpressions::'b__6e' + } // end of method QueryExpressions::'b__76' } // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.il index 487f6754b..4997aebba 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.il @@ -17,8 +17,8 @@ { .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 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 ) .permissionset reqmin = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} .hash algorithm 0x00008004 @@ -263,6 +263,14 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .field private static class [mscorlib]System.Func`2 'CS$<>9__CachedAnonymousMethodDelegate6a' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private static class [mscorlib]System.Func`2 'CS$<>9__CachedAnonymousMethodDelegate6f' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private static class [mscorlib]System.Func`2 'CS$<>9__CachedAnonymousMethodDelegate70' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private static class [mscorlib]System.Func`2 'CS$<>9__CachedAnonymousMethodDelegate71' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private static class [mscorlib]System.Func`2 'CS$<>9__CachedAnonymousMethodDelegate72' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig instance object MultipleWhere() cil managed { @@ -909,6 +917,77 @@ IL_0045: ret } // end of method QueryExpressions::Issue437 + .method public hidebysig static class [mscorlib]System.Collections.Generic.IEnumerable`1 + Issue1310a(bool test) cil managed + { + // Code size 172 (0xac) + .maxstack 3 + .locals init (class [mscorlib]System.Collections.Generic.IEnumerable`1 V_0) + IL_0000: ldarg.0 + IL_0001: brtrue.s IL_0054 + + IL_0003: ldc.i4.0 + IL_0004: ldc.i4 0xff + IL_0009: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Range(int32, + int32) + IL_000e: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate71' + IL_0013: brtrue.s IL_0026 + + IL_0015: ldnull + IL_0016: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6d'(int32) + IL_001c: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_0021: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate71' + IL_0026: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate71' + IL_002b: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0030: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate72' + IL_0035: brtrue.s IL_0048 + + IL_0037: ldnull + IL_0038: ldftn char ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6e'(int32) + IL_003e: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_0043: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate72' + IL_0048: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate72' + IL_004d: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Select(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0052: br.s IL_00a3 + + IL_0054: ldc.i4.0 + IL_0055: ldc.i4 0xff + IL_005a: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Range(int32, + int32) + IL_005f: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate6f' + IL_0064: brtrue.s IL_0077 + + IL_0066: ldnull + IL_0067: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6b'(int32) + IL_006d: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_0072: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate6f' + IL_0077: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate6f' + IL_007c: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0081: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate70' + IL_0086: brtrue.s IL_0099 + + IL_0088: ldnull + IL_0089: ldftn char ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6c'(int32) + IL_008f: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_0094: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate70' + IL_0099: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'CS$<>9__CachedAnonymousMethodDelegate70' + IL_009e: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Select(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_00a3: stloc.0 + IL_00a4: ldloc.0 + IL_00a5: ldloc.0 + IL_00a6: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Concat(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00ab: ret + } // end of method QueryExpressions::Issue1310a + .method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 Cast(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 a) cil managed { @@ -916,19 +995,19 @@ .maxstack 8 IL_0000: ldarg.0 IL_0001: ldnull - IL_0002: ldftn class '<>f__AnonymousType11`2' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6c'(!!0) + IL_0002: ldftn class '<>f__AnonymousType11`2' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__74'(!!0) IL_0008: newobj instance void class [mscorlib]System.Func`2f__AnonymousType11`2'>::.ctor(object, native int) IL_000d: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Selectf__AnonymousType11`2'>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, class [mscorlib]System.Func`2) IL_0012: ldnull - IL_0013: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6d'(class '<>f__AnonymousType11`2') + IL_0013: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__75'(class '<>f__AnonymousType11`2') IL_0019: newobj instance void class [mscorlib]System.Func`2f__AnonymousType11`2',bool>::.ctor(object, native int) IL_001e: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Wheref__AnonymousType11`2'>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, class [mscorlib]System.Func`2) IL_0023: ldnull - IL_0024: ldftn !!1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__6e'(class '<>f__AnonymousType11`2') + IL_0024: ldftn !!1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'b__76'(class '<>f__AnonymousType11`2') IL_002a: newobj instance void class [mscorlib]System.Func`2f__AnonymousType11`2',!!TB>::.ctor(object, native int) IL_002f: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Selectf__AnonymousType11`2',!!1>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, @@ -1626,8 +1705,50 @@ IL_0001: ret } // end of method QueryExpressions::'b__68' + .method private hidebysig static bool 'b__6b'(int32 c) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: conv.u2 + IL_0002: call bool [mscorlib]System.Char::IsLetter(char) + IL_0007: ret + } // end of method QueryExpressions::'b__6b' + + .method private hidebysig static char 'b__6c'(int32 c) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 3 (0x3) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: conv.u2 + IL_0002: ret + } // end of method QueryExpressions::'b__6c' + + .method private hidebysig static bool 'b__6d'(int32 c) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: conv.u2 + IL_0002: call bool [mscorlib]System.Char::IsDigit(char) + IL_0007: ret + } // end of method QueryExpressions::'b__6d' + + .method private hidebysig static char 'b__6e'(int32 c) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 3 (0x3) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: conv.u2 + IL_0002: ret + } // end of method QueryExpressions::'b__6e' + .method private hidebysig static class '<>f__AnonymousType11`2' - 'b__6c'(!!TA m) cil managed + 'b__74'(!!TA m) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 23 (0x17) @@ -1640,9 +1761,9 @@ IL_0011: newobj instance void class '<>f__AnonymousType11`2'::.ctor(!0, !1) IL_0016: ret - } // end of method QueryExpressions::'b__6c' + } // end of method QueryExpressions::'b__74' - .method private hidebysig static bool 'b__6d'(class '<>f__AnonymousType11`2' '<>h__TransparentIdentifier6b') cil managed + .method private hidebysig static bool 'b__75'(class '<>f__AnonymousType11`2' '<>h__TransparentIdentifier73') cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 18 (0x12) @@ -1655,9 +1776,9 @@ IL_000e: ldc.i4.0 IL_000f: ceq IL_0011: ret - } // end of method QueryExpressions::'b__6d' + } // end of method QueryExpressions::'b__75' - .method private hidebysig static !!TB 'b__6e'(class '<>f__AnonymousType11`2' '<>h__TransparentIdentifier6b') cil managed + .method private hidebysig static !!TB 'b__76'(class '<>f__AnonymousType11`2' '<>h__TransparentIdentifier73') cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 7 (0x7) @@ -1665,7 +1786,7 @@ IL_0000: ldarg.0 IL_0001: callvirt instance !1 class '<>f__AnonymousType11`2'::get_t() IL_0006: ret - } // end of method QueryExpressions::'b__6e' + } // end of method QueryExpressions::'b__76' } // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.roslyn.il index f1e4543e1..91a5ac863 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.roslyn.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.roslyn.il @@ -3857,6 +3857,10 @@ .field public static class [mscorlib]System.Func`2,class '<>f__AnonymousType16`2'> '<>9__19_1' .field public static class [mscorlib]System.Func`2 '<>9__20_0' .field public static class [mscorlib]System.Func`2 '<>9__20_1' + .field public static class [mscorlib]System.Func`2 '<>9__21_0' + .field public static class [mscorlib]System.Func`2 '<>9__21_1' + .field public static class [mscorlib]System.Func`2 '<>9__21_2' + .field public static class [mscorlib]System.Func`2 '<>9__21_3' .method private hidebysig specialname rtspecialname static void .cctor() cil managed { @@ -4499,25 +4503,67 @@ IL_0001: ret } // end of method '<>c'::'b__20_1' + .method assembly hidebysig instance bool + 'b__21_0'(int32 c) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: conv.u2 + IL_0002: call bool [mscorlib]System.Char::IsLetter(char) + IL_0007: ret + } // end of method '<>c'::'b__21_0' + + .method assembly hidebysig instance char + 'b__21_1'(int32 c) cil managed + { + // Code size 3 (0x3) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: conv.u2 + IL_0002: ret + } // end of method '<>c'::'b__21_1' + + .method assembly hidebysig instance bool + 'b__21_2'(int32 c) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: conv.u2 + IL_0002: call bool [mscorlib]System.Char::IsDigit(char) + IL_0007: ret + } // end of method '<>c'::'b__21_2' + + .method assembly hidebysig instance char + 'b__21_3'(int32 c) cil managed + { + // Code size 3 (0x3) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: conv.u2 + IL_0002: ret + } // end of method '<>c'::'b__21_3' + } // end of class '<>c' - .class auto ansi serializable sealed nested private beforefieldinit '<>c__21`2' + .class auto ansi serializable sealed nested private beforefieldinit '<>c__22`2' extends [mscorlib]System.Object { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2' '<>9' - .field public static class [mscorlib]System.Func`2f__AnonymousType17`2'> '<>9__21_0' - .field public static class [mscorlib]System.Func`2f__AnonymousType17`2',bool> '<>9__21_1' - .field public static class [mscorlib]System.Func`2f__AnonymousType17`2',!TB> '<>9__21_2' + .field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2' '<>9' + .field public static class [mscorlib]System.Func`2f__AnonymousType17`2'> '<>9__22_0' + .field public static class [mscorlib]System.Func`2f__AnonymousType17`2',bool> '<>9__22_1' + .field public static class [mscorlib]System.Func`2f__AnonymousType17`2',!TB> '<>9__22_2' .method private hidebysig specialname rtspecialname static void .cctor() cil managed { // Code size 11 (0xb) .maxstack 8 - IL_0000: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::.ctor() - IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9' + IL_0000: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::.ctor() + IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9' IL_000a: ret - } // end of method '<>c__21`2'::.cctor + } // end of method '<>c__22`2'::.cctor .method public hidebysig specialname rtspecialname instance void .ctor() cil managed @@ -4527,10 +4573,10 @@ IL_0000: ldarg.0 IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: ret - } // end of method '<>c__21`2'::.ctor + } // end of method '<>c__22`2'::.ctor .method assembly hidebysig instance class '<>f__AnonymousType17`2' - 'b__21_0'(!TA m) cil managed + 'b__22_0'(!TA m) cil managed { // Code size 23 (0x17) .maxstack 8 @@ -4542,10 +4588,10 @@ IL_0011: newobj instance void class '<>f__AnonymousType17`2'::.ctor(!0, !1) IL_0016: ret - } // end of method '<>c__21`2'::'b__21_0' + } // end of method '<>c__22`2'::'b__22_0' .method assembly hidebysig instance bool - 'b__21_1'(class '<>f__AnonymousType17`2' '<>h__TransparentIdentifier0') cil managed + 'b__22_1'(class '<>f__AnonymousType17`2' '<>h__TransparentIdentifier0') cil managed { // Code size 15 (0xf) .maxstack 8 @@ -4555,19 +4601,19 @@ IL_000b: ldnull IL_000c: cgt.un IL_000e: ret - } // end of method '<>c__21`2'::'b__21_1' + } // end of method '<>c__22`2'::'b__22_1' .method assembly hidebysig instance !TB - 'b__21_2'(class '<>f__AnonymousType17`2' '<>h__TransparentIdentifier0') cil managed + 'b__22_2'(class '<>f__AnonymousType17`2' '<>h__TransparentIdentifier0') cil managed { // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.1 IL_0001: callvirt instance !1 class '<>f__AnonymousType17`2'::get_t() IL_0006: ret - } // end of method '<>c__21`2'::'b__21_2' + } // end of method '<>c__22`2'::'b__22_2' - } // end of class '<>c__21`2' + } // end of class '<>c__22`2' .field public class [mscorlib]System.Collections.Generic.IEnumerable`1 customers .field public class [mscorlib]System.Collections.Generic.IEnumerable`1 orders @@ -5305,49 +5351,125 @@ IL_0049: ret } // end of method QueryExpressions::Issue437 + .method public hidebysig static class [mscorlib]System.Collections.Generic.IEnumerable`1 + Issue1310a(bool test) cil managed + { + // Code size 178 (0xb2) + .maxstack 3 + IL_0000: ldarg.0 + IL_0001: brtrue.s IL_0058 + + IL_0003: ldc.i4.0 + IL_0004: ldc.i4 0xff + IL_0009: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Range(int32, + int32) + IL_000e: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_2' + IL_0013: dup + IL_0014: brtrue.s IL_002d + + IL_0016: pop + IL_0017: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' + IL_001c: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'b__21_2'(int32) + IL_0022: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_0027: dup + IL_0028: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_2' + IL_002d: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0032: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_3' + IL_0037: dup + IL_0038: brtrue.s IL_0051 + + IL_003a: pop + IL_003b: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' + IL_0040: ldftn instance char ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'b__21_3'(int32) + IL_0046: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_004b: dup + IL_004c: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_3' + IL_0051: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Select(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0056: br.s IL_00ab + + IL_0058: ldc.i4.0 + IL_0059: ldc.i4 0xff + IL_005e: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Range(int32, + int32) + IL_0063: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_0' + IL_0068: dup + IL_0069: brtrue.s IL_0082 + + IL_006b: pop + IL_006c: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' + IL_0071: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'b__21_0'(int32) + IL_0077: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_007c: dup + IL_007d: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_0' + IL_0082: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0087: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_1' + IL_008c: dup + IL_008d: brtrue.s IL_00a6 + + IL_008f: pop + IL_0090: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' + IL_0095: ldftn instance char ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'b__21_1'(int32) + IL_009b: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_00a0: dup + IL_00a1: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_1' + IL_00a6: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Select(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_00ab: dup + IL_00ac: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Concat(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00b1: ret + } // end of method QueryExpressions::Issue1310a + .method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 Cast(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 a) cil managed { // Code size 110 (0x6e) .maxstack 3 IL_0000: ldarg.0 - IL_0001: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2'> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_0' + IL_0001: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2'> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_0' IL_0006: dup IL_0007: brtrue.s IL_0020 IL_0009: pop - IL_000a: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9' - IL_000f: ldftn instance class '<>f__AnonymousType17`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'b__21_0'(!0) + IL_000a: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9' + IL_000f: ldftn instance class '<>f__AnonymousType17`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'b__22_0'(!0) IL_0015: newobj instance void class [mscorlib]System.Func`2f__AnonymousType17`2'>::.ctor(object, native int) IL_001a: dup - IL_001b: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2'> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_0' + IL_001b: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2'> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_0' IL_0020: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Selectf__AnonymousType17`2'>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, class [mscorlib]System.Func`2) - IL_0025: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2',bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_1' + IL_0025: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2',bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_1' IL_002a: dup IL_002b: brtrue.s IL_0044 IL_002d: pop - IL_002e: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9' - IL_0033: ldftn instance bool class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'b__21_1'(class '<>f__AnonymousType17`2') + IL_002e: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9' + IL_0033: ldftn instance bool class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'b__22_1'(class '<>f__AnonymousType17`2') IL_0039: newobj instance void class [mscorlib]System.Func`2f__AnonymousType17`2',bool>::.ctor(object, native int) IL_003e: dup - IL_003f: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2',bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_1' + IL_003f: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2',bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_1' IL_0044: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Wheref__AnonymousType17`2'>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, class [mscorlib]System.Func`2) - IL_0049: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2',!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_2' + IL_0049: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2',!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_2' IL_004e: dup IL_004f: brtrue.s IL_0068 IL_0051: pop - IL_0052: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9' - IL_0057: ldftn instance !1 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'b__21_2'(class '<>f__AnonymousType17`2') + IL_0052: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9' + IL_0057: ldftn instance !1 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'b__22_2'(class '<>f__AnonymousType17`2') IL_005d: newobj instance void class [mscorlib]System.Func`2f__AnonymousType17`2',!!TB>::.ctor(object, native int) IL_0062: dup - IL_0063: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2',!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_2' + IL_0063: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2',!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_2' IL_0068: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Selectf__AnonymousType17`2',!!1>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, class [mscorlib]System.Func`2) IL_006d: ret diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.roslyn.il index fe6097b4f..72381673d 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.roslyn.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.roslyn.il @@ -3960,6 +3960,10 @@ .field public static class [mscorlib]System.Func`2,class '<>f__AnonymousType16`2'> '<>9__19_1' .field public static class [mscorlib]System.Func`2 '<>9__20_0' .field public static class [mscorlib]System.Func`2 '<>9__20_1' + .field public static class [mscorlib]System.Func`2 '<>9__21_0' + .field public static class [mscorlib]System.Func`2 '<>9__21_1' + .field public static class [mscorlib]System.Func`2 '<>9__21_2' + .field public static class [mscorlib]System.Func`2 '<>9__21_3' .method private hidebysig specialname rtspecialname static void .cctor() cil managed { @@ -4605,25 +4609,67 @@ IL_0001: ret } // end of method '<>c'::'b__20_1' + .method assembly hidebysig instance bool + 'b__21_0'(int32 c) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: conv.u2 + IL_0002: call bool [mscorlib]System.Char::IsLetter(char) + IL_0007: ret + } // end of method '<>c'::'b__21_0' + + .method assembly hidebysig instance char + 'b__21_1'(int32 c) cil managed + { + // Code size 3 (0x3) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: conv.u2 + IL_0002: ret + } // end of method '<>c'::'b__21_1' + + .method assembly hidebysig instance bool + 'b__21_2'(int32 c) cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: conv.u2 + IL_0002: call bool [mscorlib]System.Char::IsDigit(char) + IL_0007: ret + } // end of method '<>c'::'b__21_2' + + .method assembly hidebysig instance char + 'b__21_3'(int32 c) cil managed + { + // Code size 3 (0x3) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: conv.u2 + IL_0002: ret + } // end of method '<>c'::'b__21_3' + } // end of class '<>c' - .class auto ansi serializable sealed nested private beforefieldinit '<>c__21`2' + .class auto ansi serializable sealed nested private beforefieldinit '<>c__22`2' extends [mscorlib]System.Object { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2' '<>9' - .field public static class [mscorlib]System.Func`2f__AnonymousType17`2'> '<>9__21_0' - .field public static class [mscorlib]System.Func`2f__AnonymousType17`2',bool> '<>9__21_1' - .field public static class [mscorlib]System.Func`2f__AnonymousType17`2',!TB> '<>9__21_2' + .field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2' '<>9' + .field public static class [mscorlib]System.Func`2f__AnonymousType17`2'> '<>9__22_0' + .field public static class [mscorlib]System.Func`2f__AnonymousType17`2',bool> '<>9__22_1' + .field public static class [mscorlib]System.Func`2f__AnonymousType17`2',!TB> '<>9__22_2' .method private hidebysig specialname rtspecialname static void .cctor() cil managed { // Code size 11 (0xb) .maxstack 8 - IL_0000: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::.ctor() - IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9' + IL_0000: newobj instance void class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::.ctor() + IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9' IL_000a: ret - } // end of method '<>c__21`2'::.cctor + } // end of method '<>c__22`2'::.cctor .method public hidebysig specialname rtspecialname instance void .ctor() cil managed @@ -4634,10 +4680,10 @@ IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: nop IL_0007: ret - } // end of method '<>c__21`2'::.ctor + } // end of method '<>c__22`2'::.ctor .method assembly hidebysig instance class '<>f__AnonymousType17`2' - 'b__21_0'(!TA m) cil managed + 'b__22_0'(!TA m) cil managed { // Code size 23 (0x17) .maxstack 8 @@ -4649,10 +4695,10 @@ IL_0011: newobj instance void class '<>f__AnonymousType17`2'::.ctor(!0, !1) IL_0016: ret - } // end of method '<>c__21`2'::'b__21_0' + } // end of method '<>c__22`2'::'b__22_0' .method assembly hidebysig instance bool - 'b__21_1'(class '<>f__AnonymousType17`2' '<>h__TransparentIdentifier0') cil managed + 'b__22_1'(class '<>f__AnonymousType17`2' '<>h__TransparentIdentifier0') cil managed { // Code size 15 (0xf) .maxstack 8 @@ -4662,19 +4708,19 @@ IL_000b: ldnull IL_000c: cgt.un IL_000e: ret - } // end of method '<>c__21`2'::'b__21_1' + } // end of method '<>c__22`2'::'b__22_1' .method assembly hidebysig instance !TB - 'b__21_2'(class '<>f__AnonymousType17`2' '<>h__TransparentIdentifier0') cil managed + 'b__22_2'(class '<>f__AnonymousType17`2' '<>h__TransparentIdentifier0') cil managed { // Code size 7 (0x7) .maxstack 8 IL_0000: ldarg.1 IL_0001: callvirt instance !1 class '<>f__AnonymousType17`2'::get_t() IL_0006: ret - } // end of method '<>c__21`2'::'b__21_2' + } // end of method '<>c__22`2'::'b__22_2' - } // end of class '<>c__21`2' + } // end of class '<>c__22`2' .field public class [mscorlib]System.Collections.Generic.IEnumerable`1 customers .field public class [mscorlib]System.Collections.Generic.IEnumerable`1 orders @@ -5502,6 +5548,91 @@ IL_004e: ret } // end of method QueryExpressions::Issue437 + .method public hidebysig static class [mscorlib]System.Collections.Generic.IEnumerable`1 + Issue1310a(bool test) cil managed + { + // Code size 185 (0xb9) + .maxstack 3 + .locals init (class [mscorlib]System.Collections.Generic.IEnumerable`1 V_0, + class [mscorlib]System.Collections.Generic.IEnumerable`1 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: brtrue.s IL_0059 + + IL_0004: ldc.i4.0 + IL_0005: ldc.i4 0xff + IL_000a: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Range(int32, + int32) + IL_000f: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_2' + IL_0014: dup + IL_0015: brtrue.s IL_002e + + IL_0017: pop + IL_0018: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' + IL_001d: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'b__21_2'(int32) + IL_0023: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_0028: dup + IL_0029: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_2' + IL_002e: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0033: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_3' + IL_0038: dup + IL_0039: brtrue.s IL_0052 + + IL_003b: pop + IL_003c: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' + IL_0041: ldftn instance char ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'b__21_3'(int32) + IL_0047: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_004c: dup + IL_004d: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_3' + IL_0052: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Select(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0057: br.s IL_00ac + + IL_0059: ldc.i4.0 + IL_005a: ldc.i4 0xff + IL_005f: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Range(int32, + int32) + IL_0064: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_0' + IL_0069: dup + IL_006a: brtrue.s IL_0083 + + IL_006c: pop + IL_006d: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' + IL_0072: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'b__21_0'(int32) + IL_0078: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_007d: dup + IL_007e: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_0' + IL_0083: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Where(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_0088: ldsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_1' + IL_008d: dup + IL_008e: brtrue.s IL_00a7 + + IL_0090: pop + IL_0091: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' + IL_0096: ldftn instance char ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'b__21_1'(int32) + IL_009c: newobj instance void class [mscorlib]System.Func`2::.ctor(object, + native int) + IL_00a1: dup + IL_00a2: stsfld class [mscorlib]System.Func`2 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__21_1' + IL_00a7: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Select(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Func`2) + IL_00ac: stloc.0 + IL_00ad: ldloc.0 + IL_00ae: ldloc.0 + IL_00af: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [System.Core]System.Linq.Enumerable::Concat(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00b4: stloc.1 + IL_00b5: br.s IL_00b7 + + IL_00b7: ldloc.1 + IL_00b8: ret + } // end of method QueryExpressions::Issue1310a + .method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 Cast(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 a) cil managed { @@ -5510,43 +5641,43 @@ .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 V_0) IL_0000: nop IL_0001: ldarg.0 - IL_0002: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2'> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_0' + IL_0002: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2'> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_0' IL_0007: dup IL_0008: brtrue.s IL_0021 IL_000a: pop - IL_000b: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9' - IL_0010: ldftn instance class '<>f__AnonymousType17`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'b__21_0'(!0) + IL_000b: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9' + IL_0010: ldftn instance class '<>f__AnonymousType17`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'b__22_0'(!0) IL_0016: newobj instance void class [mscorlib]System.Func`2f__AnonymousType17`2'>::.ctor(object, native int) IL_001b: dup - IL_001c: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2'> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_0' + IL_001c: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2'> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_0' IL_0021: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Selectf__AnonymousType17`2'>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, class [mscorlib]System.Func`2) - IL_0026: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2',bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_1' + IL_0026: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2',bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_1' IL_002b: dup IL_002c: brtrue.s IL_0045 IL_002e: pop - IL_002f: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9' - IL_0034: ldftn instance bool class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'b__21_1'(class '<>f__AnonymousType17`2') + IL_002f: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9' + IL_0034: ldftn instance bool class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'b__22_1'(class '<>f__AnonymousType17`2') IL_003a: newobj instance void class [mscorlib]System.Func`2f__AnonymousType17`2',bool>::.ctor(object, native int) IL_003f: dup - IL_0040: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2',bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_1' + IL_0040: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2',bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_1' IL_0045: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Wheref__AnonymousType17`2'>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, class [mscorlib]System.Func`2) - IL_004a: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2',!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_2' + IL_004a: ldsfld class [mscorlib]System.Func`2f__AnonymousType17`2',!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_2' IL_004f: dup IL_0050: brtrue.s IL_0069 IL_0052: pop - IL_0053: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9' - IL_0058: ldftn instance !1 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'b__21_2'(class '<>f__AnonymousType17`2') + IL_0053: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2' class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9' + IL_0058: ldftn instance !1 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'b__22_2'(class '<>f__AnonymousType17`2') IL_005e: newobj instance void class [mscorlib]System.Func`2f__AnonymousType17`2',!!TB>::.ctor(object, native int) IL_0063: dup - IL_0064: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2',!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__21`2'::'<>9__21_2' + IL_0064: stsfld class [mscorlib]System.Func`2f__AnonymousType17`2',!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__22`2'::'<>9__22_2' IL_0069: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Selectf__AnonymousType17`2',!!1>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1, class [mscorlib]System.Func`2) IL_006e: stloc.0