You're found a bug, which affects assemblies compiled against the .NET 4 platform.
The code that decompiles a delegate as a lambda expression, has a guard which checks that the assembly containing the type references System.Query or System.Core.
Hence the following decompiles to a lambda expression
- Code: Select all
static void Main(string args)
Type foo = typeof (System.Linq.Enumerable);
Func<int, int> xx =
return x * 3;
but commenting out the typeof line causes Reflector to always decompile to a delegate (as the assembly no longers references out of the assemblies mentioned above).
I've logged this as RP-760.