solidity基础-继承-is
父合约
contract fruit{ string public name = 'eat'; }
继承
import "/4_.sol";
contract Apple is fruit {
function getType() external view returns(string memory) {
return name;
}
}
父合约
contract fruit{ string public name = 'eat'; }
继承
import "/4_.sol";
contract Apple is fruit {
function getType() external view returns(string memory) {
return name;
}
}