Learn English – “I was doing something” with present perfect

past-simplepresent-perfect

Yesterday I posted this message on an online forum:

I've fixed that bug while I was reviewing the code.

But I'm not sure it's correct. I understand that I was reviewing the code is a finished event and the act of fixing the bug is finished as well, but its consequences affect the present (something is now working because a bug no longer exists).

Is my reasoning correct or should I always use simple past when I was doing something is in the same sentence (or context)?

Best Answer

Better use the past simple and the past continuous tenses in the sentence. The past continuous describes a longer, ‘background’ action and the past simple describes a short action. The correct sentence is:

I fixed the bug while I was reviewing the code.

Related Topic