Skip to content
This repository has been archived by the owner on Aug 24, 2022. It is now read-only.

Allow if conditions as the last statement of a block #16

Closed
sunjay opened this issue Sep 28, 2019 · 0 comments
Closed

Allow if conditions as the last statement of a block #16

sunjay opened this issue Sep 28, 2019 · 0 comments

Comments

@sunjay
Copy link
Owner

sunjay commented Sep 28, 2019

There is a slight ambiguity caused by if conditions being both statements and expressions: if you use an if condition as the last line in a block, it will be interpreted as a statement, even though it should actually be considered the final expression in the block. We should special case this and pull the if condition out of the statements list and into the final expression.

@sunjay sunjay closed this as completed Oct 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant