Skip to content

JS autocomplete recommends and inserts out-of-context symbols #98686

@abbondanza

Description

@abbondanza
  • VSCode Version: 1.43.2
  • OS Version: Win 10 Enterprise v1909; build 18363.836

Steps to Reproduce:

  1. Create a brand new JS file with the following contents:
const o = {
  f: function() {},
};
  1. Attempt to type in ...args within the f function's parentheses.

Notice how .apply (this is just because apply is the first recommendation) is automatically inserted for each dot that is typed. This can also be reproduced in TS files. The odd part is that .apply doesn't even belong in the argument list. Also, I've noticed that this does not happen with free functions, only ones that are defined within an object.

Reproduction GIF:

776EC0C3-052B-4010-9416-9FAF3D5710EC

Does this issue occur when all extensions are disabled?: Yes

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugsuggestIntelliSense, Auto Completeupstream-issue-linkedThis is an upstream issue that has been reported upstream

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions