slackhq / vscode-hack

Hack language & HHVM debugger support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=pranayagarwal.vscode-hack
MIT License
76 stars 39 forks source link

[Likely External | Autocomplete] Method calls autocomplete with an extra argument list #75

Closed lexidor closed 5 years ago

lexidor commented 5 years ago

Copy of issue

https://github.com/facebook/hhvm/issues/8589

HHVM Version

HipHop VM 4.28.0 (rel)
Compiler: 1571678629_197174034
Repo schema: c1068de11223e85fa6f517d694c9df37c23b7732

code --version
1.39.2
6ab598523be7a800d7f3eb4d92d7ab9a66069390
x64

Name: Hack
Id: pranayagarwal.vscode-hack
Description: Hack language & HHVM debugger support for Visual Studio Code
Version: 2.7.0
Publisher: Pranay Agarwal
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=pranayagarwal.vscode-hack

Operating System and Version

Ubuntu 18.04

Standalone code, or other way to reproduce the problem

class SomeClass {
    public function someMethod(int $_1, int $_2): void {}
}

function main(): void {
    $some_class = new SomeClass();
    $some_class->s <--
}

Actual result

class SomeClass {
    public function someMethod(int $_1, int $_2): void {}
}

function main(): void {
    $some_class = new SomeClass();
    $some_class->someMethod()(, )
}

Expected result

class SomeClass {
    public function someMethod(int $_1, int $_2): void {}
}

function main(): void {
    $some_class = new SomeClass();
    $some_class->someMethod(, )
}