1

The function caller() below does not return any value

pragma solidity ^0.4.18;

contract M2M{

    function setvalues(uint a ,uint b) returns (uint){
        return a;
    }


    function caller() public returns (uint) {
      return  setvalues({b:90,a:45});
    }
}

enter image description here

gisdev_p
  • 1,801
  • 1
  • 9
  • 18

1 Answers1

1

I gave a try executing your code in remix and I am able to get the return value as 45 ,which is the expected output. Make sure you have the contract defined as a separate sol file or inject the dependencies if it's used with other contract.

enter image description here

Rangesh
  • 345
  • 1
  • 6