https://bugzilla.novell.com/show_bug.cgi?id=476295


           Summary: ExpressionType.NodeType yield different results when
                    compiled on gmcs vc csc nr 2
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.6)
Gecko/2009011913 Firefox/3.0.6

using System;
using System.Linq.Expressions;

public class Program
{
    static void Main()
    {
        Expression<Action<IHelper>> e = (helper => helper.DoIt(new Foo()));

        var mce = e.Body as MethodCallExpression;
        var et = mce.Arguments[0].NodeType;
        if (et == ExpressionType.Convert)
            Console.WriteLine("Hi from gmcs");
        else
            Console.WriteLine("Hi from csc");
    }
}

public class FooBase { }
public class Foo : FooBase { }

public interface IHelper
{
    void DoIt(FooBase foo);
}

Reproducible: Always

Steps to Reproduce:
1.Compile with gmcs and csc
2.Run both programs and compare output
Actual Results:  
different output

Expected Results:  
same output

compiled with Revision: 127046, this bug is _very_ similar to
https://bugzilla.novell.com/show_bug.cgi?id=475823

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to