Skip to content
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

Type weirdness in division of array by scalar (issue #14725 in julia) #198

Closed
bshall opened this issue May 29, 2017 · 0 comments
Closed

Comments

@bshall
Copy link
Contributor

bshall commented May 29, 2017

After the fix from JuliaLang/julia#14725 the element type of a = Number[2, 2.0, 4//2, 2+0im] / 2 is Number but in StaticArrays you get

eltype(SVector{4, Number}(2, 2.0, 4//2, 2+0im) / 2) == Any

I guess it's just some promotion rules.

wsshin added a commit to wsshin/StaticArrays.jl that referenced this issue Aug 8, 2017
wsshin added a commit to wsshin/StaticArrays.jl that referenced this issue Aug 8, 2017
wsshin added a commit to wsshin/StaticArrays.jl that referenced this issue Aug 8, 2017
@c42f c42f closed this as completed in e45d995 Aug 11, 2017
c42f added a commit that referenced this issue Nov 1, 2017
With this approach based on the eltype of tuple of computed elements, we
get the correct dynamic result independently of whether inference can
infer the return type.

This fixes #198, and partially addresses #329 but breaks a previous test
case.
c42f added a commit that referenced this issue Nov 3, 2017
With this approach based on the eltype of tuple of computed elements, we
get the correct dynamic result independently of whether inference can
infer the return type.

This fixes some of the residual issues from #198.
oschulz pushed a commit to oschulz/StaticArrays.jl that referenced this issue Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant