Add type-check test for while.