[Mono-bugs] [Bug 413423] New: Reference to generic type via namespace alias fails

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jul 30 18:27:31 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=413423


           Summary: Reference to generic type via namespace alias fails
           Product: Mono: Compilers
           Version: 1.9
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: skeet at pobox.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Description of Problem:

Trying to use a property or field using a namespace alias fails.

Steps to reproduce the problem:

Try to compile this code with gmcs:
namespace Foo
{
    class Bar<T>
    {
        public static string Baz;
    }
}

namespace Other
{
    using f = global::Foo;    
    public class Test
    {            
        string x = f::Bar<int>.Baz;
        static void Main(){}
    }
}

Actual Results:
Test.cs(14,30): error CS1518: Expected `class', `delegate', `enum',
`interface',
 or `struct'
Compilation failed: 1 error(s), 0 warnings


Expected Results:
Compile without error.


How often does this happen? 
Every time. 


Additional information:
In a more complicated scenario I get a different error ("parse error") but I
don't have the exact details of that here now. Hopefully between this and the
other bug I've just logged, the parse error may be fixed too.


-- 
Configure bugmail: https://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