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: Biplate<Vec<Expr>> for Expr #23

Merged
merged 1 commit into from
Nov 26, 2024
Merged

fix: Biplate<Vec<Expr>> for Expr #23

merged 1 commit into from
Nov 26, 2024

Conversation

niklasdewally
Copy link
Collaborator

@niklasdewally niklasdewally commented Nov 26, 2024

Fixes bug where Biplate<Vec<Expr>> for Expr returns [] instead of the expected vector.

This was due to derive_iter not handling the Biplate<Iter<T>> for Iter<T> case correctly. We already handled the special case of Biplate<T> for Iter<T>, but not the identity/ same type case (Biplate<T> for T) found in all other Biplates. This was causing Biplate<Iter<Expr>> for Iter<Expr> to return its Iter<Expr> children (using the Biplate<T> for Iter<T> case) instead of returning itself as expected.

Fixes #16

@niklasdewally niklasdewally self-assigned this Nov 26, 2024
@niklasdewally niklasdewally force-pushed the fix/issue-16 branch 2 times, most recently from 50e32ad to 3ecf0b7 Compare November 26, 2024 18:48
Fixes bug where `Biplate<Vec<Expr>> for Expr` returns [] instead of the
expected vector.

This was due to `derive_iter` not handling the `Biplate<Iter<T>> for
Iter<T>` case correctly. We already handled the special case of
`Biplate<T> for Iter<T>`, but not the identity/ same type case
(`Biplate<T> for T`) found in all other Biplates. This was causing
`Biplate<Iter<Expr>> for Iter<Expr>` to return its `Iter<Expr>` children
(using the `Biplate<T> for Iter<T>` case) instead of returning itself as
expected.

Fixes: #16
@niklasdewally niklasdewally merged commit 2b20701 into main Nov 26, 2024
7 checks passed
@niklasdewally niklasdewally deleted the fix/issue-16 branch November 26, 2024 18:51
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.

Fix <Expr as Biplate<Vec<Expr>>
1 participant