SE-0244: Opaque Result Types (reopened)

I'll just add that "some Shape" by itself not working as a type is a bit strange at first glance, and that if the compiler was to helpfully suggest that you write "some Shape from <function>" to disambiguate it would make the concept of an opaque type easier to grasp to the uninitiated. Perhaps you won't need it often, but it'd be a good teaching tool.

4 Likes