-
Notifications
You must be signed in to change notification settings - Fork 414
fix: Missing Type Check for Built-in Function Arguments (len, cap) Causes Runtime Panic #3454 #4033
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
Conversation
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
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.
a first sanity review
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 okay. Just fix the requested changes.
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.
a first round review.
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.
thanks for your work! left some comments please check. Additionally, there's a lack of testing for the new added logic. Please ensure sufficient test coverage.
Do you want me to adjust the errors format to match the type check error? |
gnovm/pkg/gnolang/type_check.go
Outdated
return 0, nil | ||
} | ||
|
||
func extractFunctionName(n *CallExpr) string { |
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.
As a naming convention, suggest getCallFuncName() Name (returns Name).
Please check this comment: #3454 (comment). |
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.
please check comments on files and main thread and rerequest review
Please make sure the CI is passing before requesting a second review |
Invalid arguments provided to builtin functions len,cap and make would compile successfully but it was triggering a runtime panic when executed.
fixes #3454