solidity/test/cmdlineTests/recovery_ast_constructor/input.sol

19 lines
462 B
Solidity
Raw Normal View History

2020-05-13 01:52:11 +00:00
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.0.0;
contract Error1 {
2020-06-23 12:14:24 +00:00
constructor() {
balances[tx.origin] = ; // missing RHS.
}
// Without error recovery we stop due to the above error.
// Error recovery however recovers at the above ';'
// There should be an AST for the above, albeit with error
// nodes.
// This function parses properly and should give AST info.
function five() public view returns(uint) {
return 5;
}
}