Emit warning if top level has type != unit.