-
Notifications
You must be signed in to change notification settings - Fork 377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(gnovm): sync code AssignStmt - ValueDecl #3017
feat(gnovm): sync code AssignStmt - ValueDecl #3017
Conversation
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 🔥
Co-authored-by: Mikael VALLENET <[email protected]>
When handling assignStmt and valueDecl, there are two main tasks:
To unify the specifications for For example: package main
func main() {
var a int = "hello" // valueDecl
var a int
a = "hello" // assignStmt
} In this code, both valueDecl and assignStmt should follow the same logic during type checking to ensure compatibility(in type_check.go). To summarize, we should apply both AssertCompatible(step1) and defineOrDecl (step2) operations to handle what do you think? |
Related: #2695 |
Thanks for your review. I've checked the code, there is only one re-usable code in AssignStmt assertCompatible is:
Which is already handled in defineOrDecl. Other processings are mostly for Assign. I've tried to refactor to be able to share the code even more (refactor/reuse assertCompatible) but don't find any "happy/good" solution. Do you have any idea on that ? |
Removed the |
Hello @hthieu1110 . Many of the CI checks failed because of a misconfiguration. This has now been fixed. Can you please push an empty commit? This will make the CI checks run again and hopefully fix them. |
We're having issues with Codecov, ignore failed Codecov tests for now. |
Could you take a look on this pls :) thanks |
sorry keep you waiting, gonna finalize my review tomorrow. 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly nits, but otherwise LGTM. thank you for the work.
…com/hthieu1110/gno into feat/sync-assignstmt-valuedecl-1958
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look good to me. Thanks for addressing my remarks.
merge this, cc:/ @thehowl if you want review this in future. |
…tion which does not return any value (#3049) This PR aims at resolving this issue: #1082 This depends on #3017 because it refactored the code to sync the logic/code between AssignStmt vs ValueDecl. Related #2695 <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests </details> --------- Co-authored-by: hieu.ha <[email protected]> Co-authored-by: Mikael VALLENET <[email protected]>
…tion which does not return any value (gnolang#3049) This PR aims at resolving this issue: gnolang#1082 This depends on gnolang#3017 because it refactored the code to sync the logic/code between AssignStmt vs ValueDecl. Related gnolang#2695 <details><summary>Contributors' checklist...</summary> - [ ] Added new tests, or not needed, or not feasible - [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [ ] Updated the official documentation or not needed - [ ] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [ ] Added references to related issues and PRs - [ ] Provided any useful hints for running manual tests </details> --------- Co-authored-by: hieu.ha <[email protected]> Co-authored-by: Mikael VALLENET <[email protected]>
This PR aims at fixing this issue 1958
Contributors' checklist...
BREAKING CHANGE: xxx
message was included in the description