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 part of #24166: bug in diagonal typevars on the right #24174

Merged
merged 1 commit into from
Oct 17, 2017

Conversation

JeffBezanson
Copy link
Member

The first problem is a case like this:

(Tuple{T, T, Ref{T}} where T)  <:  (Tuple{S, S, Ref{Q} where Q} where S)

where S is diagonal but T is not. S is more constrained so this should be false. This is fixed by adding a check that a var (T) appearing as the lower bound of a diagonal var (S) must itself be diagonal.

The second problem is this:

(Tuple{T, T} where T>:Int)  <:  (Tuple{S, S} where S>:Int)

Though this seems absurd, the issue is that S's lower bound comes out to Union{T,Int} which we then think is not concrete. Determining whether a lower bound is concrete enough is still an open problem, but I put a band-aid on this by simplifying Union{T,S} given T>:S to T.

@JeffBezanson JeffBezanson added bugfix This change fixes an existing bug types and dispatch Types, subtyping and method dispatch labels Oct 16, 2017
also put a band-aid on reflexivity of diagonal vars
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant