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

some generally-applicable changes from #16622 #17214

Merged
merged 6 commits into from
Jul 1, 2016
Merged

some generally-applicable changes from #16622 #17214

merged 6 commits into from
Jul 1, 2016

Conversation

JeffBezanson
Copy link
Member

No description provided.

@@ -1269,7 +1269,6 @@ function tmerge(typea::ANY, typeb::ANY)
if isa(typea, DataType) && isa(typeb, DataType) && length(typea.parameters) == length(typeb.parameters) && !isvatuple(typea) && !isvatuple(typeb)
return typejoin(typea, typeb)
end
return Tuple
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did something change such that the fix for #6704 isn't useful anymore? Tuples must widen really fast or inference can get stuck trying to infer some really bad cases. (IIUC, you are finding that the lack of a recursive version of this test causes #14743 (comment))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. We need to do something here, so that it's possible to infer the result of (tup::Union{Tuple{Bool}, Tuple{Bool,Int}})[1]. Maybe allow a max of only 2 tuple types in a union?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I found a good more conservative version of this that doesn't affect performance on #6704.

@JeffBezanson JeffBezanson merged commit 7a95d57 into master Jul 1, 2016
@tkelman tkelman deleted the jb/misc branch July 1, 2016 07:13
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 this pull request may close these issues.

2 participants