solidity/test/libsolidity/syntaxTests/nameAndTypeResolution/279_break_not_in_loop.sol

9 lines
163 B
Solidity

contract C {
function f() public {
if (true)
break;
}
}
// ----
// SyntaxError: (69-74): "break" has to be in a "for" or "while" loop.