Let X and Y two smooth closed subschemes of a smooth projective scheme Z over a field.

Let $W:=X\cap Y$.

I suppose that W is non empty and that the intersection of X and Y is non proper, i.e

codim(W)< codim (X) +codim(Y).

Does W necessarily have singularities?