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
// Generated by CoffeeScript 2.6.1vare;try{}catch(error){e=error;}
Expected:
// Generated by CoffeeScript 2.6.1try{}catch(e){}
I understand that in cases where the catch variable is referenced outside of the catch block it must be var scoped as all variables in CoffeeScript are but in cases where the variable is not referenced at all outside of the block I don't feel that it should be hoisted.
The text was updated successfully, but these errors were encountered:
You might want to dig a little to find where this behavior was added, and why. There might be something particular about catch blocks that led to this, as it’s not like the actual behavior was easier to implement than the expected.
I expect that it is to handle cases where the variable is used later outside of the catch block. The issue is that it is also added in cases where the variable is unused outside of the block.
Actual:
Expected:
I understand that in cases where the catch variable is referenced outside of the catch block it must be
var
scoped as all variables in CoffeeScript are but in cases where the variable is not referenced at all outside of the block I don't feel that it should be hoisted.The text was updated successfully, but these errors were encountered: