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

Multiplication broken on Julia 0.6 #170

Open
dpsanders opened this issue Jan 26, 2017 · 4 comments
Open

Multiplication broken on Julia 0.6 #170

dpsanders opened this issue Jan 26, 2017 · 4 comments

Comments

@dpsanders
Copy link
Contributor

julia> a = Vec(1.0, 2.0)
Vec(1.0,2.0)

julia> 2a
ERROR: type TypeName has no field primary
Stacktrace:
 [1] promote_type_nested(::Type{T} where T<:Tuple) at /Users/dpsanders/.julia/v0.6/FixedSizeArrays/src/core.jl:181
 [2] construct_similar(...) at /Users/dpsanders/.julia/v0.6/FixedSizeArrays/src/core.jl:230
 [3] macro expansion at /Users/dpsanders/.julia/v0.6/FixedSizeArrays/src/mapreduce.jl:81 [inlined]
 [4] map at /Users/dpsanders/.julia/v0.6/FixedSizeArrays/src/mapreduce.jl:119 [inlined]
 [5] *(::Int64, ::FixedSizeArrays.Vec{2,Float64}) at /Users/dpsanders/.julia/v0.6/FixedSizeArrays/src/ops.jl:95

julia> versioninfo()
Julia Version 0.6.0-dev.2375
Commit 1303dfb96* (2017-01-26 06:59 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin16.0.0)
  CPU: Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.9.1 (ORCJIT, haswell)
@krcools
Copy link

krcools commented Feb 20, 2017

I see the same thing on 0.6-dev trying to compute the minimum of two Vecs:

julia> using FixedSizeArrays
julia> p1  = Vec(1.0,2.0,3.0)
Vec(1.0,2.0,3.0)
julia> p2 = Vec(1.0,3.0,2.0)
Vec(1.0,3.0,2.0)
julia> min(p1,p2)
ERROR: type TypeName has no field primary
Stacktrace:
 [1] promote_type_nested(::Type{T} where T<:Tuple) at C:\Users\ezzkc\.julia\v0.6\FixedSizeArrays\src\core.jl:181
 [2] construct_similar(...) at C:\Users\ezzkc\.julia\v0.6\FixedSizeArrays\src\core.jl:230
 [3] macro expansion at C:\Users\ezzkc\.julia\v0.6\FixedSizeArrays\src\mapreduce.jl:81 [inlined]
 [4] map at C:\Users\ezzkc\.julia\v0.6\FixedSizeArrays\src\mapreduce.jl:113 [inlined]
 [5] min(::FixedSizeArrays.Vec{3,Float64}, ::FixedSizeArrays.Vec{3,Float64}) at C:\Users\ezzkc\.julia\v0.6\FixedSizeArrays\src\ops.jl:81

@SimonDanisch
Copy link
Owner

I should probably add a note, that FixedSizeArrays is 0.5 only right now...
The plan is to switch to StaticArrays for 0.6!

@diegozea
Copy link

diegozea commented Oct 9, 2017

It's also broken for sum. Thanks, I will move to StaticArrays then...

julia> points[1]
Coordinates(-4.164,-44.953,-1.712)

julia> points[1] + points[1]
ERROR: type TypeName has no field primary
Stacktrace:
 [1] promote_type_nested(::Type{T} where T<:Tuple) at /home/dzea/.julia/v0.6/FixedSizeArrays/src/core.jl:181
 [2] construct_similar(...) at /home/dzea/.julia/v0.6/FixedSizeArrays/src/core.jl:230
 [3] macro expansion at /home/dzea/.julia/v0.6/FixedSizeArrays/src/mapreduce.jl:81 [inlined]
 [4] map at /home/dzea/.julia/v0.6/FixedSizeArrays/src/mapreduce.jl:113 [inlined]
 [5] +(::MIToS.PDB.Coordinates, ::MIToS.PDB.Coordinates) at /home/dzea/.julia/v0.6/FixedSizeArrays/src/ops.jl:81

@SimonDanisch
Copy link
Owner

Yeah, FixedSIzeArrays is pretty much deprecated.. If you use the FixedSizeArrays module in StaticArrays, the move should be pretty smooth!
Maybe I should make one last release and just warn people to not use FixedSizeArrays anymore...

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

No branches or pull requests

4 participants