Never used to be, unless they have changed their policy.
Rules allow it to be done if it is multi crew and the other pilot is under a certain age, can’t remember what age though. Obviously you still need to be able to pass a class 1 medical.
PX once had the 65 rule and you were out, however I believe they quashed it as a result of crew shortages.