[Mono-bugs] [Bug 463613] New: Wrong warning CS0108 with overloaded operators from library

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jan 5 12:16:28 EST 2009


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


           Summary: Wrong warning CS0108 with overloaded operators from
                    library
           Product: Mono: Compilers
           Version: 2.0.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: eb1 at sil.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


I have a base class Base in a library that defines

public static bool operator ==(Base left, Base right)

In a derived class Derived I define

public static bool operator ==(Derived left, Derived right)

When compiling this with gmcs version 1.9.1.0 or 2.0.1.0  I get a warning:
/tmp/main.cs(10,28): warning CS0108: `Derived.operator ==(Derived, Derived)'
hides inherited member `My.Library.Base.operator /(My.Library.Base,
My.Library.Base)'. Use the new keyword if hiding was intended
/tmp/library.dll (Location of the symbol related to previous warning)

If I compile both classes into the same assembly I don't get the warning. If I
compile the same code on Windows with csc I don't get warnings either.


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