While "You can't fire me, I quit" may sound good, I agree that I would not quit until:

1. I had a job, or
2. no longer had a job

At least make them pay until the day you have to leave. Also, what was overheard might not be exactly what was said