[Mono-bugs] [Bug 371016] New: gmcs can' t compile comparison of variable of type delegate with method

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Mar 14 09:05:13 EDT 2008


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


           Summary: gmcs can't compile comparison of variable of type
                    delegate with method
           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: vargaz at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Testcase:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
using System;
using System.Collections.Generic;
using System.Reflection;

class Program
{
        delegate IEnumerable<object> ExtensionNameTransformer(MemberInfo
member);

        private ExtensionNameTransformer _transform;

        private IEnumerable<object> DefaultNameTransform(MemberInfo member) {
                return null;
        }

        public void foo () {
                if (_transform == DefaultNameTransform)
                        Console.WriteLine ("FOO!");
        }

        static void Main(string[] args) {
                new Program ().foo ();
        }
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

csc compiles this just fine, while gmcs fails with:
bug.cs(16,21): error CS0019: Operator `==' cannot be applied to operands of
type `Program.ExtensionNameTransformer' and `variable'
Compilation failed: 1 error(s), 0 warnings

This prevents IronPython 2.0B1 from compiling with mono.


-- 
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