[folks/wip/nielsdg/fix-vala-master] Don't use "with" as identifier



commit dc85008ff020d212f34c5979418c7a83a970f822
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Thu Jun 4 10:53:48 2020 +0200

    Don't use "with" as identifier
    
    The latest Vala compiler adds `with` as a new keyword. That means that
    suddenly, all Vala code using "with" as an identifier can suddenly
    break. Even funnier, if you expose this in a VAPI (like folks does),
    then all the projects that depend on it will also fail to build :-)
    
    Probably this should be guarded more properly by `valac`, but let's be a
    bit lenient on our side and just rename the variable.

 folks/postal-address-details.vala | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/folks/postal-address-details.vala b/folks/postal-address-details.vala
index f08d874e..31ae3467 100644
--- a/folks/postal-address-details.vala
+++ b/folks/postal-address-details.vala
@@ -201,19 +201,19 @@ public class Folks.PostalAddress : Object
    *
    * This does not factor in the {@link PostalAddress.uid}.
    *
-   * @param with another postal address to compare with
+   * @param other another postal address to compare with
    * @return ``true`` if the addresses are equal, ``false`` otherwise
    */
-  public bool equal (PostalAddress with)
+  public bool equal (PostalAddress other)
     {
-      if (this.po_box != with.po_box ||
-          this.extension != with.extension ||
-          this.street != with.street ||
-          this.locality != with.locality ||
-          this.region != with.region ||
-          this.postal_code != with.postal_code ||
-          this.country != with.country ||
-          this.address_format != with.address_format)
+      if (this.po_box != other.po_box ||
+          this.extension != other.extension ||
+          this.street != other.street ||
+          this.locality != other.locality ||
+          this.region != other.region ||
+          this.postal_code != other.postal_code ||
+          this.country != other.country ||
+          this.address_format != other.address_format)
         return false;
 
       return true;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]