itemisCREATE / solidity-ide

Solidity plugin for Eclipse
Eclipse Public License 1.0
87 stars 25 forks source link

Scoping for contract instances #271

Open jthoene opened 5 years ago

jthoene commented 5 years ago

If you instantiate a contract. Which has public functions defined, these functions are not shown when trying code completion for this contract instance.

Example code to reproduce this issue:

contract targetInterface{
    function deposit() public payable;
    function withdraw(uint withdrawAmount) public;
}

contract MyContract {
    targetInterface bankAddress = targetInterface(0x2D5848F4);
    uint amount = 1 ether;

    function deposit() public payable {
        bankAddress. ;
    }
}
andreasmuelder commented 4 years ago

This fix introduces regression with FQN Types

pragma solidity ^0.5.0;
contract TestOuter {
    struct TestInner {
        int256 x;
    }
}
contract EtherRouter {
      TestOuter.TestInner  test;    
}