ConstantEvaluator: respect integer type hints in arithmetic operations.

This commit is contained in:
Christian Parpart
2020-11-13 15:33:20 +01:00
parent 0ae504f883
commit 74912d65cb
6 changed files with 110 additions and 51 deletions
@@ -0,0 +1,14 @@
contract C {
uint constant a = 12;
uint constant b = 10;
function f() public pure returns (uint) {
uint[(a / b) * b] memory x;
return x.length;
}
}
// ====
// compileViaYul: true
// ----
// constructor() ->
// f() -> 10