solidity/test/libsolidity/semanticTests/constants/consteval_array_length.sol

16 lines
306 B
Solidity
Raw Normal View History

2020-11-16 11:19:52 +00:00
contract C {
uint constant a = 12;
uint constant b = 10;
function f() public pure returns (uint, uint) {
uint[(a / b) * b] memory x;
return (x.length, (a / b) * b);
}
}
// ====
// compileViaYul: true
// compileToEwasm: also
2020-11-16 11:19:52 +00:00
// ----
// constructor() ->
// f() -> 0x0a, 0x0a