* expression.cs (MemberAccess.DoResolve): Add support for nested
types in a generic instance; fixes #75320.
svn path=/trunk/mcs/; revision=46288
+2005-06-21 Martin Baulig <martin@ximian.com>
+
+ * expression.cs (MemberAccess.DoResolve): Add support for nested
+ types in a generic instance; fixes #75320.
+
2005-06-20 Martin Baulig <martin@ximian.com>
* generic.cs (TypeManager.InferType): Also walk the class
return null;
}
+ ConstructedType ct = expr as ConstructedType;
+ if (ct != null) {
+ //
+ // When looking up a nested type in a generic instance
+ // via reflection, we always get a generic type definition
+ // and not a generic instance - so we have to do this here.
+ //
+ // See gtest-172-lib.cs and gtest-172.cs for an example.
+ //
+ ct = new ConstructedType (
+ member_lookup.Type, ct.TypeArguments, loc);
+
+ return ct.ResolveAsTypeStep (ec);
+ }
+
return member_lookup;
}