Could one have a function $f(x,y)$ s.t. it is increasing along the line $x=y$ but the partial derivatives $\frac{\partial f(x,y)}{\partial y} = \frac{\partial f(x,y)}{\partial x} = 0$ on every point on that line.
Essentially this would amount to every point on that line being a saddle point.
The function is differentiable everywhere.