"The constraint shouldn't contain different type variables on both sides: T <: R".
It occurred because we analyzed function literals before completion with unsubstituted (therefore wrong) expected type, and cached resulting type.
For parameter type T constraint T? <: Int? should NOT transform to T <: Int, it should be T <: Int?
equality constraint T? = Int? should transform to T <: Int? && T >: Int