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 #41908, inference error in subst_trivial_bounds #41976

Merged
merged 2 commits into from
Aug 25, 2021
Merged

Conversation

JeffBezanson
Copy link
Member

fix #41908

@JeffBezanson JeffBezanson added bugfix This change fixes an existing bug compiler:inference Type inference backport 1.7 labels Aug 23, 2021
test/compiler/inference.jl Outdated Show resolved Hide resolved
Comment on lines +159 to +167
subst = try
atypes{v.ub}
catch
# Note in rare cases a var bound might not be valid to substitute.
nothing
end
if subst !== nothing
return subst_trivial_bounds(subst)
end
Copy link
Member

Choose a reason for hiding this comment

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

Oh boy, this is a nice example for justifying a

try
catch
else
    # code that runs when no exception was thrown
end

construct. But given that we don't have it, I guess this is fine.

Co-authored-by: Martin Holters <martin.holters@hsu-hh.de>
@JeffBezanson JeffBezanson added the merge me PR is reviewed. Merge when all tests are passing label Aug 24, 2021
@JeffBezanson JeffBezanson merged commit e2aeefb into master Aug 25, 2021
@JeffBezanson JeffBezanson deleted the jb/fix41908 branch August 25, 2021 02:27
@DilumAluthge DilumAluthge removed the merge me PR is reviewed. Merge when all tests are passing label Aug 25, 2021
KristofferC pushed a commit that referenced this pull request Aug 25, 2021
Co-authored-by: Martin Holters <martin.holters@hsu-hh.de>
(cherry picked from commit e2aeefb)
@vtjnash vtjnash added the backport 1.6 Change should be backported to release-1.6 label Oct 4, 2021
KristofferC pushed a commit that referenced this pull request Oct 29, 2021
Co-authored-by: Martin Holters <martin.holters@hsu-hh.de>
(cherry picked from commit e2aeefb)
KristofferC pushed a commit that referenced this pull request Nov 11, 2021
Co-authored-by: Martin Holters <martin.holters@hsu-hh.de>
(cherry picked from commit e2aeefb)
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label Nov 13, 2021
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Feb 22, 2022
…ng#41976)

Co-authored-by: Martin Holters <martin.holters@hsu-hh.de>
LilithHafner pushed a commit to LilithHafner/julia that referenced this pull request Mar 8, 2022
…ng#41976)

Co-authored-by: Martin Holters <martin.holters@hsu-hh.de>
staticfloat pushed a commit that referenced this pull request Dec 23, 2022
Co-authored-by: Martin Holters <martin.holters@hsu-hh.de>
(cherry picked from commit e2aeefb)
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 compiler:inference Type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

julia type inference crashes (typeerror)
5 participants