[Mono-list] Compilation Error
Miguel de Icaza
miguel@ximian.com
Mon, 15 Nov 2004 14:48:46 -0500
Hello,
> /browser.cs(257) error CS0019: Operator == cannot be applied to
> operands of type `Monodoc.Tabs' and `object'
>
> The code that fails is:
>
> 256://Add the Tab
> 257: if(tabs == null) {
> 258: tabs = new Tabs(tb);
> 259:} else {
> 260: tabs.tabsList.Add(tb);
> 261:}
>
> I solved the problem doing this:
> if((object)tabs == null) {
>
> But I don't know why the compiler can't compile the prior version. The
> tabs variable is a reference to an object of type Tabs that inherites
> from Notebook. So, where is the problem?
This is very strange.
In any case, I have a rewrite of this particular chunk of code that
conforms to some updated bits from the new spec.