mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
ConstantEvaluator: respect integer type hints in arithmetic operations.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user