LineIntegrate[{x^2, -y}, {x, y} \[Element] Line[{{-1, -1}, {-1, 1}, {1, 1}, {1, -1}, {-1, -1}}]]
LineIntegrate[{y^2, -x}, {x, y} \[Element] Line[{{-1, -1}, {-1, 1}, {1, 1}, {1, -1}, {-1, -1}}]]
(* 0 *)
(* 4 *)
I tried with Maple 2024 gave me the same answers.