You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
contractTest {
function h(int256a, int256b) privatereturns(int256) {
return (a + (b /2)) / b;
}
function g(int256a, int256b, int256c) privatereturns(int) {
return1;
}
function f(int256a, int256b, int256c) privatereturns(int256) {
return (a <<12) | (b <<7) | c;
}
int256constant A =type(int256).max;
int256constant B =1000;
function test(int256a, int256b) publicreturns(bool) {
int256 c =g(h(b, B), b, a) & A;
int256 d = b & A;
if (A >0) {
assert(((c / d) + (c & a) * d) == ((8/2) + (4&3) *1));
c =1;
if ((c &int256(1<< (uint256(A) -1))) !=0) {
c |=int256(~((1<<uint256(A)) -1));
}
}
return (f(B, B, a) > B) || (d > B);
}
}
Output:
thread 'main' panicked at ~/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bitvec-1.0.1/src/slice/api.rs:2681:1:
range 510..256 out of bounds: 256
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Solang version: solang version v0.3.3-56-g08dbe495
The text was updated successfully, but these errors were encountered:
Compile:
solang compile a.sol --target solana
Output:
Solang version:
solang version v0.3.3-56-g08dbe495
The text was updated successfully, but these errors were encountered: