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 #26131, unsound updating of variable upper bounds in subtyping #26737

Merged
merged 1 commit into from
May 28, 2018

Conversation

JeffBezanson
Copy link
Sponsor Member

No description provided.

@JeffBezanson JeffBezanson added domain:types and dispatch Types, subtyping and method dispatch kind:bugfix This change fixes an existing bug labels Apr 6, 2018
if (jl_subtype(a, b)) return a;
if (jl_subtype(b, a)) return b;
}
return b;
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Would it make sense to use an arbitrary total ordering on types to consistently decide which one of a and b to return in this case? It seems like it might be beneficial if simple_meet(a, b) == simple_meet(b, a) was guaranteed.

Copy link
Sponsor Member Author

Choose a reason for hiding this comment

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

Perhaps, but I think for now developing such an ordering is more trouble than it's worth. Presumably the ordering would be structural, which means that substituting an equal type with a different representation can still change results, which is not all that different from just picking the second argument here. We have also gotten by pretty well with just simple_meet(a,b) = b :)

@JeffBezanson JeffBezanson merged commit 376c1f8 into master May 28, 2018
@JeffBezanson JeffBezanson deleted the jb/simplemeet branch May 28, 2018 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:types and dispatch Types, subtyping and method dispatch kind:bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants