Conversation
Build Artifacts🐧 Linux
From workflow run 🪟 Windows
From workflow run |
|
@codex code review this |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f73569d09
ℹ️ 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".
|
@codex re-review the changes |
7f73569 to
81a9c88
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f73569d09
ℹ️ 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".
| && types_match( | ||
| index, | ||
| index.get_effective_type_or_void_by_name(left_inner), | ||
| index.get_effective_type_or_void_by_name(right_inner), | ||
| ) |
There was a problem hiding this comment.
Break recursive
types_match cycles
types_match recurses through pointer/array/struct inner types without any visited-pair guard, so comparing isomorphic recursive types can recurse indefinitely and overflow the stack during validation. A concrete case is two distinct recursive structs (A containing pointer to A, B containing pointer to B) encountered in signature comparison; each step keeps re-entering types_match(A, B) through the pointer branch. Track visited (left,right) type-name pairs (or short-circuit on repeats) before recursing.
Useful? React with 👍 / 👎.
| let l_type_info = left.get_type_information(); | ||
| let r_type_info = right.get_type_information(); | ||
| if l_type_info == r_type_info { | ||
| if types_match(self.context.index, left, right) { |
There was a problem hiding this comment.
The fast path logic of types_match seems to match the same match-arm pairs that validate_types does to emit diagnostics if the types do not match.
Specifically, the Pointer and SubRange arms seem to re-implement the recursive unwrapping that types_match already does.
Does that mean we have to keep them both in sync about what classifies as a matching type now?
There was a problem hiding this comment.
I refactored a bit given this was sloppy work from the LLM. I created a generic are_equal_types function which currently is being used for properties only. I plan to eventually integrated it for other validations as well, such that we do not need to maintain >1 locations with duplicated logic.
78de3a5 to
ddf205e
Compare
Pre-process property datatypes such that they can be queried by the index and used in the valdiation.