[Mono-bugs] [Bug 354928] CS1922 error while using a new initialized object inline

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jan 21 17:09:46 EST 2008


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

User spouliot at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=354928#c2





--- Comment #2 from Sebastien Pouliot <spouliot at novell.com>  2008-01-21 15:09:45 MST ---
Not sure if related... if not then I'll open a new bug w/test case

// this doesn't work
name = "Test.Framework.Rocks.PublicType/NestedPublicType";
Assert.IsTrue (assembly.MainModule.Types [name].IsVisible (), name);

gmcs reports:

/Test/Gendarme.Framework.Rocks/TypeRocksTest.cs(346,73): error CS1501: No
overload for method `IsVisible' takes `0' arguments


but adding a temporary variable (not using the collection indexer) works
correctly, e.g.

string name = "Test.Framework.Rocks.PublicType";
TypeDefinition type = assembly.MainModule.Types [name];
Assert.IsTrue (type.IsVisible (), name);


-- 
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