ensuring statement expressions are transpiled to valid lua#506
ensuring statement expressions are transpiled to valid lua#506
Conversation
|
Wouldnt it be better to just ommit those? they dont have any effect right? (except calls and increment/decrement) not sure if we should waste resources assigning those statements to |
|
@lolleko Expressions may have side effects (e.g. calls) deeply nested inside them, for example a quite common pattern: |
|
Okay! People probably don't add useless statements like |
|
Simple literals are pretty much the only thing guaranteed to not have side effects. Even something like -a;could invoke metamethods. Since having simple literals as statements isn't something people are likely to do, it doesn't really seem worth the extra logic. |
fixes #503
This will conflict with #505, so I guess I'll see which gets approved first and fix the other 😄