It is forbidden to eat something which is forbidden in order to avoid a bigger problem.
Explanation:
The Gemara in Gittin 84a writes: A man who says to his wife, “I am giving you this Get on condition that you lay with Mr. X” If she does it then the Get works, if not it isn’t a Get. The Gemara says that if the woman lays with Mr. X the get is good but it does not say if she is permitted for her to do that. She is right now a married woman and if she lays with him then she will not be.
The Rashba says she is not allowed lay with him since she isn’t divorced until she lays with him, therefore the beginning of the action is forbidden since she is married. (Not like the Tur who quotes the Rashba that since on condition is like saying “from now” and therefore if she lays with him then she is divorced from when the husband gave her the Get and therefore she is not married when she laid with him. The Rashba only says that it is a possibility.)The Rashba bases himself on Yerushalmi. He asks why is it forbidden? If he fulfills the condition then she will be divorced from the time he gave the Get and retroactively she will not have been married? He answers “On Condition” is not like saying “From Now and she will not be divorced retroactively but from when she fulfills the condition. The Yerushalmi however itself says that she is divorced retroactively, so it is a contradiction.
The Ktav Sofer answers that we are worried she will not complete condition properly and since she will be married until she completes the act then it may not happen.
R’ Shmuel Rosovsky answers that according to the Maggid Mishna that even if she is divorced retroactively, as long as the condition has not been fulfilled she is considered married. The fore the Yerushalmi says that it can’t undo the fact that when she did the act she was married; it is not time travel.
The Tosfot Rid though is of the opinion that she is allowed to fulfill the conditions in her divorce and her action happen simultaneously. So anyone who sys ‘On condition it is as if he said, “From Now” and she wasn’t married retroactively.
So rules the Shulchan Aruch (EH 38).
The Shulchan Aruch (EH 143:18) writes: if he says (this is your Get) on condition you lay with Mr. X. If she fulfills the condition, whether she marries hi or not, its s a good Get and she is divorced. Ideally she is not allowed to lay with him since she is not divorced until she does so the beginners is forbidden. We see we do not say to person do an Aveirah even fi afterwards it wil not be an Aveirah.
our case since she has more time to fulfill the condition after the prohibition passes. Also since if you eat it now then you will transgress a prohibition , even though afterwards you will not transgress it retroactively, it is forbidden to do that. Even though one is a lighter prohibition compared to the other, it is not permitted.