-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Incorrectly Inferred Return type #30394
Labels
bug
Indicates an unexpected problem or unintended behavior
Comments
JeffBezanson
added a commit
that referenced
this issue
Dec 14, 2018
This fixes a corner case where a bug is caused, counter-intuitively, by an over-estimated intersection. We have method signatures A and B, with A<B (A is a strict subtype). We have a dispatch tuple X, where X<:B and !(X<:A). However, intersection returns X for intersect(X,A). Since there appears to be a match there and A<B, ml_matches skips the match with B. The fix just requires dispatch tuples to be a subtype of a signature in order to match at all.
KristofferC
pushed a commit
that referenced
this issue
Dec 20, 2018
This fixes a corner case where a bug is caused, counter-intuitively, by an over-estimated intersection. We have method signatures A and B, with A<B (A is a strict subtype). We have a dispatch tuple X, where X<:B and !(X<:A). However, intersection returns X for intersect(X,A). Since there appears to be a match there and A<B, ml_matches skips the match with B. The fix just requires dispatch tuples to be a subtype of a signature in order to match at all. (cherry picked from commit b167bc2)
KristofferC
pushed a commit
that referenced
this issue
Dec 30, 2018
This fixes a corner case where a bug is caused, counter-intuitively, by an over-estimated intersection. We have method signatures A and B, with A<B (A is a strict subtype). We have a dispatch tuple X, where X<:B and !(X<:A). However, intersection returns X for intersect(X,A). Since there appears to be a match there and A<B, ml_matches skips the match with B. The fix just requires dispatch tuples to be a subtype of a signature in order to match at all. (cherry picked from commit b167bc2)
KristofferC
pushed a commit
that referenced
this issue
Feb 4, 2019
This fixes a corner case where a bug is caused, counter-intuitively, by an over-estimated intersection. We have method signatures A and B, with A<B (A is a strict subtype). We have a dispatch tuple X, where X<:B and !(X<:A). However, intersection returns X for intersect(X,A). Since there appears to be a match there and A<B, ml_matches skips the match with B. The fix just requires dispatch tuples to be a subtype of a signature in order to match at all. (cherry picked from commit b167bc2)
KristofferC
pushed a commit
that referenced
this issue
Feb 11, 2019
This fixes a corner case where a bug is caused, counter-intuitively, by an over-estimated intersection. We have method signatures A and B, with A<B (A is a strict subtype). We have a dispatch tuple X, where X<:B and !(X<:A). However, intersection returns X for intersect(X,A). Since there appears to be a match there and A<B, ml_matches skips the match with B. The fix just requires dispatch tuples to be a subtype of a signature in order to match at all. (cherry picked from commit b167bc2)
KristofferC
pushed a commit
that referenced
this issue
Apr 20, 2019
This fixes a corner case where a bug is caused, counter-intuitively, by an over-estimated intersection. We have method signatures A and B, with A<B (A is a strict subtype). We have a dispatch tuple X, where X<:B and !(X<:A). However, intersection returns X for intersect(X,A). Since there appears to be a match there and A<B, ml_matches skips the match with B. The fix just requires dispatch tuples to be a subtype of a signature in order to match at all. (cherry picked from commit b167bc2)
KristofferC
pushed a commit
that referenced
this issue
Feb 20, 2020
This fixes a corner case where a bug is caused, counter-intuitively, by an over-estimated intersection. We have method signatures A and B, with A<B (A is a strict subtype). We have a dispatch tuple X, where X<:B and !(X<:A). However, intersection returns X for intersect(X,A). Since there appears to be a match there and A<B, ml_matches skips the match with B. The fix just requires dispatch tuples to be a subtype of a signature in order to match at all. (cherry picked from commit b167bc2)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From Discourse
Example code:
On Julia 0.6.2, the output is:
The
typeof
line showsobj2
is of typeFoo2
, butcode_warntype
infers it to beFoo3
. Similar result on Julia 1.0.1.The text was updated successfully, but these errors were encountered: