[Mono-bugs] [Bug 395542] New: cosmetic parser error in anonymous type member declarator list

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu May 29 14:20:31 EDT 2008


           Summary: cosmetic parser error in anonymous type member
                    declarator list
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: atsushi at ximian.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Community of Practice

The following code is valid according to C# 3.0 specification from MS:

using System;
static class Test
    public static void Main(string[] args)
        var a = new { X = 1, Y = 2, };

The COMMA after 2 is the culprit.

The section of C# 3.0 specification says:

  {   member-declarator-listopt   }
  {   member-declarator-list   ,   }

So, the trailing comma is allowed.

Hopefully a patch is being attached.

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