Skip to content

Errors not reported when signature help is active #52369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DanielRosenwasser opened this issue Jan 23, 2023 · 2 comments
Closed

Errors not reported when signature help is active #52369

DanielRosenwasser opened this issue Jan 23, 2023 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@DanielRosenwasser
Copy link
Member

declare function printValue(str: string): void;
declare function printValue(num: number, maxFractionDigits?: number): void

printValue("hello"/*$*/)

At /*$*/, type in , 123. Notice that you're not getting any errors.

Now try dismissing signature help and making a small edit like erasing 3 or inserting 4. An error will appear.

signatureHelpPoisoningTypeCheckerCache.webm

What are the mechanics here that're making this happen? If you're using VS Code, that initial , will start a signature help session. Every subsequent character will likey be used as a retrigger for signature help prior to requesting diagnostics. And so signature help, which I recall is checked in a specific way to handle overloads that differ slightly in arity, keeps getting requested for a specific expression before the rest of the type-checker gets to walk over it to report errors.

I believe that because signature help gets checked in a special way, it is likely poisoning the type-checker state we use for reporting errors as well.

@andrewbranch
Copy link
Member

Duplicate of #49624

@andrewbranch andrewbranch marked this as a duplicate of #49624 Jan 23, 2023
@DanielRosenwasser DanielRosenwasser added the Duplicate An existing issue was already created label Jan 23, 2023
@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants