mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[SMTChecker] Fix ICE on fixed bytes access
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
pragma experimental SMTChecker;
|
||||
contract c {
|
||||
bytes10[6] data2;
|
||||
function test() public view returns (bytes10 r2) {
|
||||
r2 = data2[4][5];
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 7989: (123-134): Assertion checker does not yet support index accessing fixed bytes.
|
||||
@@ -0,0 +1,11 @@
|
||||
pragma experimental SMTChecker;
|
||||
contract C {
|
||||
function f(bytes calldata x, uint y) external pure {
|
||||
x[8][0];
|
||||
x[8][5%y];
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 7989: (101-108): Assertion checker does not yet support index accessing fixed bytes.
|
||||
// Warning 7989: (112-121): Assertion checker does not yet support index accessing fixed bytes.
|
||||
// Warning 3046: (117-120): Division by zero happens here
|
||||
@@ -0,0 +1,18 @@
|
||||
pragma experimental SMTChecker;
|
||||
contract C {
|
||||
bytes16[][] a;
|
||||
function g() internal view returns (bytes16[] storage) {
|
||||
return a[2];
|
||||
}
|
||||
function h() internal view returns (bytes16) {
|
||||
return a[2][2];
|
||||
}
|
||||
function f() external view {
|
||||
g()[3][4];
|
||||
h()[5];
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 9118: (238-244): Assertion checker does not yet implement this expression.
|
||||
// Warning 7989: (238-247): Assertion checker does not yet support index accessing fixed bytes.
|
||||
// Warning 7989: (251-257): Assertion checker does not yet support index accessing fixed bytes.
|
||||
Reference in New Issue
Block a user