* generic.cs (ConstructedType.ResolveAsTypeStep): Report a CS8217
if the number of type parameters doesn't match.
svn path=/trunk/mcs/; revision=17972
+2003-09-07 Martin Baulig <martin@ximian.com>
+
+ * generic.cs (ConstructedType.ResolveAsTypeStep): Report a CS8217
+ if the number of type parameters doesn't match.
+
2003-09-04 Martin Baulig <martin@ximian.com>
* expression.cs (ComposedCast.ResolveAsTypeStep): Added support
Type gt = resolved.Type.GetGenericTypeDefinition ();
+ Type[] gen_params = gt.GetGenericParameters ();
+ if (args.Arguments.Length != gen_params.Length) {
+ Report.Error (-217, loc, "Generic type `" + gt.Name + "' takes " +
+ gen_params.Length + " type parameters, but specified " +
+ args.Arguments.Length + ".");
+ return null;
+ }
+
//
// Now bind the parameters.
//