diff options
Diffstat (limited to 'test/libsolidity/syntaxTests/variableDeclaration/while.sol')
-rw-r--r-- | test/libsolidity/syntaxTests/variableDeclaration/while.sol | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/variableDeclaration/while.sol b/test/libsolidity/syntaxTests/variableDeclaration/while.sol new file mode 100644 index 00000000..2997d80c --- /dev/null +++ b/test/libsolidity/syntaxTests/variableDeclaration/while.sol @@ -0,0 +1,11 @@ +pragma solidity >0.4.24; + +contract C +{ + function f(uint x) public pure { + while (x > 0) + uint y; + } +} +// ---- +// SyntaxError: (92-98): Variable declarations can only be used inside blocks. |