interface IPoint def sum as int struct Point implements IPoint enum TypeEnum Black White shared var _numCreations as int get numCreations from var var _x as int var _y as int var _type as TypeEnum cue init(x as int, y as int) _x = x _y = y _type = TypeEnum.Black _numCreations += 1 get x from var get y from var def sum as int return .x + .y pro type from var pro [i as int] as int get return i * 2 set pass class Test def main is shared assert Point.numCreations == 0 p = Point(1, 2) assert p.x == 1 assert p.y == 2 assert p.sum == 3 assert p[2] == 4 p[4] = 10 assert Point.numCreations == 1