codemix / babel-plugin-typecheck

Static and runtime type checking for JavaScript in the form of a Babel plugin.
MIT License
886 stars 44 forks source link

Cannot read property 'kind' of undefined #8

Closed Naddiseo closed 9 years ago

Naddiseo commented 9 years ago

$ babel --version 5.4.2 $ cat test.jsx

class Foo {
    bar(v : string) {
    }
}

$ babel --plugins typecheck test.jsx ~/babel/lib/babel/transformation/file/index.js:600 throw err; ^ TypeError: test.jsx: Cannot read property 'kind' of undefined at Scope.getAllBindingsOfKind (~/babel/lib/babel/traversal/scope/index.js:824:22) at TraversalPath.Function (~/node_modules/babel-plugin-typecheck/lib/index.js:41:30) at TraversalPath.call (~/babel/lib/babel/traversal/path/index.js:833:28) at TraversalPath.visit (~/babel/lib/babel/traversal/path/index.js:866:10) at TraversalContext.visitSingle (~/babel/lib/babel/traversal/context.js:78:43) at TraversalContext.visit (~/babel/lib/babel/traversal/context.js:89:19) at Function.traverse.node (~/babel/lib/babel/traversal/index.js:64:17) at TraversalPath.visit (~/babel/lib/babel/traversal/path/index.js:883:28) at TraversalContext.visitMultiple (~/babel/lib/babel/traversal/context.js:67:16) at TraversalContext.visit (~/babel/lib/babel/traversal/context.js:87:19)

phpnode commented 9 years ago

failed to replicate via 1de86bf this was probably a dupe of #7 and went away with the babel upgrade. Will re-open if it still occurs