feat[lang]: @raw_return decorator#4568
Merged
charles-cooper merged 20 commits intovyperlang:masterfrom Jun 16, 2025
Merged
Conversation
450bc53 to
83089d0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4568 +/- ##
=======================================
Coverage 92.93% 92.94%
=======================================
Files 131 131
Lines 19006 19030 +24
Branches 3300 3306 +6
=======================================
+ Hits 17663 17687 +24
Misses 905 905
Partials 438 438 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…/raw-return-decorator add raw_return tests
…/raw-return-decorator add raw_return tests
…/raw-return-decorator fix raw_return test
cyberthirst
approved these changes
Jun 8, 2025
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
address #4525. the original
raw_return()builtin was implemented in #4527 and rejected because it can obfuscate control flow. this approach decorates the function (and is only allowed on external functions); the user is responsible for making sure each returning path has the same encoding.How I did it
How to verify it
ex.
Commit message
Description for the changelog
Cute Animal Picture