[Mono-bugs] [Bug 32068][Nor] New - mcs should give error for deep cycles in struct
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
10 Oct 2002 16:36:53 -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 hwang_rob@yahoo.ca.
http://bugzilla.ximian.com/show_bug.cgi?id=32068
--- shadow/32068 Thu Oct 10 12:36:53 2002
+++ shadow/32068.tmp.24061 Thu Oct 10 12:36:53 2002
@@ -0,0 +1,63 @@
+Bug#: 32068
+Product: Mono/MCS
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: hwang_rob@yahoo.ca
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: mcs should give error for deep cycles in struct
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+A struct should not be allowed to contain a member of its own type, no
+matter how deeply nested it is.
+
+Steps to reproduce the problem:
+1. compile the following:
+
+using System;
+
+struct A
+{
+ B b;
+}
+
+struct B
+{
+ A a;
+}
+
+public class C
+{
+ public static void Main()
+ {
+ }
+
+}
+
+Actual Results:
+
+No error message given.
+
+Expected Results:
+
+You should get a 523 error indicating that there is a cycle in the
+structure layout.
+
+How often does this happen?
+
+Always, when the nesting is > 1 level deep. mcs does catch the case when
+the parent type is the same as the member type.
+
+Additional Information: