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

fix #28915, identity conversion to union of tuple types #28951

Merged
merged 1 commit into from
Sep 4, 2018

Conversation

JeffBezanson
Copy link
Sponsor Member

The problem here was that a definition for converting to Type{T} where T<:Tuple intercepts unions of tuple types, which might not support fieldtype. This is the simplest fix I could come up with. So far I haven't found a way to do it with fewer than 6 definitions (2 for each of 3 "kinds" of tuple types). Alternatively, we could make fieldtype(Union{Tuple{}, Tuple{Int}}, 1) return Int instead of throwing an error. That would be a more invasive change though, so I left it for later.

@KristofferC
Copy link
Sponsor Member

Good to go?

@JeffBezanson JeffBezanson merged commit d4cdde1 into master Sep 4, 2018
@JeffBezanson JeffBezanson deleted the jb/fix28915 branch September 4, 2018 18:43
KristofferC pushed a commit that referenced this pull request Sep 4, 2018
KristofferC pushed a commit that referenced this pull request Sep 8, 2018
KristofferC pushed a commit that referenced this pull request Sep 8, 2018
KristofferC pushed a commit that referenced this pull request Feb 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants