Skip to main content

upper_bound

Function upper_bound 

Source
pub fn upper_bound(
    ir: &mut Ir,
    ctx: &TypeContext,
    type_exprs: &[InstId],
) -> InstId
Expand description

Computes the upper bound (least common supertype) of a set of type expressions.

Flattens unions, eliminates redundant types via SetConforms, returns single type or Union. Returns EmptyType for empty input, /any if any input is /any.