Skip to content

Add as_group methods to AnyNodeRef#17048

Merged
MichaReiser merged 1 commit intomainfrom
micha/as-expr-ref
Mar 28, 2025
Merged

Add as_group methods to AnyNodeRef#17048
MichaReiser merged 1 commit intomainfrom
micha/as-expr-ref

Conversation

@MichaReiser
Copy link
Member

Summary

This PR adds as_<group> methods to AnyNodeRef to e.g. convert an AnyNodeRef to an ExprRef.

I need this for go to definition where the fallback is to test if AnyNodeRef is an expression and then call inferred_type (listing this mapping at every call site where we need to convert AnyNodeRef to an ExprRef is a bit painful ;))

Split out from #16901

Test Plan

cargo test

@MichaReiser MichaReiser added the internal An internal refactor or improvement label Mar 28, 2025
@github-actions
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@MichaReiser MichaReiser merged commit e07741e into main Mar 28, 2025
22 checks passed
@MichaReiser MichaReiser deleted the micha/as-expr-ref branch March 28, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal An internal refactor or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant