!7 sclass X { S value; *() {} *(S *value) {} } p { Hasher hasher = new Hasher() { public int hashCode(X o) { ret _hashCode(o.value); } public bool equals(X a, X b) { ret a == null ? b == null : b != null && eq(a.value, b.value); } }; WeakHasherMap map = new(hasher); X x1 = X("hello"); map.put(x1, true); gc(); assertTrue(map.get(new X("hello"))); assertNull(map.get(new X("world"))); assertSame(x1, map.findKey(new X("hello"))); assertNull(map.findKey(new X("world"))); print("OK"); }