// Copy constraint from resolved part to partial container
spec.SpecialConstraint = tp.spec.SpecialConstraint;
- spec.Interfaces = tp.spec.Interfaces;
+ spec.InterfacesDefined = tp.spec.InterfacesDefined;
spec.TypeArguments = tp.spec.TypeArguments;
spec.BaseType = tp.spec.BaseType;
//
// Check the interfaces constraints
//
- if (tparam.Interfaces != null) {
- foreach (TypeSpec iface in tparam.Interfaces) {
+ if (tparam.InterfacesDefined != null) {
+ foreach (TypeSpec iface in tparam.InterfacesDefined) {
if (!CheckConversion (mc, context, atype, tparam, iface, loc)) {
if (mc == null)
return false;
--- /dev/null
+namespace A
+{
+ public partial class B<T>
+ {
+ public partial class C
+ {
+ public class A { }
+ }
+ }
+}
+
+namespace A
+{
+ public abstract partial class B<T> where T : B<T>.C
+ {
+ }
+}
+
+namespace A
+{
+ public partial class B<T>
+ {
+ public partial class C : I
+ {
+ }
+ }
+}
+
+namespace A
+{
+ public interface Ibase
+ {
+ }
+
+ public partial class B<T>
+ {
+ public interface I : Ibase
+ {
+ }
+ }
+}
+
+namespace A
+{
+ class Bar : B<Bar>.C
+ {
+ }
+
+ public class Test
+ {
+ public static void Main ()
+ {
+ Ibase b = new Bar ();
+ System.Console.WriteLine (b != null);
+ }
+ }
+}
</method>\r
</type>\r
</test>\r
+ <test name="gtest-partial-09.cs">\r
+ <type name="A.B`1[T]">\r
+ <method name="Void .ctor()" attrs="6276">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="A.B`1+C[T]">\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="A.B`1+C+A[T]">\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="A.Bar">\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ <type name="A.Test">\r
+ <method name="Void Main()" attrs="150">\r
+ <size>20</size>\r
+ </method>\r
+ <method name="Void .ctor()" attrs="6278">\r
+ <size>7</size>\r
+ </method>\r
+ </type>\r
+ </test>\r
<test name="gtest-var-04.cs">\r
<type name="Test">\r
<method name="Int32 Main()" attrs="150">\r