[Mono-bugs] [Bug 618186] New: Doesn't work with one way to resolve ambiguous attributes

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jun 29 05:18:14 EDT 2010


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

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


           Summary: Doesn't work with one way to resolve ambiguous
                    attributes
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: harinath at hurrynot.org
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/533.4
(KHTML, like Gecko) Chrome/5.0.375.86 Safari/533.4

The following snippet compiles fine with CSC 4.0.21006.1

--------------------------------
using System;

namespace A { class CAttribute : Attribute { } }
namespace B { class CAttribute : Attribute { } }

namespace Foo {
  using A;
  using B;

  using C = A.CAttribute;

  [C] class Foo { static void Main () {    } }
}
--------------------------------

Reproducible: Always

Actual Results:  
foo43.cs(12,4): error CS1614: `C' is ambiguous between `C' and `CAttribute'.
Use either `@C' or `CAttribute'


Expected Results:  
clean compile


For that matter, it doesn't work with CSC 2.0.50727 either:

Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.4927
for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.

foo43.cs(12,4): error CS0104: 'CAttribute' is an ambiguous reference between
        'A.CAttribute' and 'B.CAttribute'
foo43.cs(3,21): (Location of symbol related to previous error)
foo43.cs(4,21): (Location of symbol related to previous error)
foo43.cs(12,4): error CS1614: 'C' is ambiguous between 'A.CAttribute' and
        'A.CAttribute'; use either '@C' or 'CAttribute'
foo43.cs(3,21): (Location of symbol related to previous error)

-- 
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