class Test var _x as int cue init(x as int) base.init _x = x get x from var def equals(t as Test) as bool return .x == t.x def equals(obj as Object?) as bool is override assert false # to verify that this method is not invoked return false def getHashCode as int is override return _x.getHashCode def main is shared a = Test(1) b = Test(2) c = Test(1) assert a == c assert a <> b