Infer subtyping constraints