-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Unions with empty tuple causes error in conversions #28915
Comments
(Great to see you here Austin! :) 👋) |
In this case, the conversion is an identity conversion. Out of curiosity, do you need it to work more generally as well, e.g. |
No, I wouldn't actually need the more general type conversion of Float to Int for my use case. My use case is a small library I built for small fixed-size sets. It is used for datasets consisting of a large number of sets of Integers, but each set is small (cardinality between 0 and 5), and the algorithms perform lots of intersections and set creations. I was abstracting the set structure by these tuples (and keeping them ordered internally), which made the set intersections much faster and removed some of the overhead in instantiating Set{Int64}(). |
Thanks, @JeffBezanson ! |
Minimal working example:
The error is
This error comes up when I want to push tuples of type TupleType to, say, an instance of
Vector{TupleTyple}
.This was not a problem in 0.6.2 but is a problem in 1.0.
julia> versioninfo()
Julia Version 1.0.0
Commit 5d4eaca (2018-08-08 20:58 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin14.5.0)
CPU: Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.0 (ORCJIT, skylake)
The text was updated successfully, but these errors were encountered: