If you supply the init keyword to sum, inference works. To me this suggests the problem is that sum is not able to infer which type it should use for initialization.
If you supply the init keyword to sum, inference works. To me this suggests the problem is that sum is not able to infer which type it should use for initialization.