[Mono-bugs] [Bug 706881] gmcs supports extension 'Add' method to be used for collection initialization syntax, differs from csc

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jul 19 19:45:13 EDT 2011



--- Comment #1 from Aaron Bockover <aaron.bockover+novell at gmail.com> 2011-07-19 23:45:12 UTC ---
Created an attachment (id=440954)
 --> (http://bugzilla.novell.com/attachment.cgi?id=440954)
Test case - fails under csc

Attached is a test case. When compiled using gmcs the resulting program prints
the following to the console:


Whereas csc does not compile it at all:

$ /c/Windows/Microsoft.NET/Framework/v4.0.30319/csc.exe collection-initializer-
Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
Copyright (C) Microsoft Corporation. All rights reserved.

collection-initializer-extension-method.cs(25,13): error CS0117: 'Foo' does not
        contain a definition for 'Add'
collection-initializer-extension-method.cs(26,13): error CS0117: 'Foo' does not
        contain a definition for 'Add'
collection-initializer-extension-method.cs(27,13): error CS0117: 'Foo' does not
        contain a definition for 'Add'

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list