hardhat-vscode
hardhat-vscode copied to clipboard
Cannot go to definition of struct when using a named import
trafficstars
// Foo.sol
import { MyStruct } from "./Bar.sol";
// Bar.sol
struct MyStruct {
uint x;
}
Ctrl+clicking MyStruct in the import doesn't take you to the definition.
This doesn't work either if you ctrl+click and usage of the struct:
contract Foo {
MyStruct myStruct;
}
On the other hand, in this example it does work:
import "./Bar.sol";
contract Foo {
MyStruct myStruct;
}
So it seems to be related to using a named import.
Also, going to the definition of a contract that is name-imported works. It's just structs that don't.