My professor has told us that it is mathematically incorrect to evaluate complex Gaussians using well-established formulas for the reals. For example, the professor says that it is incorrect to evaluate $$ \int_{-\infty}^{\infty} \mathrm e^{-iax^2} \mathrm dx $$ by setting $\alpha \equiv ia$ and using the formula $$ \int_{-\infty}^{\infty} \mathrm e^{-\alpha x^2} \mathrm dx = \sqrt{\frac{\pi}{\alpha}}. $$ Nevertheless, if I carry out the procedure anyway and then compare $1/i = -i$ to $\exp(2i\theta)$, I obtain the correct complex factor, namely, $\exp(-i\pi/4)$. My final answer is then $$ \mathrm e^{-i\pi/4} \sqrt{\frac{\pi}{a}} $$
Assuming the professor is correct, why is it so?