Browse Source

#980: Fix type substitution for lambdas.

pull/1096/merge
Daniel Grunwald 7 years ago
parent
commit
7c91d48d68
  1. 27
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.cs
  2. 343
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.il
  3. 284
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.il
  4. 387
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.roslyn.il
  5. 410
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.roslyn.il
  6. 4
      ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs
  7. 2
      ICSharpCode.Decompiler/IL/Transforms/DelegateConstruction.cs
  8. 2
      ICSharpCode.Decompiler/IL/Transforms/ProxyCallReplacer.cs
  9. 9
      ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs
  10. 6
      ICSharpCode.Decompiler/TypeSystem/IDecompilerTypeSystem.cs
  11. 8
      ICSharpCode.Decompiler/TypeSystem/SpecializingDecompilerTypeSystem.cs

27
ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.cs

@ -186,5 +186,32 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
where x where x
select (x); select (x);
} }
public static Maybe<TB> Cast<TA, TB>(Maybe<TA> a) where TB : class
{
return from m in a
let t = m as TB
where t != null
select t;
}
}
public struct Maybe<T>
{
public T Value;
public bool HasValue;
}
public static class MaybeExtensions
{
public static Maybe<TResult> Select<T, TResult>(this Maybe<T> a, Func<T, TResult> fn)
{
return default(Maybe<TResult>);
}
public static Maybe<T> Where<T>(this Maybe<T> a, Func<T, bool> predicate)
{
return default(Maybe<T>);
}
} }
} }

343
ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.il

@ -1,5 +1,5 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929 // Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved. // Copyright (c) Microsoft Corporation. All rights reserved.
@ -15,25 +15,26 @@
.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 vhzzjbo3 .assembly '3sjlbjwy'
{ {
.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.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx .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. 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
.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 .permissionset reqmin
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004 .hash algorithm 0x00008004
.ver 0:0:0:0 .ver 0:0:0:0
} }
.module vhzzjbo3.dll .module '3sjlbjwy.dll'
// MVID: {BE1CCC70-BCCD-4D60-B953-95795349E24D} // MVID: {6FCE06BA-3F4A-453E-A9A7-0186431125F1}
.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: 0x00C80000 // Image base: 0x04290000
// =============== CLASS MEMBERS DECLARATION =================== // =============== CLASS MEMBERS DECLARATION ===================
@ -960,6 +961,39 @@
IL_004e: ret IL_004e: ret
} // end of method QueryExpressions::Issue437 } // end of method QueryExpressions::Issue437
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TB>
Cast<TA,class TB>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TA> a) cil managed
{
// Code size 58 (0x3a)
.maxstack 3
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TB> V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldnull
IL_0003: ldftn class '<>f__AnonymousTypef`2'<!!0,!!1> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'<Cast>b__64'<!!0,!!1>(!!0)
IL_0009: newobj instance void class [mscorlib]System.Func`2<!!TA,class '<>f__AnonymousTypef`2'<!!TA,!!TB>>::.ctor(object,
native int)
IL_000e: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!1> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Select<!!0,class '<>f__AnonymousTypef`2'<!!0,!!1>>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>)
IL_0013: ldnull
IL_0014: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'<Cast>b__65'<!!0,!!1>(class '<>f__AnonymousTypef`2'<!!0,!!1>)
IL_001a: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousTypef`2'<!!TA,!!TB>,bool>::.ctor(object,
native int)
IL_001f: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Where<class '<>f__AnonymousTypef`2'<!!0,!!1>>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,bool>)
IL_0024: ldnull
IL_0025: ldftn !!1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'<Cast>b__66'<!!0,!!1>(class '<>f__AnonymousTypef`2'<!!0,!!1>)
IL_002b: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousTypef`2'<!!TA,!!TB>,!!TB>::.ctor(object,
native int)
IL_0030: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!1> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Select<class '<>f__AnonymousTypef`2'<!!0,!!1>,!!1>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>)
IL_0035: stloc.0
IL_0036: br.s IL_0038
IL_0038: ldloc.0
IL_0039: ret
} // end of method QueryExpressions::Cast
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -1796,8 +1830,117 @@
IL_0005: ret IL_0005: ret
} // end of method QueryExpressions::'<Issue437>b__60' } // end of method QueryExpressions::'<Issue437>b__60'
.method private hidebysig static class '<>f__AnonymousTypef`2'<!!TA,!!TB>
'<Cast>b__64'<TA,class TB>(!!TA m) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 27 (0x1b)
.maxstack 2
.locals init (class '<>f__AnonymousTypef`2'<!!TA,!!TB> V_0)
IL_0000: ldarg.0
IL_0001: ldarg.0
IL_0002: box !!TA
IL_0007: isinst !!TB
IL_000c: unbox.any !!TB
IL_0011: newobj instance void class '<>f__AnonymousTypef`2'<!!TA,!!TB>::.ctor(!0,
!1)
IL_0016: stloc.0
IL_0017: br.s IL_0019
IL_0019: ldloc.0
IL_001a: ret
} // end of method QueryExpressions::'<Cast>b__64'
.method private hidebysig static bool '<Cast>b__65'<TA,class TB>(class '<>f__AnonymousTypef`2'<!!TA,!!TB> '<>h__TransparentIdentifier63') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 22 (0x16)
.maxstack 2
.locals init (bool V_0)
IL_0000: ldarg.0
IL_0001: callvirt instance !1 class '<>f__AnonymousTypef`2'<!!TA,!!TB>::get_t()
IL_0006: box !!TB
IL_000b: ldnull
IL_000c: ceq
IL_000e: ldc.i4.0
IL_000f: ceq
IL_0011: stloc.0
IL_0012: br.s IL_0014
IL_0014: ldloc.0
IL_0015: ret
} // end of method QueryExpressions::'<Cast>b__65'
.method private hidebysig static !!TB '<Cast>b__66'<TA,class TB>(class '<>f__AnonymousTypef`2'<!!TA,!!TB> '<>h__TransparentIdentifier63') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 11 (0xb)
.maxstack 1
.locals init (!!TB V_0)
IL_0000: ldarg.0
IL_0001: callvirt instance !1 class '<>f__AnonymousTypef`2'<!!TA,!!TB>::get_t()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method QueryExpressions::'<Cast>b__66'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions } // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions
.class public sequential ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<T>
extends [mscorlib]System.ValueType
{
.field public !T Value
.field public bool HasValue
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult>
Select<T,TResult>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> a,
class [mscorlib]System.Func`2<!!T,!!TResult> fn) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 15 (0xf)
.maxstack 1
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult> V_0,
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult> V_1)
IL_0000: nop
IL_0001: ldloca.s V_1
IL_0003: initobj valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult>
IL_0009: ldloc.1
IL_000a: stloc.0
IL_000b: br.s IL_000d
IL_000d: ldloc.0
IL_000e: ret
} // end of method MaybeExtensions::Select
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T>
Where<T>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> a,
class [mscorlib]System.Func`2<!!T,bool> predicate) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 15 (0xf)
.maxstack 1
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> V_0,
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> V_1)
IL_0000: nop
IL_0001: ldloca.s V_1
IL_0003: initobj valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T>
IL_0009: ldloc.1
IL_000a: stloc.0
IL_000b: br.s IL_000d
IL_000d: ldloc.0
IL_000e: ret
} // end of method MaybeExtensions::Where
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType0`3'<'<Name>j__TPar','<OrderID>j__TPar','<Total>j__TPar'> .class private auto ansi sealed beforefieldinit '<>f__AnonymousType0`3'<'<Name>j__TPar','<OrderID>j__TPar','<Total>j__TPar'>
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
@ -4808,8 +4951,194 @@
} // end of property '<>f__AnonymousTypee`2'::CustCount } // end of property '<>f__AnonymousTypee`2'::CustCount
} // end of class '<>f__AnonymousTypee`2' } // end of class '<>f__AnonymousTypee`2'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousTypef`2'<'<m>j__TPar','<t>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<m>j__TPar' '<m>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<t>j__TPar' '<t>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<m>j__TPar' m,
!'<t>j__TPar' t) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousTypef`2'::.ctor
.method public hidebysig specialname instance !'<m>j__TPar'
get_m() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!'<m>j__TPar' V_0)
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<>f__AnonymousTypef`2'::get_m
.method public hidebysig specialname instance !'<t>j__TPar'
get_t() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!'<t>j__TPar' V_0)
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<>f__AnonymousTypef`2'::get_t
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 89 (0x59)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0,
string V_1)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ m = "
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: ldarg.0
IL_0014: ldfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0019: box !'<m>j__TPar'
IL_001e: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0023: pop
IL_0024: ldloc.0
IL_0025: ldstr ", t = "
IL_002a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_002f: pop
IL_0030: ldloc.0
IL_0031: ldarg.0
IL_0032: ldfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0037: box !'<t>j__TPar'
IL_003c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0041: pop
IL_0042: ldloc.0
IL_0043: ldstr " }"
IL_0048: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_004d: pop
IL_004e: ldloc.0
IL_004f: callvirt instance string [mscorlib]System.Object::ToString()
IL_0054: stloc.1
IL_0055: br.s IL_0057
IL_0057: ldloc.1
IL_0058: ret
} // end of method '<>f__AnonymousTypef`2'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 65 (0x41)
.maxstack 3
.locals init (class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'> V_0,
bool V_1)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_003a
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_003a
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::Equals(!0,
!0)
IL_0038: br.s IL_003b
IL_003a: ldc.i4.0
IL_003b: nop
IL_003c: stloc.1
IL_003d: br.s IL_003f
IL_003f: ldloc.1
IL_0040: ret
} // end of method '<>f__AnonymousTypef`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 62 (0x3e)
.maxstack 3
.locals init (int32 V_0,
int32 V_1)
IL_0000: ldc.i4 0x2244d2b3
IL_0005: stloc.0
IL_0006: ldc.i4 0xa5555529
IL_000b: ldloc.0
IL_000c: mul
IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::get_Default()
IL_0012: ldarg.0
IL_0013: ldfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0018: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::GetHashCode(!0)
IL_001d: add
IL_001e: stloc.0
IL_001f: ldc.i4 0xa5555529
IL_0024: ldloc.0
IL_0025: mul
IL_0026: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::get_Default()
IL_002b: ldarg.0
IL_002c: ldfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0031: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::GetHashCode(!0)
IL_0036: add
IL_0037: stloc.0
IL_0038: ldloc.0
IL_0039: stloc.1
IL_003a: br.s IL_003c
IL_003c: ldloc.1
IL_003d: ret
} // end of method '<>f__AnonymousTypef`2'::GetHashCode
.property instance !'<m>j__TPar' m()
{
.get instance !'<m>j__TPar' '<>f__AnonymousTypef`2'::get_m()
} // end of property '<>f__AnonymousTypef`2'::m
.property instance !'<t>j__TPar' t()
{
.get instance !'<t>j__TPar' '<>f__AnonymousTypef`2'::get_t()
} // end of property '<>f__AnonymousTypef`2'::t
} // end of class '<>f__AnonymousTypef`2'
// ============================================================= // =============================================================
// *********** DISASSEMBLY COMPLETE *********************** // *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\QueryExpressions.res // WARNING: Created Win32 resource file C:\work\ILSpy\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\QueryExpressions.res

284
ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.il

@ -1,5 +1,5 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929 // Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved. // Copyright (c) Microsoft Corporation. All rights reserved.
@ -15,25 +15,26 @@
.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 lt0pgaxw .assembly '2kynotdr'
{ {
.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.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx .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. 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
.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 .permissionset reqmin
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004 .hash algorithm 0x00008004
.ver 0:0:0:0 .ver 0:0:0:0
} }
.module lt0pgaxw.dll .module '2kynotdr.dll'
// MVID: {5B327896-F57D-407B-A721-D34CFB65CA7C} // MVID: {F5A95C54-34B1-4584-A2AF-6C9F06777178}
.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: 0x03000000 // Image base: 0x049E0000
// =============== CLASS MEMBERS DECLARATION =================== // =============== CLASS MEMBERS DECLARATION ===================
@ -792,6 +793,33 @@
IL_0045: ret IL_0045: ret
} // end of method QueryExpressions::Issue437 } // end of method QueryExpressions::Issue437
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TB>
Cast<TA,class TB>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TA> a) cil managed
{
// Code size 53 (0x35)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldnull
IL_0002: ldftn class '<>f__AnonymousTypef`2'<!!0,!!1> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'<Cast>b__64'<!!0,!!1>(!!0)
IL_0008: newobj instance void class [mscorlib]System.Func`2<!!TA,class '<>f__AnonymousTypef`2'<!!TA,!!TB>>::.ctor(object,
native int)
IL_000d: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!1> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Select<!!0,class '<>f__AnonymousTypef`2'<!!0,!!1>>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>)
IL_0012: ldnull
IL_0013: ldftn bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'<Cast>b__65'<!!0,!!1>(class '<>f__AnonymousTypef`2'<!!0,!!1>)
IL_0019: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousTypef`2'<!!TA,!!TB>,bool>::.ctor(object,
native int)
IL_001e: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Where<class '<>f__AnonymousTypef`2'<!!0,!!1>>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,bool>)
IL_0023: ldnull
IL_0024: ldftn !!1 ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions::'<Cast>b__66'<!!0,!!1>(class '<>f__AnonymousTypef`2'<!!0,!!1>)
IL_002a: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousTypef`2'<!!TA,!!TB>,!!TB>::.ctor(object,
native int)
IL_002f: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!1> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Select<class '<>f__AnonymousTypef`2'<!!0,!!1>,!!1>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>)
IL_0034: ret
} // end of method QueryExpressions::Cast
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -1411,8 +1439,90 @@
IL_0001: ret IL_0001: ret
} // end of method QueryExpressions::'<Issue437>b__60' } // end of method QueryExpressions::'<Issue437>b__60'
.method private hidebysig static class '<>f__AnonymousTypef`2'<!!TA,!!TB>
'<Cast>b__64'<TA,class TB>(!!TA m) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 23 (0x17)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.0
IL_0002: box !!TA
IL_0007: isinst !!TB
IL_000c: unbox.any !!TB
IL_0011: newobj instance void class '<>f__AnonymousTypef`2'<!!TA,!!TB>::.ctor(!0,
!1)
IL_0016: ret
} // end of method QueryExpressions::'<Cast>b__64'
.method private hidebysig static bool '<Cast>b__65'<TA,class TB>(class '<>f__AnonymousTypef`2'<!!TA,!!TB> '<>h__TransparentIdentifier63') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 18 (0x12)
.maxstack 8
IL_0000: ldarg.0
IL_0001: callvirt instance !1 class '<>f__AnonymousTypef`2'<!!TA,!!TB>::get_t()
IL_0006: box !!TB
IL_000b: ldnull
IL_000c: ceq
IL_000e: ldc.i4.0
IL_000f: ceq
IL_0011: ret
} // end of method QueryExpressions::'<Cast>b__65'
.method private hidebysig static !!TB '<Cast>b__66'<TA,class TB>(class '<>f__AnonymousTypef`2'<!!TA,!!TB> '<>h__TransparentIdentifier63') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: callvirt instance !1 class '<>f__AnonymousTypef`2'<!!TA,!!TB>::get_t()
IL_0006: ret
} // end of method QueryExpressions::'<Cast>b__66'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions } // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions
.class public sequential ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<T>
extends [mscorlib]System.ValueType
{
.field public !T Value
.field public bool HasValue
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult>
Select<T,TResult>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> a,
class [mscorlib]System.Func`2<!!T,!!TResult> fn) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 1
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult> V_0)
IL_0000: ldloca.s V_0
IL_0002: initobj valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult>
IL_0008: ldloc.0
IL_0009: ret
} // end of method MaybeExtensions::Select
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T>
Where<T>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> a,
class [mscorlib]System.Func`2<!!T,bool> predicate) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 1
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> V_0)
IL_0000: ldloca.s V_0
IL_0002: initobj valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T>
IL_0008: ldloc.0
IL_0009: ret
} // end of method MaybeExtensions::Where
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType0`3'<'<Name>j__TPar','<OrderID>j__TPar','<Total>j__TPar'> .class private auto ansi sealed beforefieldinit '<>f__AnonymousType0`3'<'<Name>j__TPar','<OrderID>j__TPar','<Total>j__TPar'>
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
@ -4013,8 +4123,168 @@
} // end of property '<>f__AnonymousTypee`2'::CustCount } // end of property '<>f__AnonymousTypee`2'::CustCount
} // end of class '<>f__AnonymousTypee`2' } // end of class '<>f__AnonymousTypee`2'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousTypef`2'<'<m>j__TPar','<t>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<m>j__TPar' '<m>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<t>j__TPar' '<t>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<m>j__TPar' m,
!'<t>j__TPar' t) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousTypef`2'::.ctor
.method public hidebysig specialname instance !'<m>j__TPar'
get_m() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousTypef`2'::get_m
.method public hidebysig specialname instance !'<t>j__TPar'
get_t() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousTypef`2'::get_t
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 85 (0x55)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ m = "
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: ldarg.0
IL_0014: ldfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0019: box !'<m>j__TPar'
IL_001e: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0023: pop
IL_0024: ldloc.0
IL_0025: ldstr ", t = "
IL_002a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_002f: pop
IL_0030: ldloc.0
IL_0031: ldarg.0
IL_0032: ldfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0037: box !'<t>j__TPar'
IL_003c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0041: pop
IL_0042: ldloc.0
IL_0043: ldstr " }"
IL_0048: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_004d: pop
IL_004e: ldloc.0
IL_004f: callvirt instance string [mscorlib]System.Object::ToString()
IL_0054: ret
} // end of method '<>f__AnonymousTypef`2'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 59 (0x3b)
.maxstack 3
.locals init (class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0039
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_0039
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::Equals(!0,
!0)
IL_0038: ret
IL_0039: ldc.i4.0
IL_003a: ret
} // end of method '<>f__AnonymousTypef`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 58 (0x3a)
.maxstack 3
.locals init (int32 V_0)
IL_0000: ldc.i4 0x2244d2b3
IL_0005: stloc.0
IL_0006: ldc.i4 0xa5555529
IL_000b: ldloc.0
IL_000c: mul
IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::get_Default()
IL_0012: ldarg.0
IL_0013: ldfld !0 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0018: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::GetHashCode(!0)
IL_001d: add
IL_001e: stloc.0
IL_001f: ldc.i4 0xa5555529
IL_0024: ldloc.0
IL_0025: mul
IL_0026: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::get_Default()
IL_002b: ldarg.0
IL_002c: ldfld !1 class '<>f__AnonymousTypef`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0031: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::GetHashCode(!0)
IL_0036: add
IL_0037: stloc.0
IL_0038: ldloc.0
IL_0039: ret
} // end of method '<>f__AnonymousTypef`2'::GetHashCode
.property instance !'<m>j__TPar' m()
{
.get instance !'<m>j__TPar' '<>f__AnonymousTypef`2'::get_m()
} // end of property '<>f__AnonymousTypef`2'::m
.property instance !'<t>j__TPar' t()
{
.get instance !'<t>j__TPar' '<>f__AnonymousTypef`2'::get_t()
} // end of property '<>f__AnonymousTypef`2'::t
} // end of class '<>f__AnonymousTypef`2'
// ============================================================= // =============================================================
// *********** DISASSEMBLY COMPLETE *********************** // *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\QueryExpressions.opt.res // WARNING: Created Win32 resource file C:\work\ILSpy\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\QueryExpressions.opt.res

387
ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.opt.roslyn.il

@ -1,5 +1,5 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929 // Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved. // Copyright (c) Microsoft Corporation. All rights reserved.
@ -17,6 +17,7 @@
} }
.assembly QueryExpressions .assembly QueryExpressions
{ {
.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.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.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 .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. 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
@ -30,14 +31,14 @@
.ver 0:0:0:0 .ver 0:0:0:0
} }
.module QueryExpressions.dll .module QueryExpressions.dll
// MVID: {3A5F3986-5A3B-4A28-AEB6-FB53EAEF5C5A} // MVID: {EB5BEDE9-696D-429D-B567-B8D95F9E8155}
.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: 0x00AF0000 // Image base: 0x05130000
// =============== CLASS MEMBERS DECLARATION =================== // =============== CLASS MEMBERS DECLARATION ===================
@ -3111,6 +3112,193 @@
} // end of property '<>f__AnonymousType14`2'::CustCount } // end of property '<>f__AnonymousType14`2'::CustCount
} // end of class '<>f__AnonymousType14`2' } // end of class '<>f__AnonymousType14`2'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType15`2'<'<m>j__TPar','<t>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<m>j__TPar' '<m>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<t>j__TPar' '<t>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.method public hidebysig specialname instance !'<m>j__TPar'
get_m() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType15`2'::get_m
.method public hidebysig specialname instance !'<t>j__TPar'
get_t() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType15`2'::get_t
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<m>j__TPar' m,
!'<t>j__TPar' t) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousType15`2'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 59 (0x3b)
.maxstack 3
.locals init (class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0039
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_0039
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::Equals(!0,
!0)
IL_0038: ret
IL_0039: ldc.i4.0
IL_003a: ret
} // end of method '<>f__AnonymousType15`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 52 (0x34)
.maxstack 8
IL_0000: ldc.i4 0x42e31eb
IL_0005: ldc.i4 0xa5555529
IL_000a: mul
IL_000b: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::get_Default()
IL_0010: ldarg.0
IL_0011: ldfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0016: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::GetHashCode(!0)
IL_001b: add
IL_001c: ldc.i4 0xa5555529
IL_0021: mul
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_002d: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::GetHashCode(!0)
IL_0032: add
IL_0033: ret
} // end of method '<>f__AnonymousType15`2'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 136 (0x88)
.maxstack 7
.locals init (!'<m>j__TPar' V_0,
!'<m>j__TPar' V_1,
!'<t>j__TPar' V_2,
!'<t>j__TPar' V_3)
IL_0000: ldnull
IL_0001: ldstr "{{ m = {0}, t = {1} }}"
IL_0006: ldc.i4.2
IL_0007: newarr [mscorlib]System.Object
IL_000c: dup
IL_000d: ldc.i4.0
IL_000e: ldarg.0
IL_000f: ldfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0014: stloc.0
IL_0015: ldloca.s V_0
IL_0017: ldloca.s V_1
IL_0019: initobj !'<m>j__TPar'
IL_001f: ldloc.1
IL_0020: box !'<m>j__TPar'
IL_0025: brtrue.s IL_003b
IL_0027: ldobj !'<m>j__TPar'
IL_002c: stloc.1
IL_002d: ldloca.s V_1
IL_002f: ldloc.1
IL_0030: box !'<m>j__TPar'
IL_0035: brtrue.s IL_003b
IL_0037: pop
IL_0038: ldnull
IL_0039: br.s IL_0046
IL_003b: constrained. !'<m>j__TPar'
IL_0041: callvirt instance string [mscorlib]System.Object::ToString()
IL_0046: stelem.ref
IL_0047: dup
IL_0048: ldc.i4.1
IL_0049: ldarg.0
IL_004a: ldfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_004f: stloc.2
IL_0050: ldloca.s V_2
IL_0052: ldloca.s V_3
IL_0054: initobj !'<t>j__TPar'
IL_005a: ldloc.3
IL_005b: box !'<t>j__TPar'
IL_0060: brtrue.s IL_0076
IL_0062: ldobj !'<t>j__TPar'
IL_0067: stloc.3
IL_0068: ldloca.s V_3
IL_006a: ldloc.3
IL_006b: box !'<t>j__TPar'
IL_0070: brtrue.s IL_0076
IL_0072: pop
IL_0073: ldnull
IL_0074: br.s IL_0081
IL_0076: constrained. !'<t>j__TPar'
IL_007c: callvirt instance string [mscorlib]System.Object::ToString()
IL_0081: stelem.ref
IL_0082: call string [mscorlib]System.String::Format(class [mscorlib]System.IFormatProvider,
string,
object[])
IL_0087: ret
} // end of method '<>f__AnonymousType15`2'::ToString
.property instance !'<m>j__TPar' m()
{
.get instance !'<m>j__TPar' '<>f__AnonymousType15`2'::get_m()
} // end of property '<>f__AnonymousType15`2'::m
.property instance !'<t>j__TPar' t()
{
.get instance !'<t>j__TPar' '<>f__AnonymousType15`2'::get_t()
} // end of property '<>f__AnonymousType15`2'::t
} // end of class '<>f__AnonymousType15`2'
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions .class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
@ -3195,10 +3383,10 @@
.field public static class [mscorlib]System.Func`3<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>> '<>9__9_3' .field public static class [mscorlib]System.Func`3<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>> '<>9__9_3'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,class '<>f__AnonymousType4`2'<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,valuetype [mscorlib]System.Decimal>> '<>9__9_4' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,class '<>f__AnonymousType4`2'<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,valuetype [mscorlib]System.Decimal>> '<>9__9_4'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType4`2'<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType5`3'<string,int32,valuetype [mscorlib]System.Decimal>> '<>9__9_5' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType4`2'<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType5`3'<string,int32,valuetype [mscorlib]System.Decimal>> '<>9__9_5'
.field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> '<>9__10_1' .field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> '<>9__10_3'
.field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>> '<>9__10_0' .field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>> '<>9__10_0'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> '<>9__10_2' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> '<>9__10_1'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> '<>9__10_3' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> '<>9__10_2'
.field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>> '<>9__11_0' .field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>> '<>9__11_0'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,class '<>f__AnonymousType9`2'<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,string>> '<>9__11_1' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,class '<>f__AnonymousType9`2'<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,string>> '<>9__11_1'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType9`2'<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,string>,string> '<>9__11_2' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType9`2'<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,string>,string> '<>9__11_2'
@ -3500,17 +3688,17 @@
IL_0000: ldarg.1 IL_0000: ldarg.1
IL_0001: ldarg.1 IL_0001: ldarg.1
IL_0002: ldfld class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order::Details IL_0002: ldfld class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order::Details
IL_0007: ldsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_1' IL_0007: ldsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_3'
IL_000c: dup IL_000c: dup
IL_000d: brtrue.s IL_0026 IL_000d: brtrue.s IL_0026
IL_000f: pop IL_000f: pop
IL_0010: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' IL_0010: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9'
IL_0015: ldftn instance valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_1'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail) IL_0015: ldftn instance valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_3'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail)
IL_001b: newobj instance void class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal>::.ctor(object, IL_001b: newobj instance void class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal>::.ctor(object,
native int) native int)
IL_0020: dup IL_0020: dup
IL_0021: stsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_1' IL_0021: stsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_3'
IL_0026: call valuetype [mscorlib]System.Decimal [System.Core]System.Linq.Enumerable::Sum<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>, IL_0026: call valuetype [mscorlib]System.Decimal [System.Core]System.Linq.Enumerable::Sum<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
class [mscorlib]System.Func`2<!!0,valuetype [mscorlib]System.Decimal>) class [mscorlib]System.Func`2<!!0,valuetype [mscorlib]System.Decimal>)
IL_002b: newobj instance void class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>::.ctor(!0, IL_002b: newobj instance void class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>::.ctor(!0,
@ -3519,7 +3707,7 @@
} // end of method '<>c'::'<FromLetWhereSelect>b__10_0' } // end of method '<>c'::'<FromLetWhereSelect>b__10_0'
.method assembly hidebysig instance valuetype [mscorlib]System.Decimal .method assembly hidebysig instance valuetype [mscorlib]System.Decimal
'<FromLetWhereSelect>b__10_1'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail d) cil managed '<FromLetWhereSelect>b__10_3'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail d) cil managed
{ {
// Code size 23 (0x17) // Code size 23 (0x17)
.maxstack 8 .maxstack 8
@ -3531,10 +3719,10 @@
IL_0011: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::op_Multiply(valuetype [mscorlib]System.Decimal, IL_0011: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::op_Multiply(valuetype [mscorlib]System.Decimal,
valuetype [mscorlib]System.Decimal) valuetype [mscorlib]System.Decimal)
IL_0016: ret IL_0016: ret
} // end of method '<>c'::'<FromLetWhereSelect>b__10_1' } // end of method '<>c'::'<FromLetWhereSelect>b__10_3'
.method assembly hidebysig instance bool .method assembly hidebysig instance bool
'<FromLetWhereSelect>b__10_2'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal> '<>h__TransparentIdentifier0') cil managed '<FromLetWhereSelect>b__10_1'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal> '<>h__TransparentIdentifier0') cil managed
{ {
// Code size 22 (0x16) // Code size 22 (0x16)
.maxstack 8 .maxstack 8
@ -3545,10 +3733,10 @@
IL_0010: call bool [mscorlib]System.Decimal::op_GreaterThanOrEqual(valuetype [mscorlib]System.Decimal, IL_0010: call bool [mscorlib]System.Decimal::op_GreaterThanOrEqual(valuetype [mscorlib]System.Decimal,
valuetype [mscorlib]System.Decimal) valuetype [mscorlib]System.Decimal)
IL_0015: ret IL_0015: ret
} // end of method '<>c'::'<FromLetWhereSelect>b__10_2' } // end of method '<>c'::'<FromLetWhereSelect>b__10_1'
.method assembly hidebysig instance class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal> .method assembly hidebysig instance class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>
'<FromLetWhereSelect>b__10_3'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal> '<>h__TransparentIdentifier0') cil managed '<FromLetWhereSelect>b__10_2'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal> '<>h__TransparentIdentifier0') cil managed
{ {
// Code size 23 (0x17) // Code size 23 (0x17)
.maxstack 8 .maxstack 8
@ -3560,7 +3748,7 @@
IL_0011: newobj instance void class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>::.ctor(!0, IL_0011: newobj instance void class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>::.ctor(!0,
!1) !1)
IL_0016: ret IL_0016: ret
} // end of method '<>c'::'<FromLetWhereSelect>b__10_3' } // end of method '<>c'::'<FromLetWhereSelect>b__10_2'
.method assembly hidebysig instance class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string> .method assembly hidebysig instance class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>
'<MultipleLet>b__11_0'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer a) cil managed '<MultipleLet>b__11_0'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer a) cil managed
@ -3817,6 +4005,74 @@
} // end of class '<>c' } // end of class '<>c'
.class auto ansi serializable sealed nested private beforefieldinit '<>c__19`2'<TA,class TB>
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__19`2'<!TA,!TB> '<>9'
.field public static class [mscorlib]System.Func`2<!TA,class '<>f__AnonymousType15`2'<!TA,!TB>> '<>9__19_0'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!TA,!TB>,bool> '<>9__19_1'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!TA,!TB>,!TB> '<>9__19_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__19`2'<!TA,!TB>::.ctor()
IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!0,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!TA,!TB>::'<>9'
IL_000a: ret
} // end of method '<>c__19`2'::.cctor
.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__19`2'::.ctor
.method assembly hidebysig instance class '<>f__AnonymousType15`2'<!TA,!TB>
'<Cast>b__19_0'(!TA m) cil managed
{
// Code size 23 (0x17)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldarg.1
IL_0002: box !TA
IL_0007: isinst !TB
IL_000c: unbox.any !TB
IL_0011: newobj instance void class '<>f__AnonymousType15`2'<!TA,!TB>::.ctor(!0,
!1)
IL_0016: ret
} // end of method '<>c__19`2'::'<Cast>b__19_0'
.method assembly hidebysig instance bool
'<Cast>b__19_1'(class '<>f__AnonymousType15`2'<!TA,!TB> '<>h__TransparentIdentifier0') cil managed
{
// Code size 15 (0xf)
.maxstack 8
IL_0000: ldarg.1
IL_0001: callvirt instance !1 class '<>f__AnonymousType15`2'<!TA,!TB>::get_t()
IL_0006: box !TB
IL_000b: ldnull
IL_000c: cgt.un
IL_000e: ret
} // end of method '<>c__19`2'::'<Cast>b__19_1'
.method assembly hidebysig instance !TB
'<Cast>b__19_2'(class '<>f__AnonymousType15`2'<!TA,!TB> '<>h__TransparentIdentifier0') cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.1
IL_0001: callvirt instance !1 class '<>f__AnonymousType15`2'<!TA,!TB>::get_t()
IL_0006: ret
} // end of method '<>c__19`2'::'<Cast>b__19_2'
} // end of class '<>c__19`2'
.field public class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer> customers .field public class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer> customers
.field public class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order> orders .field public class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order> orders
.method public hidebysig instance object .method public hidebysig instance object
@ -4123,30 +4379,30 @@
IL_0020: stsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_0' IL_0020: stsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_0'
IL_0025: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!1> [System.Core]System.Linq.Enumerable::Select<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>, IL_0025: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!1> [System.Core]System.Linq.Enumerable::Select<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>) class [mscorlib]System.Func`2<!!0,!!1>)
IL_002a: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_2' IL_002a: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_1'
IL_002f: dup IL_002f: dup
IL_0030: brtrue.s IL_0049 IL_0030: brtrue.s IL_0049
IL_0032: pop IL_0032: pop
IL_0033: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' IL_0033: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9'
IL_0038: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_2'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>) IL_0038: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_1'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>)
IL_003e: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool>::.ctor(object, IL_003e: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool>::.ctor(object,
native int) native int)
IL_0043: dup IL_0043: dup
IL_0044: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_2' IL_0044: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_1'
IL_0049: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Where<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>, IL_0049: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Where<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
class [mscorlib]System.Func`2<!!0,bool>) class [mscorlib]System.Func`2<!!0,bool>)
IL_004e: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_3' IL_004e: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_2'
IL_0053: dup IL_0053: dup
IL_0054: brtrue.s IL_006d IL_0054: brtrue.s IL_006d
IL_0056: pop IL_0056: pop
IL_0057: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' IL_0057: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9'
IL_005c: ldftn instance class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_3'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>) IL_005c: ldftn instance class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_2'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>)
IL_0062: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>>::.ctor(object, IL_0062: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>>::.ctor(object,
native int) native int)
IL_0067: dup IL_0067: dup
IL_0068: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_3' IL_0068: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_2'
IL_006d: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!1> [System.Core]System.Linq.Enumerable::Select<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>, IL_006d: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!1> [System.Core]System.Linq.Enumerable::Select<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>) class [mscorlib]System.Func`2<!!0,!!1>)
IL_0072: ret IL_0072: ret
@ -4508,6 +4764,54 @@
IL_0049: ret IL_0049: ret
} // end of method QueryExpressions::Issue437 } // end of method QueryExpressions::Issue437
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TB>
Cast<TA,class TB>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TA> a) cil managed
{
// Code size 110 (0x6e)
.maxstack 3
IL_0000: ldarg.0
IL_0001: ldsfld class [mscorlib]System.Func`2<!0,class '<>f__AnonymousType15`2'<!0,!1>> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_0'
IL_0006: dup
IL_0007: brtrue.s IL_0020
IL_0009: pop
IL_000a: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!0,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9'
IL_000f: ldftn instance class '<>f__AnonymousType15`2'<!0,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<Cast>b__19_0'(!0)
IL_0015: newobj instance void class [mscorlib]System.Func`2<!!TA,class '<>f__AnonymousType15`2'<!!TA,!!TB>>::.ctor(object,
native int)
IL_001a: dup
IL_001b: stsfld class [mscorlib]System.Func`2<!0,class '<>f__AnonymousType15`2'<!0,!1>> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_0'
IL_0020: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!1> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Select<!!0,class '<>f__AnonymousType15`2'<!!0,!!1>>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>)
IL_0025: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!0,!1>,bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_1'
IL_002a: dup
IL_002b: brtrue.s IL_0044
IL_002d: pop
IL_002e: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!0,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9'
IL_0033: ldftn instance bool class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<Cast>b__19_1'(class '<>f__AnonymousType15`2'<!0,!1>)
IL_0039: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!!TA,!!TB>,bool>::.ctor(object,
native int)
IL_003e: dup
IL_003f: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!0,!1>,bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_1'
IL_0044: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Where<class '<>f__AnonymousType15`2'<!!0,!!1>>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,bool>)
IL_0049: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!0,!1>,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_2'
IL_004e: dup
IL_004f: brtrue.s IL_0068
IL_0051: pop
IL_0052: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!0,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9'
IL_0057: ldftn instance !1 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<Cast>b__19_2'(class '<>f__AnonymousType15`2'<!0,!1>)
IL_005d: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!!TA,!!TB>,!!TB>::.ctor(object,
native int)
IL_0062: dup
IL_0063: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!0,!1>,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_2'
IL_0068: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!1> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Select<class '<>f__AnonymousType15`2'<!!0,!!1>,!!1>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>)
IL_006d: ret
} // end of method QueryExpressions::Cast
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -4520,6 +4824,47 @@
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions } // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions
.class public sequential ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<T>
extends [mscorlib]System.ValueType
{
.field public !T Value
.field public bool HasValue
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult>
Select<T,TResult>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> a,
class [mscorlib]System.Func`2<!!T,!!TResult> fn) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 1
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult> V_0)
IL_0000: ldloca.s V_0
IL_0002: initobj valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult>
IL_0008: ldloc.0
IL_0009: ret
} // end of method MaybeExtensions::Select
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T>
Where<T>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> a,
class [mscorlib]System.Func`2<!!T,bool> predicate) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 1
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> V_0)
IL_0000: ldloca.s V_0
IL_0002: initobj valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T>
IL_0008: ldloc.0
IL_0009: ret
} // end of method MaybeExtensions::Where
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions
// ============================================================= // =============================================================

410
ICSharpCode.Decompiler.Tests/TestCases/Pretty/QueryExpressions.roslyn.il

@ -1,5 +1,5 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929 // Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved. // Copyright (c) Microsoft Corporation. All rights reserved.
@ -17,6 +17,7 @@
} }
.assembly QueryExpressions .assembly QueryExpressions
{ {
.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.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.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 .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. 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
@ -30,14 +31,14 @@
.ver 0:0:0:0 .ver 0:0:0:0
} }
.module QueryExpressions.dll .module QueryExpressions.dll
// MVID: {38FA88A1-A1FA-45E9-87D6-D5C50B7535C2} // MVID: {35C85D69-E31F-42BF-9A00-868A7795799A}
.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: 0x029D0000 // Image base: 0x04B30000
// =============== CLASS MEMBERS DECLARATION =================== // =============== CLASS MEMBERS DECLARATION ===================
@ -3193,6 +3194,197 @@
} // end of property '<>f__AnonymousType14`2'::CustCount } // end of property '<>f__AnonymousType14`2'::CustCount
} // end of class '<>f__AnonymousType14`2' } // end of class '<>f__AnonymousType14`2'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType15`2'<'<m>j__TPar','<t>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 5C 7B 20 6D 20 3D 20 7B 6D 7D 2C 20 74 // ...\{ m = {m}, t
20 3D 20 7B 74 7D 20 7D 01 00 54 0E 04 54 79 70 // = {t} }..T..Typ
65 10 3C 41 6E 6F 6E 79 6D 6F 75 73 20 54 79 70 // e.<Anonymous Typ
65 3E ) // e>
.field private initonly !'<m>j__TPar' '<m>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<t>j__TPar' '<t>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.method public hidebysig specialname instance !'<m>j__TPar'
get_m() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType15`2'::get_m
.method public hidebysig specialname instance !'<t>j__TPar'
get_t() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType15`2'::get_t
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<m>j__TPar' m,
!'<t>j__TPar' t) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousType15`2'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 60 (0x3c)
.maxstack 3
.locals init (class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_003a
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_003a
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::Equals(!0,
!0)
IL_0038: br.s IL_003b
IL_003a: ldc.i4.0
IL_003b: ret
} // end of method '<>f__AnonymousType15`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 52 (0x34)
.maxstack 8
IL_0000: ldc.i4 0x42e31eb
IL_0005: ldc.i4 0xa5555529
IL_000a: mul
IL_000b: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::get_Default()
IL_0010: ldarg.0
IL_0011: ldfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0016: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<m>j__TPar'>::GetHashCode(!0)
IL_001b: add
IL_001c: ldc.i4 0xa5555529
IL_0021: mul
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_002d: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<t>j__TPar'>::GetHashCode(!0)
IL_0032: add
IL_0033: ret
} // end of method '<>f__AnonymousType15`2'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 136 (0x88)
.maxstack 7
.locals init (!'<m>j__TPar' V_0,
!'<m>j__TPar' V_1,
!'<t>j__TPar' V_2,
!'<t>j__TPar' V_3)
IL_0000: ldnull
IL_0001: ldstr "{{ m = {0}, t = {1} }}"
IL_0006: ldc.i4.2
IL_0007: newarr [mscorlib]System.Object
IL_000c: dup
IL_000d: ldc.i4.0
IL_000e: ldarg.0
IL_000f: ldfld !0 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<m>i__Field'
IL_0014: stloc.0
IL_0015: ldloca.s V_0
IL_0017: ldloca.s V_1
IL_0019: initobj !'<m>j__TPar'
IL_001f: ldloc.1
IL_0020: box !'<m>j__TPar'
IL_0025: brtrue.s IL_003b
IL_0027: ldobj !'<m>j__TPar'
IL_002c: stloc.1
IL_002d: ldloca.s V_1
IL_002f: ldloc.1
IL_0030: box !'<m>j__TPar'
IL_0035: brtrue.s IL_003b
IL_0037: pop
IL_0038: ldnull
IL_0039: br.s IL_0046
IL_003b: constrained. !'<m>j__TPar'
IL_0041: callvirt instance string [mscorlib]System.Object::ToString()
IL_0046: stelem.ref
IL_0047: dup
IL_0048: ldc.i4.1
IL_0049: ldarg.0
IL_004a: ldfld !1 class '<>f__AnonymousType15`2'<!'<m>j__TPar',!'<t>j__TPar'>::'<t>i__Field'
IL_004f: stloc.2
IL_0050: ldloca.s V_2
IL_0052: ldloca.s V_3
IL_0054: initobj !'<t>j__TPar'
IL_005a: ldloc.3
IL_005b: box !'<t>j__TPar'
IL_0060: brtrue.s IL_0076
IL_0062: ldobj !'<t>j__TPar'
IL_0067: stloc.3
IL_0068: ldloca.s V_3
IL_006a: ldloc.3
IL_006b: box !'<t>j__TPar'
IL_0070: brtrue.s IL_0076
IL_0072: pop
IL_0073: ldnull
IL_0074: br.s IL_0081
IL_0076: constrained. !'<t>j__TPar'
IL_007c: callvirt instance string [mscorlib]System.Object::ToString()
IL_0081: stelem.ref
IL_0082: call string [mscorlib]System.String::Format(class [mscorlib]System.IFormatProvider,
string,
object[])
IL_0087: ret
} // end of method '<>f__AnonymousType15`2'::ToString
.property instance !'<m>j__TPar' m()
{
.get instance !'<m>j__TPar' '<>f__AnonymousType15`2'::get_m()
} // end of property '<>f__AnonymousType15`2'::m
.property instance !'<t>j__TPar' t()
{
.get instance !'<t>j__TPar' '<>f__AnonymousType15`2'::get_t()
} // end of property '<>f__AnonymousType15`2'::t
} // end of class '<>f__AnonymousType15`2'
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions .class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
@ -3280,10 +3472,10 @@
.field public static class [mscorlib]System.Func`3<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>> '<>9__9_3' .field public static class [mscorlib]System.Func`3<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>> '<>9__9_3'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,class '<>f__AnonymousType4`2'<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,valuetype [mscorlib]System.Decimal>> '<>9__9_4' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,class '<>f__AnonymousType4`2'<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,valuetype [mscorlib]System.Decimal>> '<>9__9_4'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType4`2'<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType5`3'<string,int32,valuetype [mscorlib]System.Decimal>> '<>9__9_5' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType4`2'<class '<>f__AnonymousType3`2'<class '<>f__AnonymousType1`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order>,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType5`3'<string,int32,valuetype [mscorlib]System.Decimal>> '<>9__9_5'
.field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> '<>9__10_1' .field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> '<>9__10_3'
.field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>> '<>9__10_0' .field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>> '<>9__10_0'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> '<>9__10_2' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> '<>9__10_1'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> '<>9__10_3' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> '<>9__10_2'
.field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>> '<>9__11_0' .field public static class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>> '<>9__11_0'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,class '<>f__AnonymousType9`2'<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,string>> '<>9__11_1' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,class '<>f__AnonymousType9`2'<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,string>> '<>9__11_1'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType9`2'<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,string>,string> '<>9__11_2' .field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType9`2'<class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>,string>,string> '<>9__11_2'
@ -3586,17 +3778,17 @@
IL_0000: ldarg.1 IL_0000: ldarg.1
IL_0001: ldarg.1 IL_0001: ldarg.1
IL_0002: ldfld class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order::Details IL_0002: ldfld class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order::Details
IL_0007: ldsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_1' IL_0007: ldsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_3'
IL_000c: dup IL_000c: dup
IL_000d: brtrue.s IL_0026 IL_000d: brtrue.s IL_0026
IL_000f: pop IL_000f: pop
IL_0010: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' IL_0010: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9'
IL_0015: ldftn instance valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_1'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail) IL_0015: ldftn instance valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_3'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail)
IL_001b: newobj instance void class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal>::.ctor(object, IL_001b: newobj instance void class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal>::.ctor(object,
native int) native int)
IL_0020: dup IL_0020: dup
IL_0021: stsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_1' IL_0021: stsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_3'
IL_0026: call valuetype [mscorlib]System.Decimal [System.Core]System.Linq.Enumerable::Sum<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>, IL_0026: call valuetype [mscorlib]System.Decimal [System.Core]System.Linq.Enumerable::Sum<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
class [mscorlib]System.Func`2<!!0,valuetype [mscorlib]System.Decimal>) class [mscorlib]System.Func`2<!!0,valuetype [mscorlib]System.Decimal>)
IL_002b: newobj instance void class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>::.ctor(!0, IL_002b: newobj instance void class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>::.ctor(!0,
@ -3605,7 +3797,7 @@
} // end of method '<>c'::'<FromLetWhereSelect>b__10_0' } // end of method '<>c'::'<FromLetWhereSelect>b__10_0'
.method assembly hidebysig instance valuetype [mscorlib]System.Decimal .method assembly hidebysig instance valuetype [mscorlib]System.Decimal
'<FromLetWhereSelect>b__10_1'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail d) cil managed '<FromLetWhereSelect>b__10_3'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/OrderDetail d) cil managed
{ {
// Code size 23 (0x17) // Code size 23 (0x17)
.maxstack 8 .maxstack 8
@ -3617,10 +3809,10 @@
IL_0011: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::op_Multiply(valuetype [mscorlib]System.Decimal, IL_0011: call valuetype [mscorlib]System.Decimal [mscorlib]System.Decimal::op_Multiply(valuetype [mscorlib]System.Decimal,
valuetype [mscorlib]System.Decimal) valuetype [mscorlib]System.Decimal)
IL_0016: ret IL_0016: ret
} // end of method '<>c'::'<FromLetWhereSelect>b__10_1' } // end of method '<>c'::'<FromLetWhereSelect>b__10_3'
.method assembly hidebysig instance bool .method assembly hidebysig instance bool
'<FromLetWhereSelect>b__10_2'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal> '<>h__TransparentIdentifier0') cil managed '<FromLetWhereSelect>b__10_1'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal> '<>h__TransparentIdentifier0') cil managed
{ {
// Code size 22 (0x16) // Code size 22 (0x16)
.maxstack 8 .maxstack 8
@ -3631,10 +3823,10 @@
IL_0010: call bool [mscorlib]System.Decimal::op_GreaterThanOrEqual(valuetype [mscorlib]System.Decimal, IL_0010: call bool [mscorlib]System.Decimal::op_GreaterThanOrEqual(valuetype [mscorlib]System.Decimal,
valuetype [mscorlib]System.Decimal) valuetype [mscorlib]System.Decimal)
IL_0015: ret IL_0015: ret
} // end of method '<>c'::'<FromLetWhereSelect>b__10_2' } // end of method '<>c'::'<FromLetWhereSelect>b__10_1'
.method assembly hidebysig instance class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal> .method assembly hidebysig instance class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>
'<FromLetWhereSelect>b__10_3'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal> '<>h__TransparentIdentifier0') cil managed '<FromLetWhereSelect>b__10_2'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal> '<>h__TransparentIdentifier0') cil managed
{ {
// Code size 23 (0x17) // Code size 23 (0x17)
.maxstack 8 .maxstack 8
@ -3646,7 +3838,7 @@
IL_0011: newobj instance void class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>::.ctor(!0, IL_0011: newobj instance void class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>::.ctor(!0,
!1) !1)
IL_0016: ret IL_0016: ret
} // end of method '<>c'::'<FromLetWhereSelect>b__10_3' } // end of method '<>c'::'<FromLetWhereSelect>b__10_2'
.method assembly hidebysig instance class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string> .method assembly hidebysig instance class '<>f__AnonymousType8`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer,string>
'<MultipleLet>b__11_0'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer a) cil managed '<MultipleLet>b__11_0'(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer a) cil managed
@ -3903,6 +4095,75 @@
} // end of class '<>c' } // end of class '<>c'
.class auto ansi serializable sealed nested private beforefieldinit '<>c__19`2'<TA,class TB>
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__19`2'<!TA,!TB> '<>9'
.field public static class [mscorlib]System.Func`2<!TA,class '<>f__AnonymousType15`2'<!TA,!TB>> '<>9__19_0'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!TA,!TB>,bool> '<>9__19_1'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!TA,!TB>,!TB> '<>9__19_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__19`2'<!TA,!TB>::.ctor()
IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!0,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!TA,!TB>::'<>9'
IL_000a: ret
} // end of method '<>c__19`2'::.cctor
.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__19`2'::.ctor
.method assembly hidebysig instance class '<>f__AnonymousType15`2'<!TA,!TB>
'<Cast>b__19_0'(!TA m) cil managed
{
// Code size 23 (0x17)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldarg.1
IL_0002: box !TA
IL_0007: isinst !TB
IL_000c: unbox.any !TB
IL_0011: newobj instance void class '<>f__AnonymousType15`2'<!TA,!TB>::.ctor(!0,
!1)
IL_0016: ret
} // end of method '<>c__19`2'::'<Cast>b__19_0'
.method assembly hidebysig instance bool
'<Cast>b__19_1'(class '<>f__AnonymousType15`2'<!TA,!TB> '<>h__TransparentIdentifier0') cil managed
{
// Code size 15 (0xf)
.maxstack 8
IL_0000: ldarg.1
IL_0001: callvirt instance !1 class '<>f__AnonymousType15`2'<!TA,!TB>::get_t()
IL_0006: box !TB
IL_000b: ldnull
IL_000c: cgt.un
IL_000e: ret
} // end of method '<>c__19`2'::'<Cast>b__19_1'
.method assembly hidebysig instance !TB
'<Cast>b__19_2'(class '<>f__AnonymousType15`2'<!TA,!TB> '<>h__TransparentIdentifier0') cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.1
IL_0001: callvirt instance !1 class '<>f__AnonymousType15`2'<!TA,!TB>::get_t()
IL_0006: ret
} // end of method '<>c__19`2'::'<Cast>b__19_2'
} // end of class '<>c__19`2'
.field public class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer> customers .field public class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Customer> customers
.field public class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order> orders .field public class [mscorlib]System.Collections.Generic.IEnumerable`1<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order> orders
.method public hidebysig instance object .method public hidebysig instance object
@ -4241,30 +4502,30 @@
IL_0021: stsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_0' IL_0021: stsfld class [mscorlib]System.Func`2<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_0'
IL_0026: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!1> [System.Core]System.Linq.Enumerable::Select<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>, IL_0026: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!1> [System.Core]System.Linq.Enumerable::Select<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>) class [mscorlib]System.Func`2<!!0,!!1>)
IL_002b: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_2' IL_002b: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_1'
IL_0030: dup IL_0030: dup
IL_0031: brtrue.s IL_004a IL_0031: brtrue.s IL_004a
IL_0033: pop IL_0033: pop
IL_0034: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' IL_0034: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9'
IL_0039: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_2'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>) IL_0039: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_1'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>)
IL_003f: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool>::.ctor(object, IL_003f: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool>::.ctor(object,
native int) native int)
IL_0044: dup IL_0044: dup
IL_0045: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_2' IL_0045: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_1'
IL_004a: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Where<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>, IL_004a: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Where<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
class [mscorlib]System.Func`2<!!0,bool>) class [mscorlib]System.Func`2<!!0,bool>)
IL_004f: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_3' IL_004f: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_2'
IL_0054: dup IL_0054: dup
IL_0055: brtrue.s IL_006e IL_0055: brtrue.s IL_006e
IL_0057: pop IL_0057: pop
IL_0058: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9' IL_0058: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9'
IL_005d: ldftn instance class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_3'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>) IL_005d: ldftn instance class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<FromLetWhereSelect>b__10_2'(class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>)
IL_0063: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>>::.ctor(object, IL_0063: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>>::.ctor(object,
native int) native int)
IL_0068: dup IL_0068: dup
IL_0069: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_3' IL_0069: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c'::'<>9__10_2'
IL_006e: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!1> [System.Core]System.Linq.Enumerable::Select<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>, IL_006e: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!1> [System.Core]System.Linq.Enumerable::Select<class '<>f__AnonymousType6`2'<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/Order,valuetype [mscorlib]System.Decimal>,class '<>f__AnonymousType7`2'<int32,valuetype [mscorlib]System.Decimal>>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>) class [mscorlib]System.Func`2<!!0,!!1>)
IL_0073: stloc.0 IL_0073: stloc.0
@ -4678,6 +4939,60 @@
IL_004e: ret IL_004e: ret
} // end of method QueryExpressions::Issue437 } // end of method QueryExpressions::Issue437
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TB>
Cast<TA,class TB>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TA> a) cil managed
{
// Code size 115 (0x73)
.maxstack 3
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TB> V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldsfld class [mscorlib]System.Func`2<!0,class '<>f__AnonymousType15`2'<!0,!1>> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_0'
IL_0007: dup
IL_0008: brtrue.s IL_0021
IL_000a: pop
IL_000b: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!0,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9'
IL_0010: ldftn instance class '<>f__AnonymousType15`2'<!0,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<Cast>b__19_0'(!0)
IL_0016: newobj instance void class [mscorlib]System.Func`2<!!TA,class '<>f__AnonymousType15`2'<!!TA,!!TB>>::.ctor(object,
native int)
IL_001b: dup
IL_001c: stsfld class [mscorlib]System.Func`2<!0,class '<>f__AnonymousType15`2'<!0,!1>> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_0'
IL_0021: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!1> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Select<!!0,class '<>f__AnonymousType15`2'<!!0,!!1>>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>)
IL_0026: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!0,!1>,bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_1'
IL_002b: dup
IL_002c: brtrue.s IL_0045
IL_002e: pop
IL_002f: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!0,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9'
IL_0034: ldftn instance bool class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<Cast>b__19_1'(class '<>f__AnonymousType15`2'<!0,!1>)
IL_003a: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!!TA,!!TB>,bool>::.ctor(object,
native int)
IL_003f: dup
IL_0040: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!0,!1>,bool> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_1'
IL_0045: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Where<class '<>f__AnonymousType15`2'<!!0,!!1>>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,bool>)
IL_004a: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!0,!1>,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_2'
IL_004f: dup
IL_0050: brtrue.s IL_0069
IL_0052: pop
IL_0053: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!0,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9'
IL_0058: ldftn instance !1 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<Cast>b__19_2'(class '<>f__AnonymousType15`2'<!0,!1>)
IL_005e: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!!TA,!!TB>,!!TB>::.ctor(object,
native int)
IL_0063: dup
IL_0064: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType15`2'<!0,!1>,!1> class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions/'<>c__19`2'<!!TA,!!TB>::'<>9__19_2'
IL_0069: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!1> ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions::Select<class '<>f__AnonymousType15`2'<!!0,!!1>,!!1>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!0>,
class [mscorlib]System.Func`2<!!0,!!1>)
IL_006e: stloc.0
IL_006f: br.s IL_0071
IL_0071: ldloc.0
IL_0072: ret
} // end of method QueryExpressions::Cast
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -4691,6 +5006,59 @@
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions } // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.QueryExpressions
.class public sequential ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<T>
extends [mscorlib]System.ValueType
{
.field public !T Value
.field public bool HasValue
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult>
Select<T,TResult>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> a,
class [mscorlib]System.Func`2<!!T,!!TResult> fn) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 15 (0xf)
.maxstack 1
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult> V_0,
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult> V_1)
IL_0000: nop
IL_0001: ldloca.s V_0
IL_0003: initobj valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!TResult>
IL_0009: ldloc.0
IL_000a: stloc.1
IL_000b: br.s IL_000d
IL_000d: ldloc.1
IL_000e: ret
} // end of method MaybeExtensions::Select
.method public hidebysig static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T>
Where<T>(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> a,
class [mscorlib]System.Func`2<!!T,bool> predicate) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 15 (0xf)
.maxstack 1
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> V_0,
valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T> V_1)
IL_0000: nop
IL_0001: ldloca.s V_0
IL_0003: initobj valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.Maybe`1<!!T>
IL_0009: ldloc.0
IL_000a: stloc.1
IL_000b: br.s IL_000d
IL_000d: ldloc.1
IL_000e: ret
} // end of method MaybeExtensions::Where
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.MaybeExtensions
// ============================================================= // =============================================================

4
ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs

@ -1393,8 +1393,8 @@ namespace ICSharpCode.Decompiler.CSharp
ame.IsAsync = function.IsAsync; ame.IsAsync = function.IsAsync;
ame.Parameters.AddRange(MakeParameters(function.Parameters, function)); ame.Parameters.AddRange(MakeParameters(function.Parameters, function));
ame.HasParameterList = ame.Parameters.Count > 0; ame.HasParameterList = ame.Parameters.Count > 0;
var context = method == null ? decompilationContext : new SimpleTypeResolveContext(method); var targetTS = method == null ? typeSystem : typeSystem.GetSpecializingTypeSystem(method.Substitution);
StatementBuilder builder = new StatementBuilder(typeSystem.GetSpecializingTypeSystem(context), this.decompilationContext, function, settings, cancellationToken); StatementBuilder builder = new StatementBuilder(targetTS, this.decompilationContext, function, settings, cancellationToken);
var body = builder.ConvertAsBlock(function.Body); var body = builder.ConvertAsBlock(function.Body);
Comment prev = null; Comment prev = null;

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

@ -137,7 +137,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
if (IsAnonymousMethod(decompilationContext.CurrentTypeDefinition, targetMethod)) { if (IsAnonymousMethod(decompilationContext.CurrentTypeDefinition, targetMethod)) {
target = value.Arguments[0]; target = value.Arguments[0];
var methodDefinition = (Mono.Cecil.MethodDefinition)context.TypeSystem.GetCecil(targetMethod); var methodDefinition = (Mono.Cecil.MethodDefinition)context.TypeSystem.GetCecil(targetMethod);
var localTypeSystem = context.TypeSystem.GetSpecializingTypeSystem(new SimpleTypeResolveContext(targetMethod)); var localTypeSystem = context.TypeSystem.GetSpecializingTypeSystem(targetMethod.Substitution);
var ilReader = new ILReader(localTypeSystem); var ilReader = new ILReader(localTypeSystem);
ilReader.UseDebugSymbols = context.Settings.UseDebugSymbols; ilReader.UseDebugSymbols = context.Settings.UseDebugSymbols;
var function = ilReader.ReadIL(methodDefinition.Body, context.CancellationToken); var function = ilReader.ReadIL(methodDefinition.Body, context.CancellationToken);

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

@ -17,7 +17,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
if (methodDef != null && methodDef.Body != null) { if (methodDef != null && methodDef.Body != null) {
if (inst.Method.IsCompilerGeneratedOrIsInCompilerGeneratedClass()) { if (inst.Method.IsCompilerGeneratedOrIsInCompilerGeneratedClass()) {
// partially copied from CSharpDecompiler // partially copied from CSharpDecompiler
var specializingTypeSystem = this.context.TypeSystem.GetSpecializingTypeSystem(this.context.TypeSystem.Compilation.TypeResolveContext); var specializingTypeSystem = this.context.TypeSystem.GetSpecializingTypeSystem(inst.Method.Substitution);
var ilReader = new ILReader(specializingTypeSystem); var ilReader = new ILReader(specializingTypeSystem);
System.Threading.CancellationToken cancellationToken = new System.Threading.CancellationToken(); System.Threading.CancellationToken cancellationToken = new System.Threading.CancellationToken();
var proxyFunction = ilReader.ReadIL(methodDef.Body, cancellationToken); var proxyFunction = ilReader.ReadIL(methodDef.Body, cancellationToken);

9
ICSharpCode.Decompiler/TypeSystem/DecompilerTypeSystem.cs

@ -421,5 +421,14 @@ namespace ICSharpCode.Decompiler.TypeSystem
return null; return null;
} }
#endregion #endregion
public IDecompilerTypeSystem GetSpecializingTypeSystem(TypeParameterSubstitution substitution)
{
if (substitution.Equals(TypeParameterSubstitution.Identity)) {
return this;
} else {
return new SpecializingDecompilerTypeSystem(this, substitution);
}
}
} }
} }

6
ICSharpCode.Decompiler/TypeSystem/IDecompilerTypeSystem.cs

@ -33,5 +33,11 @@ namespace ICSharpCode.Decompiler.TypeSystem
IType Resolve(TypeReference typeReference); IType Resolve(TypeReference typeReference);
IField Resolve(FieldReference fieldReference); IField Resolve(FieldReference fieldReference);
IMethod Resolve(MethodReference methodReference); IMethod Resolve(MethodReference methodReference);
/// <summary>
/// Gets a type system instance that automatically specializes the results
/// of each Resolve() call with the provided substitution.
/// </summary>
IDecompilerTypeSystem GetSpecializingTypeSystem(TypeParameterSubstitution substitution);
} }
} }

8
ICSharpCode.Decompiler/TypeSystem/SpecializingDecompilerTypeSystem.cs

@ -72,6 +72,14 @@ namespace ICSharpCode.Decompiler.TypeSystem
return method; return method;
} }
public IDecompilerTypeSystem GetSpecializingTypeSystem(TypeParameterSubstitution newSubstitution)
{
//return context.GetSpecializingTypeSystem(TypeParameterSubstitution.Compose(newSubstitution, this.substitution));
// Because the input new substitution is taken from IMember.Substitution for some member that
// was resolved by this type system, it already contains 'this.substitution'.
return context.GetSpecializingTypeSystem(newSubstitution);
}
public Mono.Cecil.TypeDefinition GetCecil(ITypeDefinition typeDefinition) public Mono.Cecil.TypeDefinition GetCecil(ITypeDefinition typeDefinition)
{ {
return context.GetCecil(typeDefinition); return context.GetCecil(typeDefinition);

Loading…
Cancel
Save