Author: martin
Date: 2005-04-15 04:56:06 -0400 (Fri, 15 Apr 2005)
New Revision: 43035

Modified:
   trunk/mcs/gmcs/ChangeLog
   trunk/mcs/gmcs/class.cs
   trunk/mcs/gmcs/cs-tokenizer.cs
Log:
**** Merged r41529 from MCS ****


Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog    2005-04-15 08:55:44 UTC (rev 43034)
+++ trunk/mcs/gmcs/ChangeLog    2005-04-15 08:56:06 UTC (rev 43035)
@@ -1,3 +1,10 @@
+2005-03-07  Marek Safar  <[EMAIL PROTECTED]>
+
+       * cs-tokenizer.cs (xtoken): Add CS1035.
+       
+       * class.cs (MethodData.Define): Add CS0683.
+       (FieldMember.ctor): Add CS0681.
+
 2005-03-07  Raja R Harinath  <[EMAIL PROTECTED]>
 
        * ecore.cs (SimpleName.DoResolve): Rename from

Modified: trunk/mcs/gmcs/class.cs
===================================================================
--- trunk/mcs/gmcs/class.cs     2005-04-15 08:55:44 UTC (rev 43034)
+++ trunk/mcs/gmcs/class.cs     2005-04-15 08:56:06 UTC (rev 43035)
@@ -4975,10 +4975,17 @@
                                                }
                                                return false;
                                        }
+                                       if (implementing.IsSpecialName && 
!((member is PropertyBase || member is EventProperty))) {
+                                               
Report.SymbolRelatedToPreviousError (implementing);
+                                               Report.Error (683, 
method.Location, "'{0}' explicit method implementation cannot implement '{1}' 
because it is an accessor",
+                                                       
member.GetSignatureForError (), TypeManager.CSharpSignature (implementing));
+                                               return false;
+                                       }
+                                       method_name = 
member.InterfaceType.FullName + "." + name;
                                } else {
                                        if (implementing != null && method is 
AbstractPropertyEventMethod && !implementing.IsSpecialName) {
                                                
Report.SymbolRelatedToPreviousError (implementing);
-                                               Report.Error (688, 
method.Location, "Accessor '{0}' cannot implement interface member '{1}' for 
type '{2}'. Use an explicit interface implementation",
+                                               Report.Error (686, 
method.Location, "Accessor '{0}' cannot implement interface member '{1}' for 
type '{2}'. Use an explicit interface implementation",
                                                        
method.GetSignatureForError (container), TypeManager.CSharpSignature 
(implementing), container.GetSignatureForError ());
                                                return false;
                                        }
@@ -5733,12 +5740,12 @@
 
        public abstract class FieldMember: FieldBase
        {
-               
-
                protected FieldMember (TypeContainer parent, Expression type, 
int mod,
                        int allowed_mod, MemberName name, object init, 
Attributes attrs, Location loc)
-                       : base (parent, type, mod, allowed_mod, name, init, 
attrs, loc)
+                       : base (parent, type, mod, allowed_mod | 
Modifiers.ABSTRACT, name, init, attrs, loc)
                {
+                       if ((mod & Modifiers.ABSTRACT) != 0)
+                               Report.Error (681, loc, "The modifier 
'abstract' is not valid on fields. Try using a property instead");
                }
 
                public override void ApplyAttributeBuilder(Attribute a, 
CustomAttributeBuilder cb)

Modified: trunk/mcs/gmcs/cs-tokenizer.cs
===================================================================
--- trunk/mcs/gmcs/cs-tokenizer.cs      2005-04-15 08:55:44 UTC (rev 43034)
+++ trunk/mcs/gmcs/cs-tokenizer.cs      2005-04-15 08:56:06 UTC (rev 43035)
@@ -2130,6 +2130,8 @@
                                                        
xml_comment_buffer.Append (Environment.NewLine);
                                                }
 
+                                               Location start_location = 
Location;
+
                                                while ((d = getChar ()) != -1){
                                                        if (d == '*' && 
peekChar () == '/'){
                                                                getChar ();
@@ -2153,6 +2155,9 @@
                                                                comments_seen = 
false;
                                                        }
                                                }
+                                               if (!comments_seen)
+                                                       Report.Error (1035, 
start_location, "End-of-file found, '*/' expected");
+
                                                if (docAppend)
                                                        
update_formatted_doc_comment (current_comment_start);
                                                continue;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to