[Mono-bugs] [Bug 32375][Nor] New - MCS incorrectly reports "Class definition is circular" when it's unable to find a type
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
16 Oct 2002 16:01:18 -0000
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 martin@gnome.org.
http://bugzilla.ximian.com/show_bug.cgi?id=32375
--- shadow/32375 Wed Oct 16 12:01:18 2002
+++ shadow/32375.tmp.1561 Wed Oct 16 12:01:18 2002
@@ -0,0 +1,50 @@
+Bug#: 32375
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: martin@gnome.org
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: MCS incorrectly reports "Class definition is circular" when it's unable to find a type
+
+When you have a class which either derives from a class or implements an interface which does not exist, you get a (correct) error message
+that this class / interface does not exist, but also a lot of error messages that the classes definition is circular.
+
+=====
+using System;
+
+class X : Y
+{
+ public long Foo;
+}
+
+class Z : X
+{
+ public int Bar;
+}
+
+class Test
+{
+ static void Main ()
+ { }
+}
+=====
+
+When compiling this example, you get:
+
+-----
+N.cs(3) error CS0246: Cannot find type `Y'
+N.cs(8) error CS0146: Class definition is circular: `X'
+N.cs(8) error CS0246: Cannot find type `X'
+-----
+
+The two CS0246's are correct, the CS0146 is not.