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
This is of course wrong. But Im pretty sure its quite easily fixable, with a simple check.
I need to check if there are any return, continue, break, yield keywords inside of the nested if-node.
The whole idea of flattening is based on the fact, that the code before the nested node (Pre-nest), and the code after it (Post-nest) are always getting executed, if the main condition is true. However, if the nested node contains any of the before mentioned keywords, then this is no longer true.
To be safe, I'm only going to allow flattening, if neither the pre and post-nested code segments, neither the nested if-node itself contains any of the return, continue, break, yield keywords.
The text was updated successfully, but these errors were encountered:
While testing, i found an oversight regarding the logic of "flattening".
I came across something like this:
That got turned into:
This is of course wrong. But Im pretty sure its quite easily fixable, with a simple check.
I need to check if there are any
return, continue, break, yield
keywords inside of the nested if-node.The whole idea of flattening is based on the fact, that the code before the nested node (Pre-nest), and the code after it (Post-nest) are always getting executed, if the main condition is true. However, if the nested node contains any of the before mentioned keywords, then this is no longer true.
To be safe, I'm only going to allow flattening, if neither the pre and post-nested code segments, neither the nested if-node itself contains any of the
return, continue, break, yield
keywords.The text was updated successfully, but these errors were encountered: