pragma solidity ^0.5.16;
contract mycontract{
uint256 public a;
function foo(string calldata _name) external {
string memory names;
names = _name;
getname(names);
}
function getname(string memory nameget) internal view returns(string memory){
return nameget;
}
function setinteger(uint256 _a) public{
a = _a;
}
}
What's the issue with above code? When foo is called it should return the string but it does not.