We consider a singularly perturbed convection–diffusion equation, $-\varepsilon\Delta u+\bm{v}\cdot\bm{\nabla}u=0$, defined on a rectangular domain $\varOmega\equiv\{(x,y)\mid 0\leq x\leq\pi a,0\leq y\leq\pi\}$, $a>0$, with Dirichlet-type boundary conditions discontinuous at the points $(0,0)$ and $(\pi a,0)$: $u(x,0)=1$, $u(x,\pi)=u(0,y)=u(\pi a,y)=0$. An asymptotic expansion of the solution is obtained from a series representation in two limits, namely when the singular parameter $\varepsilon\to0^+$ (with fixed distance to the points $(0,0)$ and $(\pi a,0)$), and when $(x,y)\to(0,0)$ or $(x,y)\to(\pi a,0)$ (with fixed $\varepsilon$). It is shown that the first term of the expansion at $\varepsilon=0$ contains a linear combination of error functions. This term characterizes the effect of the discontinuities on the $\varepsilon$-behaviour of the solution $u(x,y)$ in the boundary or the internal layers. On the other hand, near the points of discontinuity $(0,0)$ and $(\pi a,0)$, the solution $u(x,y)$ is approximated by a linear function of the polar angle.