// class.cs: Class and Struct handlers
//
// Authors: Miguel de Icaza (miguel@gnu.org)
-// Martin Baulig (martin@gnome.org)
+// Martin Baulig (martin@ximian.com)
// Marek Safar (marek.safar@seznam.cz)
//
// Licensed under the terms of the GNU GPL
if (iface == t)
continue;
- if (!TypeManager.MayBecomeEqualGenericInstances (iface, t))
+ Type[] infered = new Type [CountTypeParameters];
+ if (!TypeManager.MayBecomeEqualGenericInstances (iface, t, infered, null))
continue;
Report.Error (
VerifyClsName ();
+ if (IsGeneric) {
+ Report.Error (3024, Location, "'{0}': type parameters are not CLS-compliant",
+ GetSignatureForError ());
+ return false;
+ }
+
Type base_type = TypeBuilder.BaseType;
if (base_type != null && !AttributeTester.IsClsCompliant (base_type)) {
Report.Error (3009, Location, "'{0}': base type '{1}' is not CLS-compliant", GetSignatureForError (), TypeManager.CSharpName (base_type));
}
if (!AttributeTester.IsClsCompliant (MemberType)) {
- Report.Error (3002, Location, "Return type of '{0}' is not CLS-compliant", GetSignatureForError ());
+ if ((this is Property) || (this is Indexer))
+ Report.Error (3003, Location, "Type of `{0}' is not CLS-compliant",
+ GetSignatureForError ());
+ else
+ Report.Error (3002, Location, "Return type of '{0}' is not CLS-compliant",
+ GetSignatureForError ());
}
AttributeTester.AreParametersCompliant (Parameters.FixedParameters, Location);
else
method_infered = null;
- return Invocation.InferTypeArguments (
+ return TypeManager.MayBecomeEqualGenericInstances (
first.ParameterTypes, second.ParameterTypes, class_infered, method_infered);
}
// TODO: make operator compatible with MethodCore to avoid this
if (this is Operator && method is Operator) {
if (MemberType != method.MemberType)
- equal = false;
+ equal = may_unify = false;
}
if (equal) {