https://bugzilla.novell.com/show_bug.cgi?id=395542
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: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
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, };
Console.WriteLine(a);
}
}
The COMMA after 2 is the culprit.
The section 7.5.10.6 of C# 3.0 specification says:
anonymous-object-initializer:
{ 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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs