[Mono-bugs] [Bug 76762][Nor] New - [GMCS] CS0508 not reported for generic property override causing looped unification

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Nov 19 17:35:05 EST 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 nazgul at omega.pl.

http://bugzilla.ximian.com/show_bug.cgi?id=76762

--- shadow/76762	2005-11-19 17:35:05.000000000 -0500
+++ shadow/76762.tmp.30559	2005-11-19 17:35:05.000000000 -0500
@@ -0,0 +1,50 @@
+Bug#: 76762
+Product: Mono: Compilers
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: nazgul at omega.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: [GMCS] CS0508 not reported for generic property override causing looped unification
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+The example below is quite strange. It should be rejected by gmcs, just
+like by csc, because B returned by B getT() is in full signature A<T>.B,
+but T getT() from A<T> resolves to A<A<T>.B> getT(), so A<T>.B getT() is
+not a correct override of A<A<T>.B> getT()
+
+Steps to reproduce the problem:
+1. Compile following program
+
+abstract class A<T>
+{
+   public abstract T getT();
+
+   class B : A<B>
+   {
+       public override B getT()
+       {
+           throw new System.Exception("The method or operation is not
+implemented.");
+       }
+   }
+}
+
+Actual Results:
+error No Main
+
+Expected Results:
+t.cs(7,26): error CS0508: 'A<T>.B.getT()': return type must be 'A<T>.B' to
+match overridden member 'A<A<T>.B>.getT()'
+t.cs(3,22): (Location of symbol related to previous error)


More information about the mono-bugs mailing list