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


           Summary: Type parameters are not restricted to identifiers
           Product: Mono: Compilers
           Version: 1.9.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs@lists.ximian.com
        ReportedBy: [EMAIL PROTECTED]
         QAContact: mono-bugs@lists.ximian.com
          Found By: ---


According to the standard (and .NET CSC.EXE), type parameters need to be
identifiers.  gmcs does not require this.

To duplicate, compile the following code:

        // nested generics?
        interface IFoo<T> {
        }

        public class Bar {
                public IFoo<T> GetItemCommand<IFoo<T>>()
                {
                        return default(IFoo<T>);
                }
        }

        class Test {
                public static void Main ()
                {
                }
        }

Actual Results:

No error.

Expected results:

p.cs(8,32): error CS0081: Type parameter declaration must be an identifier not
a type
p.cs(8,14): error CS0246: The type or namespace name 'T' could not be found
(are you missing a using directive or an assembly reference?)


-- 
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.
_______________________________________________
mono-bugs maillist  -  mono-bugs@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to