solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/165_assigning_state_to_const_variable.sol

6 lines
152 B
Solidity
Raw Normal View History

contract C {
address constant x = msg.sender;
}
// ----
// TypeError: (38-48): Initial value for constant variable has to be compile-time constant.