solidity/test/libsolidity/syntaxTests/array/length/array_length_cannot_be_constant_function_parameter.sol

9 lines
278 B
Solidity
Raw Normal View History

contract C {
function f(uint constant LEN) public {
uint[LEN] a;
}
}
// ----
2018-08-07 17:12:49 +00:00
// DeclarationError: (28-45): The "constant" keyword can only be used for state variables.
// TypeError: (69-72): Invalid array length, expected integer literal or constant expression.