solidity/test/libsolidity/syntaxTests/controlFlow/leave_outside_function.sol

11 lines
289 B
Solidity
Raw Normal View History

contract C {
function f() public pure {
assembly {
// Make sure this doesn't trigger the unimplemented assertion in the control flow builder.
leave
}
}
}
// ----
// SyntaxError: (178-183): Keyword "leave" can only be used inside a function.