Bugzilla – Bug 325343
[GMCS] Compiler error with the '==' operator when comparing interface reference against class reference
Last modified: 2007-09-15 21:24:23 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".