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

NTuple does not like unsigned integers #11967

Closed
Keno opened this issue Jul 1, 2015 · 4 comments · Fixed by #11969
Closed

NTuple does not like unsigned integers #11967

Keno opened this issue Jul 1, 2015 · 4 comments · Fixed by #11969

Comments

@Keno
Copy link
Member

Keno commented Jul 1, 2015

This was the cause of a rather frustrating bug I had today:

Ref{NTuple{0x0000000000000004,UInt8}}()
Base.RefValue{NTuple{0x0000000000000004,UInt8}}(#undef)
@yuyichao
Copy link
Contributor

yuyichao commented Jul 1, 2015

We should really have a warning or error if the first parameter is not an Int (or whatever not recognized....)

@Keno Keno changed the title NTuple does not link unsigned integers NTuple does not like unsigned integers Jul 1, 2015
@yuyichao
Copy link
Contributor

yuyichao commented Jul 1, 2015

In fact, it doesn't like anything other than Int.

julia> NTuple{1, Int} == Tuple{Int}
true

julia> NTuple{Int32(1), Int} == Tuple{Int}
false

@yuyichao
Copy link
Contributor

yuyichao commented Jul 1, 2015

Ref #9233

@ScottPJones
Copy link
Contributor

Why can't NTuple be made to accept any Unsigned as well as Integer?
Unsigned even makes more sense, conceptually, than Integer, for a length parameter.

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.

3 participants