solidity/test/libsolidity/syntaxTests/inlineAssembly/const_from_non_const.sol
2022-04-01 23:41:18 -05:00

13 lines
366 B
Solidity

contract C {
bool nc = false;
bool constant c = nc;
function f() public {
assembly {
let t := c
}
}
}
// ----
// TypeError 8349: (52-54='nc'): Initial value for constant variable has to be compile-time constant.
// TypeError 7615: (112-113='c'): Only direct number constants and references to such constants are supported by inline assembly.