hardhat-vscode
hardhat-vscode copied to clipboard
Go to definition doesn't work for inherited methods
trafficstars
Given this code:
contract Foo {
function f() public {}
}
contract Foo2 is Foo {
}
contract Bar {
function f(Foo2 foo) public {
foo.f();
}
}
If you try to go to the definition of f in foo.f(), you'll get a "No definition found for 'f'" message.
Other things do work though. For example, navigation works if you remove the indirection:
contract Bar {
function f(Foo foo) public {
foo.f();
}
}
or if you use a method in the inherited contract:
contract Foo2 is Foo {
function g() public {
}
}
contract Bar {
function f(Foo2 foo) public {
foo.g();
}
}
I have the same issue.