Skip to content

Conversation

@jpco
Copy link
Collaborator

@jpco jpco commented Dec 15, 2024

Fixes #145.

  • eval is noreturn, so @ {eval return 1; return 2} appropriately returns 1.
  • %eval-print is noreturn, so es -xc 'return 99' behaves like es -c 'return 99' does.
  • Non-primitive %readfrom and %writeto are noreturn, so return <{true} behaves consistently in both primitive and non-primitive forms.
  • share/status.es sets $status based on return exceptions, and keeps %dispatch noreturn.

Not so related to return: true and false don't include their arguments in their return value, such that true blah returns 0 instead of 0 blah, which is falsey.

@jpco jpco merged commit 7a39e8b into wryun:master Dec 21, 2024
1 check passed
@jpco jpco deleted the little-fixes branch December 21, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should eval be $&noreturn?

1 participant