Skip to content

Code completion incorrectly inserts placeholder for explicit object parameter #2339

Open
llvm/llvm-project
#146258
@HighCommander4

Description

@HighCommander4

Given the following code:

struct A
{
    void f(this A self, int arg);
};

int main() {
  A a;
  a.
}

if you invoke completion after a. and accept the proposal for f, the inserted placeholders include the explicit object parameter:

int main() {
  A a;
  a.f(A self, int arg)
}

This is incorrect: only the int arg placeholder should be inserted.

See also #2284 which may have the same or a related cause.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions