Author: raja
Date: 2006-08-03 08:40:31 -0400 (Thu, 03 Aug 2006)
New Revision: 63286
Added:
trunk/mcs/errors/cs0146-3.cs
trunk/mcs/errors/cs0146-4.cs
Modified:
trunk/mcs/errors/ChangeLog
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/class.cs
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/class.cs
Log:
In mcs and gmcs:
Fix cs0146-3.cs and cs0146-4.cs.
* class.cs (TypeManager.CheckRecursiveDefinition): Check that
enclosing types don't depend on the current type.
In errors:
* cs0146-3.cs, cs0146-4.cs: New tests for bug discovered while
fixing #77963.
Modified: trunk/mcs/errors/ChangeLog
===================================================================
--- trunk/mcs/errors/ChangeLog 2006-08-03 12:38:44 UTC (rev 63285)
+++ trunk/mcs/errors/ChangeLog 2006-08-03 12:40:31 UTC (rev 63286)
@@ -1,3 +1,8 @@
+2006-08-03 Raja R Harinath <[EMAIL PROTECTED]>
+
+ * cs0146-3.cs, cs0146-4.cs: New tests for bug discovered while
+ fixing #77963.
+
2006-08-02 Raja R Harinath <[EMAIL PROTECTED]>
* cs0246-16.cs, gcs0246-8.cs: New tests from #77396.
Added: trunk/mcs/errors/cs0146-3.cs
===================================================================
--- trunk/mcs/errors/cs0146-3.cs 2006-08-03 12:38:44 UTC (rev 63285)
+++ trunk/mcs/errors/cs0146-3.cs 2006-08-03 12:40:31 UTC (rev 63286)
@@ -0,0 +1,6 @@
+// cs0146-3.cs: Circular base class dependency involving `Foo.Bar' and `Foo'
+// Line: 5
+
+class Foo : Foo.Bar {
+ public class Bar {}
+}
Property changes on: trunk/mcs/errors/cs0146-3.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/mcs/errors/cs0146-4.cs
===================================================================
--- trunk/mcs/errors/cs0146-4.cs 2006-08-03 12:38:44 UTC (rev 63285)
+++ trunk/mcs/errors/cs0146-4.cs 2006-08-03 12:40:31 UTC (rev 63286)
@@ -0,0 +1,7 @@
+// cs0146-4.cs: Circular base class dependency involving `Foo.Bar' and `Foo'
+// Line: 5
+
+class Foo : Baz {
+ public class Bar {}
+}
+class Baz : Foo.Bar {}
Property changes on: trunk/mcs/errors/cs0146-4.cs
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2006-08-03 12:38:44 UTC (rev 63285)
+++ trunk/mcs/gmcs/ChangeLog 2006-08-03 12:40:31 UTC (rev 63286)
@@ -1,3 +1,9 @@
+2006-08-03 Raja R Harinath <[EMAIL PROTECTED]>
+
+ Fix cs0146-3.cs and cs0146-4.cs.
+ * class.cs (TypeManager.CheckRecursiveDefinition): Check that
+ enclosing types don't depend on the current type.
+
2006-08-02 Raja R Harinath <[EMAIL PROTECTED]>
Fix #77963
Modified: trunk/mcs/gmcs/class.cs
===================================================================
--- trunk/mcs/gmcs/class.cs 2006-08-03 12:38:44 UTC (rev 63285)
+++ trunk/mcs/gmcs/class.cs 2006-08-03 12:40:31 UTC (rev 63286)
@@ -1446,6 +1446,9 @@
}
}
+ if (!IsTopLevel &&
!Parent.PartialContainer.CheckRecursiveDefinition (this))
+ return false;
+
InTransit = null;
return true;
}
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2006-08-03 12:38:44 UTC (rev 63285)
+++ trunk/mcs/mcs/ChangeLog 2006-08-03 12:40:31 UTC (rev 63286)
@@ -1,3 +1,9 @@
+2006-08-03 Raja R Harinath <[EMAIL PROTECTED]>
+
+ Fix cs0146-3.cs and cs0146-4.cs.
+ * class.cs (TypeManager.CheckRecursiveDefinition): Check that
+ enclosing types don't depend on the current type.
+
2006-08-02 Raja R Harinath <[EMAIL PROTECTED]>
Fix #77963
Modified: trunk/mcs/mcs/class.cs
===================================================================
--- trunk/mcs/mcs/class.cs 2006-08-03 12:38:44 UTC (rev 63285)
+++ trunk/mcs/mcs/class.cs 2006-08-03 12:40:31 UTC (rev 63286)
@@ -1279,6 +1279,9 @@
}
}
+ if (!IsTopLevel &&
!Parent.PartialContainer.CheckRecursiveDefinition (this))
+ return false;
+
InTransit = null;
return true;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches