Conversation
Gas ChangesNo changes detected. Summary
|
📊 Bytecode Size Changes (venom)No changes detected. Full bytecode sizes
|
|
approved pending clanker review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2aee454d3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 480ab6905f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2c67c291dd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 665d76aacf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c37f91d62a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
What I did
Before #5127, the codegen type of an expression was always the expected type, with #5127 this would no longer work, as the expected type can contain wildcard lengths, which are not encodable (need to be resolved to a finite length or
INF).To solve this issue, it added
_annotation_typewhich derives an encodable type from the inferred and expected type.This PR refactors
_annotation_typeto give it nice properties, and to validate its invariants.Fix #5251
How I did it
_interpolateis added alongside_annotation_type, it finds the smallest type between its two parameters, which contains no wildcards.This allows us to remove
empty_list_candidate_typeswhich represented a kind of regression of #5177 (and thus re-introduced similar issues).To support the above/fix bugs it uncovered, a couple more minor things are done:
Expr.parse_IfExp's not copying~emptyinto memory._ExprAnalyser.types_from_Subscriptproducing multitypes1 containing the same type twice.my_type.has_wildcardbecause_GenericTypeAcceptordidn't have it.SArrayT.lengthis always an intHow to verify it
uv run pytest tests/unit/semantics/types/test_inf.py
tests/functional/codegen/features/test_inf_dynarray_runtime.py
tests/functional/codegen/features/test_ternary.py
Commit message
Description for the changelog
(refactor of a yet-unrealeased feature: no user-visible change)
Cute Animal Picture
Footnotes
A list of all possible types for an expression ↩