Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple Inheritance code completion #350

Open
yvvw opened this issue Mar 14, 2023 · 1 comment
Open

multiple Inheritance code completion #350

yvvw opened this issue Mar 14, 2023 · 1 comment

Comments

@yvvw
Copy link

yvvw commented Mar 14, 2023

os: macos
webstorm version: 2022.3.3
plugin version: 2.3.11

I'm glad to be using your plugin. but i have encountered the following problem. this causes the vm's method in the Forge test module to not be fully displayed.

image

image

image

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

import "forge-std/Test.sol";

contract A1 {
    function a1() public {
        console2.log("a1");
    }
}
contract A2 is A1 {
    function a2() public {
        console2.log("a2");
    }
}
contract B1 {
    A1 private a = new A1();
}
contract B2 {
    A2 internal a = new A2();
}
contract C is B1, B2 {
    function invoke() public {
        a.a1();
        a.a2();
        a.
    }
}
contract ForgeTest is Test {
    function testC() public {
        C c = new C();
        c.invoke();
    }
}
@jonahcui
Copy link
Contributor

This is because the plugin parses the super contracts from left to right. But in solidity doc, the priority is from right to left. I submitted a pr to fix this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants