-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪲 Add support for numbers in return statements (#5414)
Fixes #5170 With this PR, `return` statements try to convert their output to integers and floats and output strings if the number conversion fails. This change is required because the output of a function cannot be used in an arithmetic operation. **How to test** Navigate to level 14 and run the following program. Ensure that it completes without an error: ``` define round with x return x r = call round with 1 print r + 1 ```
- Loading branch information
1 parent
a06152e
commit 8021295
Showing
4 changed files
with
82 additions
and
59 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
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