Use diamond inference for hashmap