aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/variableDeclaration/for.sol
blob: bc137f93517546d620b32503951d4a1b0f476b4d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
pragma solidity >0.4.24;

contract C
{
    function f(uint x) public pure {
        for (uint i = 0; i < x; ++i)
            uint y;
    }
}
// ----
// SyntaxError: (107-113): Variable declarations can only be used inside blocks.