NomicFoundation / hardhat-vscode

Solidity and Hardhat support for Visual Studio Code
https://hardhat.org
MIT License
163 stars 36 forks source link

Wrong function reference #518

Open C0D3O opened 9 months ago

C0D3O commented 9 months ago

image

kanej commented 9 months ago

Hey @moneyDev1111, can you give us more details? Is the problem that the extension navigates to the wrong function declaration?

Is this repo open source, to help us reproduce the issue?

C0D3O commented 9 months ago

it's the IERC1155 token, and it seems like the issue is that the thing that shows references on hover shows the previous state, as with the error, it seems to be the same problem. Now when the code is finished and I reopened the file it works correctly, and I see the setApprovalForAll function used in the contract that might have been in the 'reference' state at the time I made the screenshot. The repo isn't open source unfortunately, but I guess to reproduce it, just hover on sth, and then make a syntax error or sth like that and hover onto another function and it should show the wrong one:) I'll try to reproduce it myself a bit later