Skip to content

Commit 08d6e97

Browse files
committed
Match Java's boolean hash codes; false not 0
Signed-off-by: James Hamlin <jfhamlin@gmail.com>
1 parent 2f01ed8 commit 08d6e97

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/lang/hashes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ func Hash(x interface{}) uint32 {
7676
return Hash(x.Interface()) ^ reflectValueHashMask
7777
case bool:
7878
if x {
79-
return 1 //1231 // Java's Boolean.TRUE.hashCode()
79+
return 1231 // Java's Boolean.TRUE.hashCode()
8080
}
81-
return 0 //1237 // Java's Boolean.FALSE.hashCode()
81+
return 1237 // Java's Boolean.FALSE.hashCode()
8282
}
8383

8484
switch reflect.TypeOf(x).Kind() {

0 commit comments

Comments
 (0)