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 bug in vec_recycle_common() #1701

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Fix bug in vec_recycle_common() #1701

merged 2 commits into from
Apr 17, 2024

Conversation

teunbrand
Copy link
Contributor

This PR aims to fix #1700.

It restores an error that should be thrown when size = 1 is requested, but input has larger vectors.
Reprex from issue with this PR:

rlang:::vec_recycle_common(list(a = 1, b = 1:2), size = 1)
#> Error: Inputs can't be recycled to `size`.

Created on 2024-04-17 with reprex v2.1.0

@lionel-
Copy link
Member

lionel- commented Apr 17, 2024

Can you add a test please?

@teunbrand
Copy link
Contributor Author

Sure thing!

@lionel- lionel- merged commit e5da30c into r-lib:main Apr 17, 2024
12 checks passed
@lionel-
Copy link
Member

lionel- commented Apr 17, 2024

Thanks!

@teunbrand teunbrand deleted the fix_1700 branch April 17, 2024 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing error in vec_recycle_common() shim
2 participants