X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Freferencesource%2FSystem.Core%2FMicrosoft%2FScripting%2FCompiler%2FLambdaCompiler.Unary.cs;h=cb8ef7da1664903aca8989163ec517cb451d6abc;hb=215901f51bf00e9d1e58cada05033aae8283e336;hp=e7e9dc172542250e671c1dcb931cb339164a7f0d;hpb=10e54be5f860d412d2ab5b193de582e232ceeb7e;p=mono.git diff --git a/mcs/class/referencesource/System.Core/Microsoft/Scripting/Compiler/LambdaCompiler.Unary.cs b/mcs/class/referencesource/System.Core/Microsoft/Scripting/Compiler/LambdaCompiler.Unary.cs index e7e9dc17254..cb8ef7da166 100644 --- a/mcs/class/referencesource/System.Core/Microsoft/Scripting/Compiler/LambdaCompiler.Unary.cs +++ b/mcs/class/referencesource/System.Core/Microsoft/Scripting/Compiler/LambdaCompiler.Unary.cs @@ -291,12 +291,12 @@ namespace System.Linq.Expressions.Compiler { // if it is null, and then call the conversion. // // We cannot fix this in C# but there is no reason why we need to - // propagate this - - - - - + // propagate this bug into the expression tree API. Unfortunately + // this means that when the C# compiler generates the lambda + // (int? i)=>(MyClass)i, we will get different results for converting + // that lambda to a delegate directly and converting that lambda to + // an expression tree and then compiling it. We can live with this + // discrepancy however. if (node.IsLifted && (!node.Type.IsValueType || !node.Operand.Type.IsValueType)) { ParameterInfo[] pis = node.Method.GetParametersCached();