Bugzilla – Bug 318117
Strange Generic Bug while reporting inadequate delegate
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by spigaz@gmail.com 2005-05-29 22:18:56 MST ---- Description of Problem: In a strange configuration the gmcs flags a wrong error. Steps to reproduce the problem: 1. Insert into a file and compile into an assembly: public class Generic<T> { public void Add(Changed changed) { } public delegate void Changed(Generic<T> proxy, T value); } public class Class { public Generic<bool> Property { get { return null; } } } 2. Insert into another file and compile with the other assembly as reference: public class Class2 { public Class2(Class instance) { instance.Property.Add(new Generic<bool>.Changed(OnEvent)); } protected void OnEvent(object changed) { } } 3. Actual Results: error CS0234: The type name `Changed' could not be found in type `Generic`1<T><System.Boolean>' Expected Results: error CS0123: Method 'void Class2.OnEvent ( object)' does not match delegate 'void Generic`1+Changed<System.Boolean> (Generic`1, bool)' How often does this happen? Always Additional Information: Might be related to https://bugzilla.novell.com/show_bug.cgi?id=MONO75092 ---- Additional Comments From martin@ximian.com 2005-06-10 12:48:23 MST ---- *** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO75092 *** Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Gentoo 2.6.11</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other". This bug was marked DUPLICATE in the database it was moved from. Changing resolution to "MOVED"