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
Improve check for static var defs inside functions (#80)
* Tests: Try to add test for #79
* Tests: Add failing test for static inside control
* Improve check for static var defs inside functions
When trying to determine if a static keyword is being used to define a static
class property or a static variable, we were checking only to see if the
enclosing block was a function. However, if the enclosing block is (for
example) an if statement inside a function, then this check would fail when it
should pass.
This change instead checks for any enclosing function, so long as the enclosing
function comes before the enclosing class (to prevent false positives when a
function returns an anonymous class).
0 commit comments