[Mono-bugs] [Bug 76091][Nor] New - Bug in compilation of generic
type usage
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Sep 13 16:38:36 EDT 2005
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by spigaz at gmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=76091
--- shadow/76091 2005-09-13 16:38:36.000000000 -0400
+++ shadow/76091.tmp.15939 2005-09-13 16:38:36.000000000 -0400
@@ -0,0 +1,89 @@
+Bug#: 76091
+Product: Mono: Compilers
+Version: 1.1
+OS:
+OS Details: Linux
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com
+ReportedBy: spigaz at gmail.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Bug in compilation of generic type usage
+
+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
More information about the mono-bugs
mailing list