ComputeConstants will also ensure that types are correctly resolved.