Skip to content
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

update if-let #1190

Merged
merged 3 commits into from
Jun 18, 2023
Merged

update if-let #1190

merged 3 commits into from
Jun 18, 2023

Conversation

primo-ppcg
Copy link
Contributor

@primo-ppcg primo-ppcg commented Jun 11, 2023

Fixes #1189

Code of the following form should not error:

(if-let [[a b] (possibly-nil-or-tuple)] ...)

in accordance with the documentation: If any are false or nil, evaluate the fal form.

Fixes #1191

Macros with side-effects should not be expanded more than once. This is an issue that pre-dates the most recent change.

@primo-ppcg
Copy link
Contributor Author

primo-ppcg commented Jun 11, 2023

The use of symbol? should possibly be replaced with idempotent?, pending the resolution of #1192.

Upon further thought, I believe symbol? is the most correct choice.

@sogaiu
Copy link
Contributor

sogaiu commented Jun 12, 2023

@primo-ppcg I gave 2a7ea27 a try.

The 20 or so repositories I run tests against are now back to having their tests pass 👍

@bakpakin bakpakin merged commit cfffc0b into janet-lang:master Jun 18, 2023
@primo-ppcg primo-ppcg deleted the if-let branch June 24, 2023 09:25
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.

if-let's else branch appears multiple times in its expansion if-let behavior appears different in #1188
3 participants