solidity/test/libsolidity/semanticTests/constructor/functions_called_by_constructor.sol

22 lines
325 B
Solidity
Raw Normal View History

contract Test {
bytes3 name;
bool flag;
constructor() public {
setName("abc");
}
function getName() public returns (bytes3 ret) {
return name;
}
function setName(bytes3 _name) private {
name = _name;
}
}
// ====
// compileViaYul: also
// ----
// getName() -> "abc"