Type inference for return types?

Outside of method signatures it makes more sense to think of the :: operator as an assertion, i.e. you might want to make sure a method throws an exception rather than returning the wrong type.

2 Likes