Skip to content

Conversation

BobTheBuidler
Copy link
Contributor

@BobTheBuidler BobTheBuidler commented Sep 26, 2025

This PR extends get_expr_length to work with type information from RTuple and TupleType classes

All of the get_expr_length PRs are entirely independent and can be reviewed/merged in any order.

@BobTheBuidler BobTheBuidler changed the title [mypyc] feat: extend get_expr_length to work with RTuple and TupleType [mypyc] feat: extend get_expr_length to work with RTuple and TupleType Sep 26, 2025
@BobTheBuidler
Copy link
Contributor Author

If we merge #19931 first, this PR will be reflected in a change to its IR test data

@BobTheBuidler BobTheBuidler changed the title [mypyc] feat: extend get_expr_length to work with RTuple and TupleType [mypyc] feat: extend get_expr_length to work with RTuple and TupleType [2/4] Oct 1, 2025
rtype = builder.node_type(expr)
if isinstance(rtype, RTuple):
return len(rtype.types)
proper_type = get_proper_type(builder.types[expr])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we need this or will the check above it catch every case?

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.

1 participant