You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the suggestion, but I'm not sure this is worth it as:
a) It's really simple to change the parentheses / order to avoid this, and you lose nothing by doing so.
b) If the variable is not a number but a table with metamethods, this optimization will not be correct. (So doing it would require additional checks/flags/etc)
If a variable is used inside a math calculation, the whole calculation is not minified.
It probably has something to do with the parenthesis.
Example 1
This doesn't get minified, as it has the variable.
However, turning
x
into a1
makes the minified result?1
Expected Result
?x
Actual Result
Example 2
This gives the same type of result.
Expected Result
Actual Result
Example 3
Taking out the parenthesis fixes this problem (Example 4)
Expected Result
Actual Result
Example 4
While this fixes the minification problem, it causes a new one: The left and right half are merged separately.
Expected Result
Actual Result
Outro
Well, that's what I've found so far. Hope it helps with some minification stuff.
The text was updated successfully, but these errors were encountered: