summaryrefslogtreecommitdiff
path: root/chapter19/src/test/java/com/seaofnodes
diff options
context:
space:
mode:
Diffstat (limited to 'chapter19/src/test/java/com/seaofnodes')
-rw-r--r--chapter19/src/test/java/com/seaofnodes/simple/Chapter19Test.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/chapter19/src/test/java/com/seaofnodes/simple/Chapter19Test.java b/chapter19/src/test/java/com/seaofnodes/simple/Chapter19Test.java
index 38e9923d..2ef362d6 100644
--- a/chapter19/src/test/java/com/seaofnodes/simple/Chapter19Test.java
+++ b/chapter19/src/test/java/com/seaofnodes/simple/Chapter19Test.java
@@ -47,7 +47,7 @@ return 0;
"""
struct String {
u8[] !cs;
- int _hashCode;
+ int hashCode;
};
val equals = { !String !self, !String s ->
@@ -60,12 +60,12 @@ val equals = { !String !self, !String s ->
};
val hashCode = { !String self ->
- self._hashCode
- ? self._hashCode
- : (self._hashCode = _hashCodeString(self));
+ self.hashCode
+ ? self.hashCode
+ : (self.hashCode = hashCodeString(self));
};
-val _hashCodeString = { !String self ->
+val hashCodeString = { !String self ->
int hash=0;
if( self.cs ) {
for( int i=0; i< self.cs#; i++ )