[Mono-bugs] [Bug 476295] New: ExpressionType.NodeType yield different results when compiled on gmcs vc csc nr 2

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Feb 16 16:25:39 EST 2009


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: mono-bugs at lists.ximian.com
        ReportedBy: basjsmit at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          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.


More information about the mono-bugs mailing list