Closed surr-name closed 5 years ago
This code breaks tern server:
class Some {} Some.bind(nu
output of the server:
Request: { "query": { "type": "completions", "types": true, "depths": true, "docs": true, "filter": false, "caseInsensitive": true, "guess": true, "sort": false, "expandWordForward": true, "omitObjectPrototype": false, "includeKeywords": true, "inLiteral": true, "file": "#0", "end": { "line": 2, "ch": 10 }, "lineCharPositions": true }, "files": [ { "type": "full", "name": "index.js", "text": "class Some {}\n\nSome.bind(nu" } ] } /usr/local/lib/node_modules/tern/lib/def.js:634 tp.argNames.slice(this.args.length), tp.retval, tp.generator)); ^ TypeError: Cannot read property 'slice' of null at ctor.addType (/usr/local/lib/node_modules/tern/lib/def.js:634:52) at exports.Fn.propagate (/usr/local/lib/node_modules/tern/lib/infer.js:529:35) at /usr/local/lib/node_modules/tern/lib/def.js:644:10 at ctor.addType (/usr/local/lib/node_modules/tern/lib/infer.js:382:18) at withWorklist (/usr/local/lib/node_modules/tern/lib/infer.js:922:19) at exports.AVal.propagate (/usr/local/lib/node_modules/tern/lib/infer.js:94:25) at /usr/local/lib/node_modules/tern/lib/infer.js:1563:14 at /usr/local/lib/node_modules/tern/lib/infer.js:1391:7 at infer (/usr/local/lib/node_modules/tern/lib/infer.js:1652:22) at Object.Expression (/usr/local/lib/node_modules/tern/lib/infer.js:1661:7)
Thank you, will release this fix soon.
This code breaks tern server:
output of the server: