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 compatible_vatuple #50331

Merged
merged 1 commit into from
Jun 28, 2023
Merged

fix compatible_vatuple #50331

merged 1 commit into from
Jun 28, 2023

Conversation

aviatesk
Copy link
Sponsor Member

Seemingly vab has been computed wrongly.

@aviatesk aviatesk requested a review from Keno June 28, 2023 15:07
(isdefined(vaa, :N) == isdefined(vab, :N)) || return false
!isdefined(vaa, :N) && return true
return vaa.N === vab.N
if isdefined(vaa, :N)
Copy link
Member

Choose a reason for hiding this comment

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

Not really a fan of all the nesting levels. if the comparison of the isdefineds is confusing, maybe

if !isdefined(vaa, :N)
    return isdefined(vab, :N)
end
isdefined(vab, :N) || return false
return vaa.N == vab.N

?

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.

I thought about improving the :nothrow-effect analysis in the future by propagating, say, Defined lattice element from isdefined, that has a similar design as Conditional. I believe it's feasible to accomplish it using the pattern you've suggested, so I intend to adopt your style.

Copy link
Member

@Keno Keno left a comment

Choose a reason for hiding this comment

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

whoops

@Keno
Copy link
Member

Keno commented Jun 28, 2023

Would be good to have a test for this - ideally an integration test that reaches it, but if not, I think a unit test is fine.

@oscardssmith oscardssmith added the kind:bugfix This change fixes an existing bug label Jun 28, 2023
Seemingly `vab` has been computed wrongly.
@Keno Keno merged commit 4e0da0d into master Jun 28, 2023
4 of 6 checks passed
@Keno Keno deleted the avi/compatible_vatuple branch June 28, 2023 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants