http://bugzilla.novell.com/show_bug.cgi?id=573385
http://bugzilla.novell.com/show_bug.cgi?id=573385#c0 Summary: CS0029 on accessing a field within a generic inner class Classification: Mono Product: Mono: Compilers Version: 2.6.x Platform: Other OS/Version: Windows XP Status: NEW Severity: Normal Priority: P5 - None Component: C# AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: Community User Blocker: --- When I try to use a field within a inner class which is generic, I get the compiler error CS0029. === CODE === using System; class Repro { class Outer{ public class Inner<T> where T: class { public static T[] Values; } } static void Main () { Outer.Inner<string>.Values = new string[0]; } } ============ Actual Results: D:\>gmcs test.cs test.cs(11,29): error CS0029: Cannot implicitly convert type `string[]' to `T[]' Compilation failed: 1 error(s), 0 warnings Expected Results: compiles successfully. Additional Information: However, the following code (not within an inner class) compiles successfully. === CODE === using System; class Repro { public class Inner<T> where T: class { public static T[] Values; } static void Main () { Inner<string>.Values = new string[0]; } } ============ -- Configure bugmail: http://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
