solidity-ide icon indicating copy to clipboard operation
solidity-ide copied to clipboard

Scoping for contract instances

Open jthoene opened this issue 4 years ago • 1 comments

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. ;
	}
}

jthoene avatar Jul 19 '19 09:07 jthoene

This fix introduces regression with FQN Types

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

andreasmuelder avatar Jul 22 '19 13:07 andreasmuelder