Adding diamond inferences to resolve unchecked warnings