When walking the AST and then looking up the scope at id an exception is thrown:
null does not match type Pattern
at BaseType.assert (\node_modules\ast-types\lib\types.js:15:19)
at addPattern (\node_modules\ast-types\lib\scope.js:256:28)
at scanScope (\node_modules\ast-types\lib\scope.js:136:17)
at Sp.scan (\node_modules\ast-types\lib\scope.js:109:13)
at Sp.getBindings (\node_modules\ast-types\lib\scope.js:114:14)
at Context.visitIdentifier (\ast.js:30:32)
at Context.invokeVisitorMethod (\node_modules\ast-types\lib\path-visitor.js:283:51)
at PVp.visitWithoutReset (\node_modules\ast-types\lib\path-visitor.js:158:32)
at visitChildren (\node_modules\ast-types\lib\path-visitor.js:204:25)
at PVp.visitWithoutReset (\node_modules\ast-types\lib\path-visitor.js:167:20)
Using
v0.16.1
.After parsing the following:
When walking the AST and then looking up the scope at
id
an exception is thrown:Steps to reproduce: