I have a check engine light on the car and in the past it has been bad gas or a vacuum leak. Dealer says on toyota that is not possible.
You need to get the code read and post the actual code here, then you can expect to get some help. Many auto parts stores will read the codes for free.
What keith said.
The dealer said what is not possible? If you think this will be warranty work find another dealer shop. That is among the dumbest things I’ve heard even from someone at a dealership.
There is something wrong with the dealer statement. Maybe you got it wrong or maybe the dealer is really really dumb. As noted, check to see if you are still under warranty and if so, find another dealer.