[Mono-bugs] [Bug 606551] New: gmcs fails type lookup in referenced assembly when namespaces clash

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon May 17 16:31:53 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=606551

http://bugzilla.novell.com/show_bug.cgi?id=606551#c0


           Summary: gmcs fails type lookup in referenced assembly when
                    namespaces clash
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: mhabersack at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=362750)
 --> (http://bugzilla.novell.com/attachment.cgi?id=362750)
Test case

With code similar to the following living in some assembly:

namespace Resources
{
   public sealed class SomeType
   {
       public string Prop { get; set; }
   }
}

and the following in another assembly which references the one above:

namespace Another
{
   using System;

   public class AnotherType
   {
       void Method ()
       {
            Console.WriteLine (Resources.SomeType.Prop);
       }
   }
}

gmcs fails to find the SomeType type because of the external assembly's
Resources namespace clashing with System.Resources. gmcs attempts SomeType
lookup in System.Resources but fails to look for it in the external assembly's
Resources namespace.

Attached tarball contains full code which demonstrates the issue.

I'm setting this to Major as this bug affects any ASP.NET application which
uses global resources programmatically (e.g. BlogEngine)

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list