-
Notifications
You must be signed in to change notification settings - Fork 152
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
SVector{N,T} only accept Int64 but not Int32 #1233
Comments
I also ran into this problem, unfortunately wasting two hours of my work to find this was the cause. All throughout the julia> length(MVector{6})
6
julia> length(MVector{Cint(6)})
ERROR: TypeError: in typeassert, expected Tuple{Vararg{Union{StaticArraysCore.Dynamic, Int64}}}, got a value of type Tuple{Int32}
Stacktrace:
[1] Size{(6,)}()
@ StaticArraysCore ~/.julia/packages/StaticArraysCore/7xxEJ/src/StaticArraysCore.jl:488
[2] Size(::Type{Tuple{6}})
@ StaticArraysCore ~/.julia/packages/StaticArraysCore/7xxEJ/src/StaticArraysCore.jl:495
[3] Size(::Type{MVector{6}})
@ StaticArraysCore ~/.julia/packages/StaticArraysCore/7xxEJ/src/StaticArraysCore.jl:517
[4] length(a::Type{MVector{6}})
@ StaticArrays ~/.julia/packages/StaticArrays/xEhFV/src/abstractarray.jl:2
[5] top-level scope
@ REPL[9]:1 |
Relaxing julia> Val{Int32(7)} == Val{Int64(7)}
false
That's the current error message IMO. Do you have a specific idea on how to improve it? |
In what way is that an issue? Does the conversion not constant fold? |
Opened an upstream issue: JuliaLang/julia#57189 |
duplicate of #798 |
Maybe
Tuple{Vararg{Union{StaticArraysCore.Dynamic, Int64}}}
can be changed toTuple{Vararg{Union{StaticArraysCore.Dynamic, Integer}}}
? When I use C API, all integers are Cint, i.e. Int32, which requires extra type conversion.The text was updated successfully, but these errors were encountered: