[Mono-dev] Possible compiler bug with nested partial classes.

Marek Safar marek.safar at seznam.cz
Sun Sep 9 14:11:55 EDT 2007


Hello,

Yes, it is mcs bug. Please fill a bug report into http://bugzilla.ximian.com

If you are interested in fixing the issue TypeContainer::AddPartial is
good starting point.

Thanks
Marek
>
> The following code compiles on csc (.Net 2.0) but fails on gmcs (Mono 
> 1.2.5) with the message: "error CS0229: Ambiguity between 
> `Bug.GL.Core' and `Bug.GL.Core'"
>
> using System;
>
> namespace Bug
> {
>   public static partial class GL
>   {
>        internal static partial class Core
>        {
>            internal static bool A() { return true; }
>        }
>   }
>     
>   partial class GL
>   {
>        public static bool UseCore()
>        {
>            return Core.A();
>        }
>     
>
>        // internal static partial class Core    // <-- Works as it should
>        partial class Core    // <-- Throws error CS0229
>        {
>        }
>   }
> }
>
> The error goes away if I change the decla"partial class Core" 
> declaration to "internal static partial class Core".
>
> No such bug exists in the tracker, should I report? Even better, any 
> pointers on where to start looking to fix this myself?
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>   




More information about the Mono-devel-list mailing list