[Mono-bugs] [Bug 354928] New: CS1922 error while using a new initialized object inline
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Jan 18 19:35:06 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=354928
Summary: CS1922 error while using a new initialized object inline
Product: Mono: Compilers
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: spouliot at novell.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
/usr/local/bin/gmcs -debug -target:library -langversion:linq -pkg:mono-cecil
-pkg:mono-nunit -r:../bin/Gendarme.Framework.dll \
-out:Test.Framework.dll
/Test/Gendarme.Framework/MethodSignatureTest.cs
/Test/Gendarme.Framework.Rocks/AssemblyRocksTest.cs
/Test/Gendarme.Framework.Rocks/CustomAttributeRocksTest.cs
/Test/Gendarme.Framework.Rocks/MethodRocksTest.cs
/Test/Gendarme.Framework.Rocks/TypeRocksTest.cs
/Test/Gendarme.Framework.Rocks/FieldRocksTest.cs
warning CS8030: Deprecated: The `linq' option is no longer required and should
not be used
/Test/Gendarme.Framework/MethodSignatureTest.cs(93,63): error CS1922: A field
or property `Gendarme.Framework.MethodSignature' cannot be initialized with a
collection object initializer because type `Gendarme.Framework.MethodSignature'
does not implement `System.Collections.IEnumerable' interface
Offending line of code:
Assert.IsTrue (new MethodSignature () { Name = "TestMatch" }.Matches (GetMethod
("TestMatch")));
The previous line didn't raise an error:
Assert.IsTrue (new MethodSignature ().Matches (GetMethod ("TestMatch")));
This compiles without problems using VS 2008.
--
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