Is expression evaluated before assigning type?

I am assigning type to an $$\lambda$$-expression: if false then M else N where if A then B else C and false have their usual meanings (read: not specified).

The problem arises because M and N have different types. While clearly the expression evaluates to N & hence should be assigned type(N) but apparently it is expected that for if-else, the types for B & C should be same.

How to proceed on this? Should I use conjuncted type?

• What do you mean by conjuncted type? – Potato44 Mar 30 at 12:00
• I may have used the word "conjunction" incorrectly. I'm referring to this answer – Sudutt Harne Mar 31 at 17:41
• That sounds like intersection types. Do you also have union types? – Potato44 Mar 31 at 17:42
• No, I don't think we have covered them yet. – Sudutt Harne Mar 31 at 17:46