Author: marek
Date: 2006-11-22 14:19:33 -0500 (Wed, 22 Nov 2006)
New Revision: 68361
Modified:
trunk/mcs/mcs/ChangeLog
trunk/mcs/mcs/class.cs
trunk/mcs/mcs/decl.cs
trunk/mcs/mcs/report.cs
Log:
2006-11-22 Marek Safar <[EMAIL PROTECTED]>
A fix for bug #79987
* class.cs (VerifyClsCompliance): Move redundant CLS compliance
attribute
check to a base class.
* decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be
tested
only when assembly has missing attribute.
* report.cs: Update.
Modified: trunk/mcs/mcs/ChangeLog
===================================================================
--- trunk/mcs/mcs/ChangeLog 2006-11-22 18:34:17 UTC (rev 68360)
+++ trunk/mcs/mcs/ChangeLog 2006-11-22 19:19:33 UTC (rev 68361)
@@ -1,3 +1,12 @@
+2006-11-22 Marek Safar <[EMAIL PROTECTED]>
+
+ A fix for bug #79987
+ * class.cs (VerifyClsCompliance): Move redundant CLS compliance
attribute
+ check to a base class.
+ * decl.cs (VerifyClsCompliance): Warn that CLS compliance cannot be
tested
+ only when assembly has missing attribute.
+ * report.cs: Update.
+
2006-11-21 Marek Safar <[EMAIL PROTECTED]>
* cs-tokenizer.cs: Merged with gmcs version.
Modified: trunk/mcs/mcs/class.cs
===================================================================
--- trunk/mcs/mcs/class.cs 2006-11-22 18:34:17 UTC (rev 68360)
+++ trunk/mcs/mcs/class.cs 2006-11-22 19:19:33 UTC (rev 68361)
@@ -2549,11 +2549,6 @@
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 (!Parent.IsClsComplianceRequired ()) {
- Report.Error (3018, Location, "`{0}' cannot be
marked as CLS-compliant because it is a member of non CLS-compliant type
`{1}'",
- GetSignatureForError (),
Parent.GetSignatureForError ());
- }
return true;
}
@@ -7674,7 +7669,7 @@
int mod_flags, Parameters parameters,
ToplevelBlock block, Attributes attrs,
Location loc)
: base (parent, null, ret_type, mod_flags,
AllowedModifiers, false,
- new MemberName ("op_" + type, loc), attrs,
parameters)
+ new MemberName ("op_" + type.ToString(), loc),
attrs, parameters)
{
OperatorType = type;
Block = block;
Modified: trunk/mcs/mcs/decl.cs
===================================================================
--- trunk/mcs/mcs/decl.cs 2006-11-22 18:34:17 UTC (rev 68360)
+++ trunk/mcs/mcs/decl.cs 2006-11-22 19:19:33 UTC (rev 68361)
@@ -559,13 +559,19 @@
return false;
}
- if (!CodeGen.Assembly.IsClsCompliant) {
- if (HasClsCompliantAttribute) {
+ if (HasClsCompliantAttribute) {
+ if (CodeGen.Assembly.ClsCompliantAttribute ==
null && !CodeGen.Assembly.IsClsCompliant) {
Report.Error (3014, Location,
"`{0}' cannot be marked as
CLS-compliant because the assembly is not marked as CLS-compliant",
GetSignatureForError ());
+ return false;
}
- return false;
+
+ if (!Parent.IsClsComplianceRequired ()) {
+ Report.Warning (3018, 1, Location,
"`{0}' cannot be marked as CLS-compliant because it is a member of non
CLS-compliant type `{1}'",
+ GetSignatureForError (),
Parent.GetSignatureForError ());
+ return false;
+ }
}
if (member_name.Name [0] == '_') {
Modified: trunk/mcs/mcs/report.cs
===================================================================
--- trunk/mcs/mcs/report.cs 2006-11-22 18:34:17 UTC (rev 68360)
+++ trunk/mcs/mcs/report.cs 2006-11-22 19:19:33 UTC (rev 68361)
@@ -84,7 +84,7 @@
1717, 1718, 1720,
1901,
2002, 2023,
- 3005, 3012, 3019, 3021, 3022, 3023, 3026, 3027,
+ 3005, 3012, 3018, 3019, 3021, 3022, 3023, 3026, 3027,
#if GMCS_SOURCE
402, 414, 693, 1058, 1700, 3024
#endif
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches