-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: search all levels of struct nesting before codegenning primitive…
… types (#3970) # Description ## Problem\* Resolves <!-- Link to GitHub Issue --> ## Summary\* We previously had a bug that if a primitive type only exists below at least 2 layers of nesting in the function arguments then we wouldn't generate a definition for it. We now search the entire depth of nested structs before generating the primitive type definitions. ## Additional Context ## Documentation\* Check one: - [x] No documentation needed. - [ ] Documentation included in this PR. - [ ] **[Exceptional Case]** Documentation to be submitted in a separate PR. # PR Checklist\* - [x] I have tested the changes locally. - [x] I have formatted the changes with [Prettier](https://prettier.io/) and/or `cargo fmt` on default settings. --------- Co-authored-by: kevaundray <[email protected]>
- Loading branch information
1 parent
f1de8fa
commit 13ae014
Showing
4 changed files
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ crs | |
lib | ||
|
||
test/codegen | ||
test/test_lib/export |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
struct MyStruct { | ||
foo: bool, | ||
bar: [str<5>; 3], | ||
baz: Field | ||
} | ||
|
||
struct NestedStruct { | ||
|