A test for halides requires the addition of dilute nitric acid followed by an aqueous solution of silver nitrate. The addition of nitric acid is to remove other ions that may give a confusing precipitate with Ag+ such as carbonates. But how does the addition of nitric acid rule out the presence of sulfate? I mean I do not know what nitric acid does to sulfate. If it doesn't do anything, then the addition of the AgNO3 solution in the next step can result in the formation of the white precipitate Ag2SO4 hence this test is not valid unless we are certain of the absence of sulfate ions.
Am I wrong?