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

StApostol stapostol at gmail.com
Sun Sep 9 11:37:36 EDT 2007


Hi,

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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070909/4bc12bd8/attachment.html 


More information about the Mono-devel-list mailing list