-
Notifications
You must be signed in to change notification settings - Fork 152
Fixing constructors from 0-element arrays #831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing constructors from 0-element arrays #831
Conversation
|
That failure looks like a Julia 1.0 bug and I don't see an obvious way to work around it 😕 . |
|
Apart from not solving the problem of converting empty |
c42f
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ack, sorry for the delay in replying to this. I'm a little unsure about this solution in the sense that it requires a new constructor for each StaticArray subtype. I feel like that shouldn't be necessary...
However, I also know that the generic dispatch for StaticArray constructors is quite hairy and hard to modify and that this does fix the bugs. So I think on balance we should just go with it.
(Regarding 1.0 - at this point it's basically EOL and I'm looking forward to removing support for it once 1.6 (or 1.7?) is declared the new LTS. So I'm not too worried about that.)
Co-authored-by: Chris Foster <chris42f@gmail.com>
After working with this a bit I feel that a part of hairiness of static array constructors is trying to define things for all subtypes of |
Maybe not the prettiest solution but still fixes #557 and #782.