A typo: or simply: case Point(int x {if (x > 0)}, int y {y > x}): should read as: or simply: case Point(int x {x > 0}, int y {y > x}):