Commits

Dariusz Luksza  committed 81fdad2

Override hash method in ObjectID

hash method must be overwritten when equals is. This change adds proper
implementation of this method.

  • Participants
  • Parent commits 2341b8b

Comments (0)

Files changed (1)

File fan/ObjectID.fan

             (o as ObjectID).time == this.time)
   }
   
+  override Int hash() {
+    return 31 * (inc.hash.xor(machine.hash) + time.hash)
+  }
+  
   OutStream write(OutStream o)
   {
     return o.writeI4(time).writeI4(machine).writeI4(inc)