Bugzilla – Bug 318981
[GMCS]: complicated - second class constraint in derived class
Last modified: 2007-09-15 21:24:23 UTC
---- Reported by spigaz@gmail.com 2005-09-13 16:38:35 MST ---- Please fill in this template when reporting a bug, unless you know what you are doing. Description of Problem: The compiler doesn't find a property of a Generic Type. Steps to reproduce the problem: 1. Insert into a file: public static class Main { public static void Execute<T>(B1<T> b) where T : A1 { System.Console.WriteLine(b.D.A.LastModified); } } public class C<T> where T : A { public T A { get { return null; } } } public class D<T> : C<T> where T : A { } public class B<T> where T : A { public D<T> D { get { return null; } } } public class B1<T> : B<T> where T : A1 { } public class A { } public class A1 : A { public System.DateTime LastModified { get { return System.DateTime.Now; } } } 2. Try to compile 3. Actual Results: /Main.cs(7) error CS0117: `T' does not contain a definition for `LastModified' Expected Results: It should compile How often does this happen? Always Additional Information: I tested against 1.1.9 ---- Additional Comments From atsushi@ximian.com 2005-10-18 00:35:34 MST ---- I think this is a duplicate of #75692. ---- Additional Comments From martin@ximian.com 2005-10-24 05:11:38 MST ---- Unfortunately, this is not a duplicate of the now fixed #75692 :-( ---- Additional Comments From martin@ximian.com 2005-10-25 12:26:53 MST ---- This is hard, very hard. ---- Additional Comments From spigaz@gmail.com 2005-10-25 15:32:46 MST ---- Yes, I have the bad habit of bumping against these kind of bugs too often. Good luck. []s ---- Additional Comments From martin@ximian.com 2005-10-28 18:17:56 MST ---- I'm finally giving up on this for the moment :-( ---- Additional Comments From spigaz@gmail.com 2005-10-29 06:31:21 MST ---- Damm... As this one completly disables a design pattern of mine... ---- Additional Comments From spigaz@gmail.com 2006-02-02 09:17:49 MST ---- Just checked, this one is still alive. ---- Additional Comments From martin@ximian.com 2006-03-21 19:29:12 MST ---- Now it seems to be gone - and this really makes me very happy :-) ---- Additional Comments From spigaz@gmail.com 2006-03-22 06:07:33 MST ---- Yes, I really happy too. After 6 months of having a pattern disabled, it feels really good. Thanks guys for your excelent work and keep up. I know you did your best, as always, this one was just too damm hard. Thanks!!! Unknown bug field "cf_op_sys_details" encountered while moving bug <cf_op_sys_details>Linux</cf_op_sys_details> Unknown operating system unknown. Setting to default OS "Other".