-
Notifications
You must be signed in to change notification settings - Fork 71
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
small change in copyWithoutReturn to handle CCoerce #836
small change in copyWithoutReturn to handle CCoerce #836
Conversation
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.
🆒 !
I suggest to add a comment and any test.
I don't remember well, but part of the inlinings are tested. Would be nice to add one example of this.
Also, I did not get why the compiler throws warning: expression result unused
due a cast 🤔 (maybe the test helps me to understand).
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.
Cooollll! This is better, mainly because of the tests 💯 🚀 🚦
I left new comments / questions.
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.
🤩
Suppress cCoerce at the top of return expression when we suppress return in inlining.
cCoerce can be found in returns to make them match their method return type.
During inlining we can create a copy of parts of the AST without their return. If there is a cCoerce at the top of their expression, it may be no longer needed and can produce a 'warning: expression result unused'.