Author: martin
Date: 2006-06-21 21:46:25 -0400 (Wed, 21 Jun 2006)
New Revision: 61929
Added:
trunk/mcs/tests/gtest-277.cs
Modified:
trunk/mcs/gmcs/ChangeLog
trunk/mcs/gmcs/class.cs
Log:
2006-06-22 Martin Baulig <[EMAIL PROTECTED]>
* class.cs
(TypeContainer.GetNormalBases): Also use ResolveAsBaseTerminal()
for interfaces; fixes #78686, which is a modification of #78380
with interfaces instead of classes.
Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog 2006-06-22 01:37:01 UTC (rev 61928)
+++ trunk/mcs/gmcs/ChangeLog 2006-06-22 01:46:25 UTC (rev 61929)
@@ -1,3 +1,10 @@
+2006-06-22 Martin Baulig <[EMAIL PROTECTED]>
+
+ * class.cs
+ (TypeContainer.GetNormalBases): Also use ResolveAsBaseTerminal()
+ for interfaces; fixes #78686, which is a modification of #78380
+ with interfaces instead of classes.
+
2006-06-21 Martin Baulig <[EMAIL PROTECTED]>
* codegen.cs (CodeGen.Save): Moved the symbol file generation into
Modified: trunk/mcs/gmcs/class.cs
===================================================================
--- trunk/mcs/gmcs/class.cs 2006-06-22 01:37:01 UTC (rev 61928)
+++ trunk/mcs/gmcs/class.cs 2006-06-22 01:46:25 UTC (rev 61929)
@@ -1003,7 +1003,7 @@
TypeExpr [] ifaces = new TypeExpr [count-start];
for (i = start, j = 0; i < count; i++, j++){
- TypeExpr resolved = ((Expression) Bases
[i]).ResolveAsTypeTerminal (this, false);
+ TypeExpr resolved = ((Expression) Bases
[i]).ResolveAsBaseTerminal (this, false);
if (resolved == null) {
return null;
}
@@ -1238,6 +1238,13 @@
foreach (Type itype in ifaces)
TypeBuilder.AddInterfaceImplementation
(itype);
+ foreach (TypeExpr ie in iface_exprs) {
+ ObsoleteAttribute oa =
AttributeTester.GetObsoleteAttribute (ie.Type);
+ if ((oa != null) && !IsInObsoleteScope)
+
AttributeTester.Report_ObsoleteMessage (
+ oa,
ie.GetSignatureForError (), Location);
+ }
+
if (!CheckGenericInterfaces (ifaces)) {
return false;
}
Added: trunk/mcs/tests/gtest-277.cs
===================================================================
--- trunk/mcs/tests/gtest-277.cs 2006-06-22 01:37:01 UTC (rev 61928)
+++ trunk/mcs/tests/gtest-277.cs 2006-06-22 01:46:25 UTC (rev 61929)
@@ -0,0 +1,47 @@
+using System;
+using System.Collections.Generic;
+
+public interface INode<K> : IComparable<K> where K : IComparable<K>
+{
+ K Key {
+ get;
+ }
+}
+
+public interface IBTNode<C> where C : IBTNode<C>
+{
+ C Parent {
+ get;
+ set;
+ }
+
+ C Left {
+ get;
+ set;
+ }
+
+ C Right {
+ get;
+ set;
+ }
+}
+
+public interface IBSTNode<K, C> : IBTNode<C>, INode<K>
+ where C : IBSTNode<K, C> where K : IComparable<K>
+{
+}
+
+public interface IAVLNode<K, C> : IBSTNode<K, C>
+ where C : IAVLNode<K, C> where K : IComparable<K>
+{
+ int Balance {
+ get;
+ set;
+ }
+}
+
+class X
+{
+ static void Main ()
+ { }
+}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches