Type inference broken?

Imagine I want to use the return type of a function to define an output array of that type.

The following describes how this is handled generally in Base to have inference-independent behavior (except for empty arrays), avoiding what @mauro3 pointed above. Granted, it won’t be generally inferable but it will give you a tight element-typed-array when not inferable.

1 Like