Author: martin
Date: 2005-04-12 16:52:59 -0400 (Tue, 12 Apr 2005)
New Revision: 42874

Modified:
   trunk/mcs/gmcs/ChangeLog
   trunk/mcs/gmcs/class.cs
   trunk/mcs/gmcs/ecore.cs
   trunk/mcs/gmcs/expression.cs
Log:
**** Merged r40980 from MCS ****


Modified: trunk/mcs/gmcs/ChangeLog
===================================================================
--- trunk/mcs/gmcs/ChangeLog    2005-04-12 20:35:10 UTC (rev 42873)
+++ trunk/mcs/gmcs/ChangeLog    2005-04-12 20:52:59 UTC (rev 42874)
@@ -1,3 +1,9 @@
+2005-02-21  Marek Safar  <[EMAIL PROTECTED]>
+
+       * ecore.cs (PropertyExpr.DoResolve): Add error 214 report.
+       
+       * class.cs (Operator.Define): Add error 217 report.
+       
 2005-02-21  Raja R Harinath  <[EMAIL PROTECTED]>
 
        * namespace.cs (UsingEntry.Resolve): Undo change below.

Modified: trunk/mcs/gmcs/class.cs
===================================================================
--- trunk/mcs/gmcs/class.cs     2005-04-12 20:35:10 UTC (rev 42873)
+++ trunk/mcs/gmcs/class.cs     2005-04-12 20:52:59 UTC (rev 42874)
@@ -7914,6 +7914,13 @@
                                }
                                
                        } else {
+                               if (OperatorType == OpType.BitwiseAnd && 
+                                       (first_arg_type != return_type || 
first_arg_type != parameter_types [1])) {
+                                       Report.Error (217, Location, "In order 
to be applicable as a short circuit operator a user-defined logical operator 
('{0}') " +
+                                               "must have the same return type 
as the type of its 2 parameters", GetSignatureForError ());
+                                       return false;
+                               }
+
                                // Checks for Binary operators
                                
                                if (first_arg_type != declaring_type &&

Modified: trunk/mcs/gmcs/ecore.cs
===================================================================
--- trunk/mcs/gmcs/ecore.cs     2005-04-12 20:35:10 UTC (rev 42873)
+++ trunk/mcs/gmcs/ecore.cs     2005-04-12 20:52:59 UTC (rev 42874)
@@ -3411,6 +3411,11 @@
                                return null;
                        }
 
+                       if (PropertyInfo.PropertyType.IsPointer && 
!ec.InUnsafe){
+                               UnsafeError (loc);
+                               return null;
+                       }
+
                        return this;
                }
 

Modified: trunk/mcs/gmcs/expression.cs
===================================================================
--- trunk/mcs/gmcs/expression.cs        2005-04-12 20:35:10 UTC (rev 42873)
+++ trunk/mcs/gmcs/expression.cs        2005-04-12 20:52:59 UTC (rev 42874)
@@ -7767,7 +7767,7 @@
                                       TypeManager.CSharpName (expr_type) + 
")");
                                return null;
                        }
-                       
+
                        Expression member_lookup = MemberLookup (ec, expr_type, 
expr_type, lookup_id, loc);
                        if (member_lookup == null) {
                                int errors = Report.Errors;

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

Reply via email to