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

subtyping bug in rule for var <: T #26131

Closed
JeffBezanson opened this issue Feb 20, 2018 · 0 comments
Closed

subtyping bug in rule for var <: T #26131

JeffBezanson opened this issue Feb 20, 2018 · 0 comments
Assignees
Labels
domain:types and dispatch Types, subtyping and method dispatch kind:bug Indicates an unexpected problem or unintended behavior

Comments

@JeffBezanson
Copy link
Sponsor Member

Found by @julbinb:

julia> Vector{Vector{Number}}  <:
           Vector{Union{Vector{Number}, Vector{S}}} where S<:Integer
true

The cause is in the function var_lt. A comment there claims that updating bb->ub = a instead of bb->ub = meet(bb->ub, a) is correct, but it turns out not to be. It should be possible to fix this for many practical cases by defining a simple_meet (to go with simple_join) and using it here.

@JeffBezanson JeffBezanson added kind:bug Indicates an unexpected problem or unintended behavior domain:types and dispatch Types, subtyping and method dispatch labels Feb 20, 2018
@JeffBezanson JeffBezanson self-assigned this Apr 3, 2018
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:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

1 participant