hardhat-vscode icon indicating copy to clipboard operation
hardhat-vscode copied to clipboard

No completion for inline contract member lookup

Open llllvvuu opened this issue 2 years ago • 1 comments
trafficstars

To reproduce:

IERC20(tokenAddr). // no completion

IERC20 token = IERC20(tokenAddr);
token. // has completion

Completion looks like this:

Screenshot 2023-07-31 at 9 10 00 PM which I assume is the `getDefaultCompletions` branch?

https://github.com/NomicFoundation/hardhat-vscode/blob/6c7d5b68d6f53582cc8ed98dfd395578a7e58e64/server/src/services/completion/onCompletion.ts#L176-L178

Randomly tried in VSCode on solmate WETH:

Screenshot 2023-07-31 at 9 16 12 PM

Kind of interesting failure mode where this particular string works the first time but fails subsequent times:

https://github.com/NomicFoundation/hardhat-vscode/assets/5601392/7cd0c1f0-8921-49f8-bb6b-224a3933b5ef

Also I think the function signature help is wrong because I didn't put the new keyword.

llllvvuu avatar Aug 01 '23 04:08 llllvvuu