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
{{ message }}
Repository navigation
crash in new addImplementationSuccessElaboration #41015
✔ ~/DefinitelyTyped/types/agent-base [master|✔]
09:28 $ tsc
/home/nathansa/ts/built/local/tsc.js:105472
throw e;
^
TypeError: Cannot read property 'length' of undefined
at getSignatureFromDeclaration (/home/nathansa/ts/built/local/tsc.js:53357:89)
at addImplementationSuccessElaboration (/home/nathansa/ts/built/local/tsc.js:67988:37)
at resolveCall (/home/nathansa/ts/built/local/tsc.js:67955:25)
at resolveCallExpression (/home/nathansa/ts/built/local/tsc.js:68284:20)
at resolveSignature (/home/nathansa/ts/built/local/tsc.js:68657:28)
at getResolvedSignature (/home/nathansa/ts/built/local/tsc.js:68688:26)
at checkCallExpression (/home/nathansa/ts/built/local/tsc.js:68814:29)
at checkExpressionWorker (/home/nathansa/ts/built/local/tsc.js:71378:28)
at checkExpression (/home/nathansa/ts/built/local/tsc.js:71287:38)
at checkExpressionStatement (/home/nathansa/ts/built/local/tsc.js:73819:13)
Overloaded ambient function merged with namespace, such that the function implementation is not the last declaration. An easy fix is to skip such merges, although it's probably possible to use a different method to find the implementation declaration.
This crash might only apply in d.ts files, where there IS no implementation.
The crash is just because of an unchecked cast - turns out having a .body member isn't enough to guarantee the declaration is function-like, since namespaces also have a .body 😛 - PR is up: #41017
Activity
sandersn commentedon Oct 9, 2020
calling getSignatureFromDeclaration on a ModuleDeclaration, which has no parameters, so
declaration.parameters.lengthcrashes.sandersn commentedon Oct 9, 2020
Overloaded ambient function merged with namespace, such that the function implementation is not the last declaration. An easy fix is to skip such merges, although it's probably possible to use a different method to find the implementation declaration.
This crash might only apply in d.ts files, where there IS no implementation.
weswigham commentedon Oct 9, 2020
The crash is just because of an unchecked cast - turns out having a
.bodymember isn't enough to guarantee the declaration is function-like, since namespaces also have a.body😛 - PR is up: #41017minestarks commentedon Feb 17, 2021
https://github.com/microsoft/tsserverfuzzer/issues/301