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
contractC {
function f(uintz) publicreturns (uint) {
uint y = x +9+ z; // 'z' is used pre-declarationuint x =7;
if (z %2==0) {
uint max =5;
// ...
}
// 'max' was intended to be 5, but it was mistakenly declared in a scope and not assigned (so it is zero).for (uint i =0; i < max; i++) {
x +=1;
}
return x;
}
}
The text was updated successfully, but these errors were encountered:
In the following part of the documentation, in the comment, z is said to be used before declaration. Whereas the
x
is used pre-declaration.Link to the part of documentation concerning this issue
The text was updated successfully, but these errors were encountered: