Bug 325343 (MONO82676) - [GMCS] Compiler error with the '==' operator when comparing interface reference against class reference
Summary: [GMCS] Compiler error with the '==' operator when comparing interface referen...
Status: RESOLVED FIXED
Alias: MONO82676
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.2
Hardware: Other Other
: P3 - Medium : Blocker
Target Milestone: ---
Assignee: Marek Safar
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-03 21:53 UTC by Rodrigo Oliveira
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 20:51:50 UTC


---- Reported by rodrigobamboo@gmail.com 2007-09-03 14:53:10 MST ----

Compile the following code with gmcs:

public interface IContainer
{
}

public interface IExtContainer : IContainer
{
}

public abstract class ObjectContainerBase : IContainer
{
}

public class Program
{
    public static void Main(string[] args)
    {
        IExtContainer e = null;
        ObjectContainerBase b = null;
        System.Console.WriteLine(e == b);
    }
}

It fails with:

Operator `==' cannot be applied to operands of type `IExtContainer' and
'ObjectContainerBase'

Expected result:

No errors.



---- Additional Comments From gert.driesen@pandora.be 2007-09-04 16:04:47 MST ----

Added test case as mcs/tests/test-583.cs.



---- Additional Comments From marek.safar@seznam.cz 2007-09-05 06:15:29 MST ----

Fixed on SVN.


Unknown operating system unknown. Setting to default OS "Other".