diff --git a/Changelog.md b/Changelog.md index 3a99d786f..b8244c205 100644 --- a/Changelog.md +++ b/Changelog.md @@ -35,6 +35,7 @@ Bugfixes: AST Changes: + * New property for ContractDefinition nodes: ``usedErrors`` lists AST IDs of all errors used by the contract (even if defined outside). diff --git a/libsolidity/ast/ASTJsonConverter.cpp b/libsolidity/ast/ASTJsonConverter.cpp index b3aa47b00..70ec98992 100644 --- a/libsolidity/ast/ASTJsonConverter.cpp +++ b/libsolidity/ast/ASTJsonConverter.cpp @@ -272,6 +272,7 @@ bool ASTJsonConverter::visit(ContractDefinition const& _node) make_pair("abstract", _node.abstract()), make_pair("baseContracts", toJson(_node.baseContracts())), make_pair("contractDependencies", getContainerIds(_node.annotation().contractDependencies | views::keys)), + make_pair("usedErrors", getContainerIds(_node.interfaceErrors(false))), make_pair("nodes", toJson(_node.subNodes())), make_pair("scope", idOrNull(_node.scope())) }; diff --git a/test/cmdlineTests/ast_compact_json_with_base_path/output b/test/cmdlineTests/ast_compact_json_with_base_path/output index 00359c3c6..ce8c4d274 100644 --- a/test/cmdlineTests/ast_compact_json_with_base_path/output +++ b/test/cmdlineTests/ast_compact_json_with_base_path/output @@ -43,7 +43,8 @@ JSON AST (compact format): "nodeType": "ContractDefinition", "nodes": [], "scope": 6, - "src": "60:13:0" + "src": "60:13:0", + "usedErrors": [] } ], "src": "36:38:0" diff --git a/test/cmdlineTests/combined_json_with_base_path/output b/test/cmdlineTests/combined_json_with_base_path/output index a8a4763e2..206bfc639 100644 --- a/test/cmdlineTests/combined_json_with_base_path/output +++ b/test/cmdlineTests/combined_json_with_base_path/output @@ -1 +1 @@ -{"contracts":{"combined_json_with_base_path/c.sol:C":{}},"sourceList":["combined_json_with_base_path/c.sol","combined_json_with_base_path/input.sol"],"sources":{"combined_json_with_base_path/c.sol":{"AST":{"absolutePath":"combined_json_with_base_path/c.sol","exportedSymbols":{"C":[5]},"id":6,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":4,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":5,"linearizedBaseContracts":[5],"name":"C","nameLocation":"69:1:0","nodeType":"ContractDefinition","nodes":[],"scope":6,"src":"60:13:0"}],"src":"36:38:0"}},"combined_json_with_base_path/input.sol":{"AST":{"absolutePath":"combined_json_with_base_path/input.sol","exportedSymbols":{"C":[5]},"id":3,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:1"},{"absolutePath":"combined_json_with_base_path/c.sol","file":"./c.sol","id":2,"nameLocation":"-1:-1:-1","nodeType":"ImportDirective","scope":3,"sourceUnit":6,"src":"60:17:1","symbolAliases":[],"unitAlias":""}],"src":"36:42:1"}}},"version": ""} +{"contracts":{"combined_json_with_base_path/c.sol:C":{}},"sourceList":["combined_json_with_base_path/c.sol","combined_json_with_base_path/input.sol"],"sources":{"combined_json_with_base_path/c.sol":{"AST":{"absolutePath":"combined_json_with_base_path/c.sol","exportedSymbols":{"C":[5]},"id":6,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":4,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":5,"linearizedBaseContracts":[5],"name":"C","nameLocation":"69:1:0","nodeType":"ContractDefinition","nodes":[],"scope":6,"src":"60:13:0","usedErrors":[]}],"src":"36:38:0"}},"combined_json_with_base_path/input.sol":{"AST":{"absolutePath":"combined_json_with_base_path/input.sol","exportedSymbols":{"C":[5]},"id":3,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:1"},{"absolutePath":"combined_json_with_base_path/c.sol","file":"./c.sol","id":2,"nameLocation":"-1:-1:-1","nodeType":"ImportDirective","scope":3,"sourceUnit":6,"src":"60:17:1","symbolAliases":[],"unitAlias":""}],"src":"36:42:1"}}},"version": ""} diff --git a/test/cmdlineTests/recovery_ast_constructor/output b/test/cmdlineTests/recovery_ast_constructor/output index 1d94aee98..4a2f711c1 100644 --- a/test/cmdlineTests/recovery_ast_constructor/output +++ b/test/cmdlineTests/recovery_ast_constructor/output @@ -178,7 +178,8 @@ JSON AST (compact format): } ], "scope": 19, - "src": "62:399:0" + "src": "62:399:0", + "usedErrors": [] } ], "src": "36:426:0" diff --git a/test/cmdlineTests/recovery_standard_json/output.json b/test/cmdlineTests/recovery_standard_json/output.json index e84fc8c86..3868e93cb 100644 --- a/test/cmdlineTests/recovery_standard_json/output.json +++ b/test/cmdlineTests/recovery_standard_json/output.json @@ -10,4 +10,4 @@ 2 | pragma solidity >=0.0; contract Errort6 { using foo for ; /* missing type name */ } | ^ -","message":"Recovered in ContractDefinition at '}'.","severity":"warning","sourceLocation":{"end":120,"file":"A","start":119},"type":"Warning"}],"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"Errort6":[3]},"id":4,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":3,"linearizedBaseContracts":[3],"name":"Errort6","nameLocation":"68:7:0","nodeType":"ContractDefinition","nodes":[],"scope":4,"src":"59:35:0"}],"src":"36:84:0"},"id":0}}} +","message":"Recovered in ContractDefinition at '}'.","severity":"warning","sourceLocation":{"end":120,"file":"A","start":119},"type":"Warning"}],"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"Errort6":[3]},"id":4,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":3,"linearizedBaseContracts":[3],"name":"Errort6","nameLocation":"68:7:0","nodeType":"ContractDefinition","nodes":[],"scope":4,"src":"59:35:0","usedErrors":[]}],"src":"36:84:0"},"id":0}}} diff --git a/test/cmdlineTests/standard_only_ast_requested/output.json b/test/cmdlineTests/standard_only_ast_requested/output.json index f22de53d0..31e349c4d 100644 --- a/test/cmdlineTests/standard_only_ast_requested/output.json +++ b/test/cmdlineTests/standard_only_ast_requested/output.json @@ -1 +1 @@ -{"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"C":[6]},"id":7,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":6,"linearizedBaseContracts":[6],"name":"C","nameLocation":"68:1:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":4,"nodeType":"Block","src":"97:2:0","statements":[]},"functionSelector":"26121ff0","id":5,"implemented":true,"kind":"function","modifiers":[],"name":"f","nameLocation":"81:1:0","nodeType":"FunctionDefinition","parameters":{"id":2,"nodeType":"ParameterList","parameters":[],"src":"82:2:0"},"returnParameters":{"id":3,"nodeType":"ParameterList","parameters":[],"src":"97:0:0"},"scope":6,"src":"72:27:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":7,"src":"59:42:0"}],"src":"36:65:0"},"id":0}}} +{"sources":{"A":{"ast":{"absolutePath":"A","exportedSymbols":{"C":[6]},"id":7,"license":"GPL-3.0","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">=","0.0"],"nodeType":"PragmaDirective","src":"36:22:0"},{"abstract":false,"baseContracts":[],"contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":6,"linearizedBaseContracts":[6],"name":"C","nameLocation":"68:1:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":4,"nodeType":"Block","src":"97:2:0","statements":[]},"functionSelector":"26121ff0","id":5,"implemented":true,"kind":"function","modifiers":[],"name":"f","nameLocation":"81:1:0","nodeType":"FunctionDefinition","parameters":{"id":2,"nodeType":"ParameterList","parameters":[],"src":"82:2:0"},"returnParameters":{"id":3,"nodeType":"ParameterList","parameters":[],"src":"97:0:0"},"scope":6,"src":"72:27:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":7,"src":"59:42:0","usedErrors":[]}],"src":"36:65:0"},"id":0}}} diff --git a/test/libsolidity/ASTJSON/abstract_contract.json b/test/libsolidity/ASTJSON/abstract_contract.json index cf954cc30..ab0764cd8 100644 --- a/test/libsolidity/ASTJSON/abstract_contract.json +++ b/test/libsolidity/ASTJSON/abstract_contract.json @@ -64,7 +64,8 @@ } ], "scope": 6, - "src": "0:43:1" + "src": "0:43:1", + "usedErrors": [] } ], "src": "0:44:1" diff --git a/test/libsolidity/ASTJSON/abstract_contract_parseOnly.json b/test/libsolidity/ASTJSON/abstract_contract_parseOnly.json index baf73de4d..51dd803a3 100644 --- a/test/libsolidity/ASTJSON/abstract_contract_parseOnly.json +++ b/test/libsolidity/ASTJSON/abstract_contract_parseOnly.json @@ -49,7 +49,8 @@ "virtual": false } ], - "src": "0:43:1" + "src": "0:43:1", + "usedErrors": [] } ], "src": "0:44:1" diff --git a/test/libsolidity/ASTJSON/address_payable.json b/test/libsolidity/ASTJSON/address_payable.json index a31b2b7de..37692508b 100644 --- a/test/libsolidity/ASTJSON/address_payable.json +++ b/test/libsolidity/ASTJSON/address_payable.json @@ -562,7 +562,8 @@ } ], "scope": 40, - "src": "0:258:1" + "src": "0:258:1", + "usedErrors": [] } ], "src": "0:259:1" diff --git a/test/libsolidity/ASTJSON/address_payable_parseOnly.json b/test/libsolidity/ASTJSON/address_payable_parseOnly.json index 92f4d6949..85e06e90c 100644 --- a/test/libsolidity/ASTJSON/address_payable_parseOnly.json +++ b/test/libsolidity/ASTJSON/address_payable_parseOnly.json @@ -370,7 +370,8 @@ "visibility": "public" } ], - "src": "0:258:1" + "src": "0:258:1", + "usedErrors": [] } ], "src": "0:259:1" diff --git a/test/libsolidity/ASTJSON/array_type_name.json b/test/libsolidity/ASTJSON/array_type_name.json index 8829b894c..25a54712d 100644 --- a/test/libsolidity/ASTJSON/array_type_name.json +++ b/test/libsolidity/ASTJSON/array_type_name.json @@ -70,7 +70,8 @@ } ], "scope": 5, - "src": "0:24:1" + "src": "0:24:1", + "usedErrors": [] } ], "src": "0:25:1" diff --git a/test/libsolidity/ASTJSON/array_type_name_parseOnly.json b/test/libsolidity/ASTJSON/array_type_name_parseOnly.json index 6b0ac2afb..4248a3f98 100644 --- a/test/libsolidity/ASTJSON/array_type_name_parseOnly.json +++ b/test/libsolidity/ASTJSON/array_type_name_parseOnly.json @@ -44,7 +44,8 @@ "visibility": "internal" } ], - "src": "0:24:1" + "src": "0:24:1", + "usedErrors": [] } ], "src": "0:25:1" diff --git a/test/libsolidity/ASTJSON/assembly/call.json b/test/libsolidity/ASTJSON/assembly/call.json index a15ced6cc..43a401558 100644 --- a/test/libsolidity/ASTJSON/assembly/call.json +++ b/test/libsolidity/ASTJSON/assembly/call.json @@ -162,7 +162,8 @@ } ], "scope": 7, - "src": "0:98:1" + "src": "0:98:1", + "usedErrors": [] } ], "src": "0:99:1" diff --git a/test/libsolidity/ASTJSON/assembly/call_parseOnly.json b/test/libsolidity/ASTJSON/assembly/call_parseOnly.json index d7b9f4be8..27d6ac07d 100644 --- a/test/libsolidity/ASTJSON/assembly/call_parseOnly.json +++ b/test/libsolidity/ASTJSON/assembly/call_parseOnly.json @@ -147,7 +147,8 @@ "visibility": "public" } ], - "src": "0:98:1" + "src": "0:98:1", + "usedErrors": [] } ], "src": "0:99:1" diff --git a/test/libsolidity/ASTJSON/assembly/empty_block.json b/test/libsolidity/ASTJSON/assembly/empty_block.json index cf85557e5..9e0867656 100644 --- a/test/libsolidity/ASTJSON/assembly/empty_block.json +++ b/test/libsolidity/ASTJSON/assembly/empty_block.json @@ -87,7 +87,8 @@ } ], "scope": 7, - "src": "0:75:1" + "src": "0:75:1", + "usedErrors": [] } ], "src": "0:76:1" diff --git a/test/libsolidity/ASTJSON/assembly/empty_block_parseOnly.json b/test/libsolidity/ASTJSON/assembly/empty_block_parseOnly.json index 9ee4a257e..8b07db893 100644 --- a/test/libsolidity/ASTJSON/assembly/empty_block_parseOnly.json +++ b/test/libsolidity/ASTJSON/assembly/empty_block_parseOnly.json @@ -72,7 +72,8 @@ "visibility": "public" } ], - "src": "0:75:1" + "src": "0:75:1", + "usedErrors": [] } ], "src": "0:76:1" diff --git a/test/libsolidity/ASTJSON/assembly/function.json b/test/libsolidity/ASTJSON/assembly/function.json index df07a26e1..f78550fd1 100644 --- a/test/libsolidity/ASTJSON/assembly/function.json +++ b/test/libsolidity/ASTJSON/assembly/function.json @@ -149,7 +149,8 @@ } ], "scope": 7, - "src": "0:112:1" + "src": "0:112:1", + "usedErrors": [] } ], "src": "0:113:1" diff --git a/test/libsolidity/ASTJSON/assembly/function_parseOnly.json b/test/libsolidity/ASTJSON/assembly/function_parseOnly.json index 971a5c267..f89a2fa6d 100644 --- a/test/libsolidity/ASTJSON/assembly/function_parseOnly.json +++ b/test/libsolidity/ASTJSON/assembly/function_parseOnly.json @@ -134,7 +134,8 @@ "visibility": "public" } ], - "src": "0:112:1" + "src": "0:112:1", + "usedErrors": [] } ], "src": "0:113:1" diff --git a/test/libsolidity/ASTJSON/assembly/leave.json b/test/libsolidity/ASTJSON/assembly/leave.json index 1a928972f..12b042b51 100644 --- a/test/libsolidity/ASTJSON/assembly/leave.json +++ b/test/libsolidity/ASTJSON/assembly/leave.json @@ -99,7 +99,8 @@ } ], "scope": 7, - "src": "0:90:1" + "src": "0:90:1", + "usedErrors": [] } ], "src": "0:91:1" diff --git a/test/libsolidity/ASTJSON/assembly/leave_parseOnly.json b/test/libsolidity/ASTJSON/assembly/leave_parseOnly.json index 4a1b2196d..ba8b54507 100644 --- a/test/libsolidity/ASTJSON/assembly/leave_parseOnly.json +++ b/test/libsolidity/ASTJSON/assembly/leave_parseOnly.json @@ -84,7 +84,8 @@ "visibility": "public" } ], - "src": "0:90:1" + "src": "0:90:1", + "usedErrors": [] } ], "src": "0:91:1" diff --git a/test/libsolidity/ASTJSON/assembly/loop.json b/test/libsolidity/ASTJSON/assembly/loop.json index 2918c6b35..a0c475ae1 100644 --- a/test/libsolidity/ASTJSON/assembly/loop.json +++ b/test/libsolidity/ASTJSON/assembly/loop.json @@ -162,7 +162,8 @@ } ], "scope": 7, - "src": "0:118:1" + "src": "0:118:1", + "usedErrors": [] } ], "src": "0:119:1" diff --git a/test/libsolidity/ASTJSON/assembly/loop_parseOnly.json b/test/libsolidity/ASTJSON/assembly/loop_parseOnly.json index 38196816d..8ee936747 100644 --- a/test/libsolidity/ASTJSON/assembly/loop_parseOnly.json +++ b/test/libsolidity/ASTJSON/assembly/loop_parseOnly.json @@ -147,7 +147,8 @@ "visibility": "public" } ], - "src": "0:118:1" + "src": "0:118:1", + "usedErrors": [] } ], "src": "0:119:1" diff --git a/test/libsolidity/ASTJSON/assembly/nested_functions.json b/test/libsolidity/ASTJSON/assembly/nested_functions.json index f5c5d7b6a..f4cef95e0 100644 --- a/test/libsolidity/ASTJSON/assembly/nested_functions.json +++ b/test/libsolidity/ASTJSON/assembly/nested_functions.json @@ -148,7 +148,8 @@ } ], "scope": 9, - "src": "0:156:1" + "src": "0:156:1", + "usedErrors": [] } ], "src": "0:157:1" diff --git a/test/libsolidity/ASTJSON/assembly/nested_functions_parseOnly.json b/test/libsolidity/ASTJSON/assembly/nested_functions_parseOnly.json index 449d678ae..af5071665 100644 --- a/test/libsolidity/ASTJSON/assembly/nested_functions_parseOnly.json +++ b/test/libsolidity/ASTJSON/assembly/nested_functions_parseOnly.json @@ -134,7 +134,8 @@ "visibility": "public" } ], - "src": "0:156:1" + "src": "0:156:1", + "usedErrors": [] } ], "src": "0:157:1" diff --git a/test/libsolidity/ASTJSON/assembly/slot_offset.json b/test/libsolidity/ASTJSON/assembly/slot_offset.json index fe43f1cfa..8b8fb1a25 100644 --- a/test/libsolidity/ASTJSON/assembly/slot_offset.json +++ b/test/libsolidity/ASTJSON/assembly/slot_offset.json @@ -239,7 +239,8 @@ } ], "scope": 13, - "src": "0:148:1" + "src": "0:148:1", + "usedErrors": [] } ], "src": "0:149:1" diff --git a/test/libsolidity/ASTJSON/assembly/slot_offset_parseOnly.json b/test/libsolidity/ASTJSON/assembly/slot_offset_parseOnly.json index c49f1857c..6407e4519 100644 --- a/test/libsolidity/ASTJSON/assembly/slot_offset_parseOnly.json +++ b/test/libsolidity/ASTJSON/assembly/slot_offset_parseOnly.json @@ -184,7 +184,8 @@ "visibility": "public" } ], - "src": "0:148:1" + "src": "0:148:1", + "usedErrors": [] } ], "src": "0:149:1" diff --git a/test/libsolidity/ASTJSON/assembly/stringlit.json b/test/libsolidity/ASTJSON/assembly/stringlit.json index 68c915301..c470d4790 100644 --- a/test/libsolidity/ASTJSON/assembly/stringlit.json +++ b/test/libsolidity/ASTJSON/assembly/stringlit.json @@ -103,7 +103,8 @@ } ], "scope": 7, - "src": "0:82:1" + "src": "0:82:1", + "usedErrors": [] } ], "src": "0:83:1" diff --git a/test/libsolidity/ASTJSON/assembly/stringlit_parseOnly.json b/test/libsolidity/ASTJSON/assembly/stringlit_parseOnly.json index 4dd401962..03f757e65 100644 --- a/test/libsolidity/ASTJSON/assembly/stringlit_parseOnly.json +++ b/test/libsolidity/ASTJSON/assembly/stringlit_parseOnly.json @@ -88,7 +88,8 @@ "visibility": "public" } ], - "src": "0:82:1" + "src": "0:82:1", + "usedErrors": [] } ], "src": "0:83:1" diff --git a/test/libsolidity/ASTJSON/assembly/switch.json b/test/libsolidity/ASTJSON/assembly/switch.json index 60a3dd800..af02d3423 100644 --- a/test/libsolidity/ASTJSON/assembly/switch.json +++ b/test/libsolidity/ASTJSON/assembly/switch.json @@ -209,7 +209,8 @@ } ], "scope": 7, - "src": "0:198:1" + "src": "0:198:1", + "usedErrors": [] } ], "src": "0:199:1" diff --git a/test/libsolidity/ASTJSON/assembly/switch_default.json b/test/libsolidity/ASTJSON/assembly/switch_default.json index 034e8a366..63f105679 100644 --- a/test/libsolidity/ASTJSON/assembly/switch_default.json +++ b/test/libsolidity/ASTJSON/assembly/switch_default.json @@ -126,7 +126,8 @@ } ], "scope": 7, - "src": "0:102:1" + "src": "0:102:1", + "usedErrors": [] } ], "src": "0:103:1" diff --git a/test/libsolidity/ASTJSON/assembly/switch_default_parseOnly.json b/test/libsolidity/ASTJSON/assembly/switch_default_parseOnly.json index a68b2db92..4539f8596 100644 --- a/test/libsolidity/ASTJSON/assembly/switch_default_parseOnly.json +++ b/test/libsolidity/ASTJSON/assembly/switch_default_parseOnly.json @@ -111,7 +111,8 @@ "visibility": "public" } ], - "src": "0:102:1" + "src": "0:102:1", + "usedErrors": [] } ], "src": "0:103:1" diff --git a/test/libsolidity/ASTJSON/assembly/switch_parseOnly.json b/test/libsolidity/ASTJSON/assembly/switch_parseOnly.json index 898cd7a52..93e671c10 100644 --- a/test/libsolidity/ASTJSON/assembly/switch_parseOnly.json +++ b/test/libsolidity/ASTJSON/assembly/switch_parseOnly.json @@ -180,7 +180,8 @@ "visibility": "public" } ], - "src": "0:198:1" + "src": "0:198:1", + "usedErrors": [] } ], "src": "0:199:1" diff --git a/test/libsolidity/ASTJSON/assembly/var_access.json b/test/libsolidity/ASTJSON/assembly/var_access.json index a81fef96c..0ae3bf008 100644 --- a/test/libsolidity/ASTJSON/assembly/var_access.json +++ b/test/libsolidity/ASTJSON/assembly/var_access.json @@ -153,7 +153,8 @@ } ], "scope": 10, - "src": "0:95:1" + "src": "0:95:1", + "usedErrors": [] } ], "src": "0:96:1" diff --git a/test/libsolidity/ASTJSON/assembly/var_access_parseOnly.json b/test/libsolidity/ASTJSON/assembly/var_access_parseOnly.json index e8651532a..1444a3da1 100644 --- a/test/libsolidity/ASTJSON/assembly/var_access_parseOnly.json +++ b/test/libsolidity/ASTJSON/assembly/var_access_parseOnly.json @@ -120,7 +120,8 @@ "visibility": "public" } ], - "src": "0:95:1" + "src": "0:95:1", + "usedErrors": [] } ], "src": "0:96:1" diff --git a/test/libsolidity/ASTJSON/base_constructor_call.json b/test/libsolidity/ASTJSON/base_constructor_call.json index a1cf5c50e..e2b9686cb 100644 --- a/test/libsolidity/ASTJSON/base_constructor_call.json +++ b/test/libsolidity/ASTJSON/base_constructor_call.json @@ -100,7 +100,8 @@ } ], "scope": 18, - "src": "0:35:1" + "src": "0:35:1", + "usedErrors": [] }, { "abstract": false, @@ -207,7 +208,8 @@ } ], "scope": 18, - "src": "36:41:1" + "src": "36:41:1", + "usedErrors": [] } ], "src": "0:78:1" diff --git a/test/libsolidity/ASTJSON/base_constructor_call_parseOnly.json b/test/libsolidity/ASTJSON/base_constructor_call_parseOnly.json index 61854cf9c..bd101b9b8 100644 --- a/test/libsolidity/ASTJSON/base_constructor_call_parseOnly.json +++ b/test/libsolidity/ASTJSON/base_constructor_call_parseOnly.json @@ -72,7 +72,8 @@ "virtual": false } ], - "src": "0:35:1" + "src": "0:35:1", + "usedErrors": [] }, { "abstract": false, @@ -159,7 +160,8 @@ "virtual": false } ], - "src": "36:41:1" + "src": "36:41:1", + "usedErrors": [] } ], "src": "0:78:1" diff --git a/test/libsolidity/ASTJSON/constructor.json b/test/libsolidity/ASTJSON/constructor.json index 5fc4978d6..b1ca1503c 100644 --- a/test/libsolidity/ASTJSON/constructor.json +++ b/test/libsolidity/ASTJSON/constructor.json @@ -64,7 +64,8 @@ } ], "scope": 6, - "src": "0:34:1" + "src": "0:34:1", + "usedErrors": [] } ], "src": "0:35:1" diff --git a/test/libsolidity/ASTJSON/constructor_parseOnly.json b/test/libsolidity/ASTJSON/constructor_parseOnly.json index fc54bd53f..19d647058 100644 --- a/test/libsolidity/ASTJSON/constructor_parseOnly.json +++ b/test/libsolidity/ASTJSON/constructor_parseOnly.json @@ -49,7 +49,8 @@ "virtual": false } ], - "src": "0:34:1" + "src": "0:34:1", + "usedErrors": [] } ], "src": "0:35:1" diff --git a/test/libsolidity/ASTJSON/contract_dep_order.json b/test/libsolidity/ASTJSON/contract_dep_order.json index b65e1be7e..fda09e177 100644 --- a/test/libsolidity/ASTJSON/contract_dep_order.json +++ b/test/libsolidity/ASTJSON/contract_dep_order.json @@ -43,7 +43,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 14, - "src": "0:14:1" + "src": "0:14:1", + "usedErrors": [] }, { "abstract": false, @@ -77,7 +78,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 14, - "src": "15:19:1" + "src": "15:19:1", + "usedErrors": [] }, { "abstract": false, @@ -112,7 +114,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 14, - "src": "35:19:1" + "src": "35:19:1", + "usedErrors": [] }, { "abstract": false, @@ -148,7 +151,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 14, - "src": "55:19:1" + "src": "55:19:1", + "usedErrors": [] }, { "abstract": false, @@ -185,7 +189,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 14, - "src": "75:19:1" + "src": "75:19:1", + "usedErrors": [] } ], "src": "0:95:1" diff --git a/test/libsolidity/ASTJSON/contract_dep_order_parseOnly.json b/test/libsolidity/ASTJSON/contract_dep_order_parseOnly.json index bb42b5b62..5fe9bb195 100644 --- a/test/libsolidity/ASTJSON/contract_dep_order_parseOnly.json +++ b/test/libsolidity/ASTJSON/contract_dep_order_parseOnly.json @@ -14,7 +14,8 @@ "nameLocation": "9:1:1", "nodeType": "ContractDefinition", "nodes": [], - "src": "0:14:1" + "src": "0:14:1", + "usedErrors": [] }, { "abstract": false, @@ -40,7 +41,8 @@ "nameLocation": "24:1:1", "nodeType": "ContractDefinition", "nodes": [], - "src": "15:19:1" + "src": "15:19:1", + "usedErrors": [] }, { "abstract": false, @@ -66,7 +68,8 @@ "nameLocation": "44:1:1", "nodeType": "ContractDefinition", "nodes": [], - "src": "35:19:1" + "src": "35:19:1", + "usedErrors": [] }, { "abstract": false, @@ -92,7 +95,8 @@ "nameLocation": "64:1:1", "nodeType": "ContractDefinition", "nodes": [], - "src": "55:19:1" + "src": "55:19:1", + "usedErrors": [] }, { "abstract": false, @@ -118,7 +122,8 @@ "nameLocation": "84:1:1", "nodeType": "ContractDefinition", "nodes": [], - "src": "75:19:1" + "src": "75:19:1", + "usedErrors": [] } ], "src": "0:95:1" diff --git a/test/libsolidity/ASTJSON/documentation.json b/test/libsolidity/ASTJSON/documentation.json index c65a424ec..751b6bcca 100644 --- a/test/libsolidity/ASTJSON/documentation.json +++ b/test/libsolidity/ASTJSON/documentation.json @@ -35,7 +35,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 3, - "src": "28:13:1" + "src": "28:13:1", + "usedErrors": [] } ], "src": "28:14:1" @@ -76,7 +77,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 6, - "src": "62:13:2" + "src": "62:13:2", + "usedErrors": [] } ], "src": "62:14:2" @@ -252,7 +254,8 @@ } ], "scope": 24, - "src": "0:213:3" + "src": "0:213:3", + "usedErrors": [] } ], "src": "0:214:3" diff --git a/test/libsolidity/ASTJSON/documentation_local_variable.json b/test/libsolidity/ASTJSON/documentation_local_variable.json index ee7e05df9..b21f719bf 100644 --- a/test/libsolidity/ASTJSON/documentation_local_variable.json +++ b/test/libsolidity/ASTJSON/documentation_local_variable.json @@ -482,7 +482,8 @@ } ], "scope": 42, - "src": "0:666:1" + "src": "0:666:1", + "usedErrors": [] } ], "src": "0:667:1" diff --git a/test/libsolidity/ASTJSON/documentation_local_variable_parseOnly.json b/test/libsolidity/ASTJSON/documentation_local_variable_parseOnly.json index d7a64cad9..93fd1c9bd 100644 --- a/test/libsolidity/ASTJSON/documentation_local_variable_parseOnly.json +++ b/test/libsolidity/ASTJSON/documentation_local_variable_parseOnly.json @@ -349,7 +349,8 @@ "visibility": "public" } ], - "src": "0:666:1" + "src": "0:666:1", + "usedErrors": [] } ], "src": "0:667:1" diff --git a/test/libsolidity/ASTJSON/documentation_on_statements.json b/test/libsolidity/ASTJSON/documentation_on_statements.json index 1be145af7..5253c1115 100644 --- a/test/libsolidity/ASTJSON/documentation_on_statements.json +++ b/test/libsolidity/ASTJSON/documentation_on_statements.json @@ -367,7 +367,8 @@ } ], "scope": 28, - "src": "0:330:1" + "src": "0:330:1", + "usedErrors": [] } ], "src": "0:331:1" diff --git a/test/libsolidity/ASTJSON/documentation_on_statements_parseOnly.json b/test/libsolidity/ASTJSON/documentation_on_statements_parseOnly.json index 27ae70cd7..bb265a4cc 100644 --- a/test/libsolidity/ASTJSON/documentation_on_statements_parseOnly.json +++ b/test/libsolidity/ASTJSON/documentation_on_statements_parseOnly.json @@ -252,7 +252,8 @@ "visibility": "public" } ], - "src": "0:330:1" + "src": "0:330:1", + "usedErrors": [] } ], "src": "0:331:1" diff --git a/test/libsolidity/ASTJSON/documentation_parseOnly.json b/test/libsolidity/ASTJSON/documentation_parseOnly.json index 385af2818..b3cda7e19 100644 --- a/test/libsolidity/ASTJSON/documentation_parseOnly.json +++ b/test/libsolidity/ASTJSON/documentation_parseOnly.json @@ -22,7 +22,8 @@ "nameLocation": "37:1:1", "nodeType": "ContractDefinition", "nodes": [], - "src": "28:13:1" + "src": "28:13:1", + "usedErrors": [] } ], "src": "28:14:1" @@ -50,7 +51,8 @@ "nameLocation": "71:1:2", "nodeType": "ContractDefinition", "nodes": [], - "src": "62:13:2" + "src": "62:13:2", + "usedErrors": [] } ], "src": "62:14:2" @@ -194,7 +196,8 @@ "visibility": "public" } ], - "src": "0:213:3" + "src": "0:213:3", + "usedErrors": [] } ], "src": "0:214:3" diff --git a/test/libsolidity/ASTJSON/documentation_triple.json b/test/libsolidity/ASTJSON/documentation_triple.json index e8de09a3b..977006c3a 100644 --- a/test/libsolidity/ASTJSON/documentation_triple.json +++ b/test/libsolidity/ASTJSON/documentation_triple.json @@ -377,7 +377,8 @@ } ], "scope": 29, - "src": "0:267:1" + "src": "0:267:1", + "usedErrors": [] } ], "src": "0:268:1" diff --git a/test/libsolidity/ASTJSON/documentation_triple_parseOnly.json b/test/libsolidity/ASTJSON/documentation_triple_parseOnly.json index 66590281a..bd6612acc 100644 --- a/test/libsolidity/ASTJSON/documentation_triple_parseOnly.json +++ b/test/libsolidity/ASTJSON/documentation_triple_parseOnly.json @@ -255,7 +255,8 @@ "visibility": "public" } ], - "src": "0:267:1" + "src": "0:267:1", + "usedErrors": [] } ], "src": "0:268:1" diff --git a/test/libsolidity/ASTJSON/enum_value.json b/test/libsolidity/ASTJSON/enum_value.json index 9baf45e36..90d5e498c 100644 --- a/test/libsolidity/ASTJSON/enum_value.json +++ b/test/libsolidity/ASTJSON/enum_value.json @@ -54,7 +54,8 @@ } ], "scope": 5, - "src": "0:30:1" + "src": "0:30:1", + "usedErrors": [] } ], "src": "0:31:1" diff --git a/test/libsolidity/ASTJSON/enum_value_parseOnly.json b/test/libsolidity/ASTJSON/enum_value_parseOnly.json index 58f2f5d35..93b3cffcd 100644 --- a/test/libsolidity/ASTJSON/enum_value_parseOnly.json +++ b/test/libsolidity/ASTJSON/enum_value_parseOnly.json @@ -40,7 +40,8 @@ "src": "13:15:1" } ], - "src": "0:30:1" + "src": "0:30:1", + "usedErrors": [] } ], "src": "0:31:1" diff --git a/test/libsolidity/ASTJSON/event_definition.json b/test/libsolidity/ASTJSON/event_definition.json index 619cd35d0..e2187bbe3 100644 --- a/test/libsolidity/ASTJSON/event_definition.json +++ b/test/libsolidity/ASTJSON/event_definition.json @@ -44,7 +44,8 @@ } ], "scope": 4, - "src": "0:25:1" + "src": "0:25:1", + "usedErrors": [] } ], "src": "0:26:1" diff --git a/test/libsolidity/ASTJSON/event_definition_parseOnly.json b/test/libsolidity/ASTJSON/event_definition_parseOnly.json index b1d9b927a..ee5773a3b 100644 --- a/test/libsolidity/ASTJSON/event_definition_parseOnly.json +++ b/test/libsolidity/ASTJSON/event_definition_parseOnly.json @@ -31,7 +31,8 @@ "src": "13:10:1" } ], - "src": "0:25:1" + "src": "0:25:1", + "usedErrors": [] } ], "src": "0:26:1" diff --git a/test/libsolidity/ASTJSON/fallback.json b/test/libsolidity/ASTJSON/fallback.json index 758876c51..4b9e22e44 100644 --- a/test/libsolidity/ASTJSON/fallback.json +++ b/test/libsolidity/ASTJSON/fallback.json @@ -64,7 +64,8 @@ } ], "scope": 6, - "src": "0:50:1" + "src": "0:50:1", + "usedErrors": [] } ], "src": "0:51:1" diff --git a/test/libsolidity/ASTJSON/fallback_and_reveice_ether.json b/test/libsolidity/ASTJSON/fallback_and_reveice_ether.json index d116cfc1e..0f3b1b69e 100644 --- a/test/libsolidity/ASTJSON/fallback_and_reveice_ether.json +++ b/test/libsolidity/ASTJSON/fallback_and_reveice_ether.json @@ -99,7 +99,8 @@ } ], "scope": 10, - "src": "0:85:1" + "src": "0:85:1", + "usedErrors": [] } ], "src": "0:86:1" diff --git a/test/libsolidity/ASTJSON/fallback_and_reveice_ether_parseOnly.json b/test/libsolidity/ASTJSON/fallback_and_reveice_ether_parseOnly.json index d1a4561d5..55804a9f5 100644 --- a/test/libsolidity/ASTJSON/fallback_and_reveice_ether_parseOnly.json +++ b/test/libsolidity/ASTJSON/fallback_and_reveice_ether_parseOnly.json @@ -84,7 +84,8 @@ "visibility": "external" } ], - "src": "0:85:1" + "src": "0:85:1", + "usedErrors": [] } ], "src": "0:86:1" diff --git a/test/libsolidity/ASTJSON/fallback_parseOnly.json b/test/libsolidity/ASTJSON/fallback_parseOnly.json index 0b0b2670f..4d626dcba 100644 --- a/test/libsolidity/ASTJSON/fallback_parseOnly.json +++ b/test/libsolidity/ASTJSON/fallback_parseOnly.json @@ -50,7 +50,8 @@ "visibility": "external" } ], - "src": "0:50:1" + "src": "0:50:1", + "usedErrors": [] } ], "src": "0:51:1" diff --git a/test/libsolidity/ASTJSON/fallback_payable.json b/test/libsolidity/ASTJSON/fallback_payable.json index 3d86c1f26..1d0f3e627 100644 --- a/test/libsolidity/ASTJSON/fallback_payable.json +++ b/test/libsolidity/ASTJSON/fallback_payable.json @@ -64,7 +64,8 @@ } ], "scope": 6, - "src": "0:38:1" + "src": "0:38:1", + "usedErrors": [] } ], "src": "0:39:1" diff --git a/test/libsolidity/ASTJSON/fallback_payable_parseOnly.json b/test/libsolidity/ASTJSON/fallback_payable_parseOnly.json index ee9e20f79..2d029e56a 100644 --- a/test/libsolidity/ASTJSON/fallback_payable_parseOnly.json +++ b/test/libsolidity/ASTJSON/fallback_payable_parseOnly.json @@ -50,7 +50,8 @@ "visibility": "external" } ], - "src": "0:38:1" + "src": "0:38:1", + "usedErrors": [] } ], "src": "0:39:1" diff --git a/test/libsolidity/ASTJSON/function_type.json b/test/libsolidity/ASTJSON/function_type.json index 872ec28c1..304812905 100644 --- a/test/libsolidity/ASTJSON/function_type.json +++ b/test/libsolidity/ASTJSON/function_type.json @@ -223,7 +223,8 @@ } ], "scope": 18, - "src": "0:124:1" + "src": "0:124:1", + "usedErrors": [] } ], "src": "0:125:1" diff --git a/test/libsolidity/ASTJSON/function_type_parseOnly.json b/test/libsolidity/ASTJSON/function_type_parseOnly.json index d0fa606e9..e47f24ad1 100644 --- a/test/libsolidity/ASTJSON/function_type_parseOnly.json +++ b/test/libsolidity/ASTJSON/function_type_parseOnly.json @@ -172,7 +172,8 @@ "visibility": "public" } ], - "src": "0:124:1" + "src": "0:124:1", + "usedErrors": [] } ], "src": "0:125:1" diff --git a/test/libsolidity/ASTJSON/inheritance_specifier.json b/test/libsolidity/ASTJSON/inheritance_specifier.json index 2fb563d38..debcfdb10 100644 --- a/test/libsolidity/ASTJSON/inheritance_specifier.json +++ b/test/libsolidity/ASTJSON/inheritance_specifier.json @@ -31,7 +31,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 5, - "src": "0:14:1" + "src": "0:14:1", + "usedErrors": [] }, { "abstract": false, @@ -65,7 +66,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 5, - "src": "15:20:1" + "src": "15:20:1", + "usedErrors": [] } ], "src": "0:36:1" diff --git a/test/libsolidity/ASTJSON/inheritance_specifier_parseOnly.json b/test/libsolidity/ASTJSON/inheritance_specifier_parseOnly.json index dc5f0b030..deddb5224 100644 --- a/test/libsolidity/ASTJSON/inheritance_specifier_parseOnly.json +++ b/test/libsolidity/ASTJSON/inheritance_specifier_parseOnly.json @@ -14,7 +14,8 @@ "nameLocation": "9:2:1", "nodeType": "ContractDefinition", "nodes": [], - "src": "0:14:1" + "src": "0:14:1", + "usedErrors": [] }, { "abstract": false, @@ -40,7 +41,8 @@ "nameLocation": "24:2:1", "nodeType": "ContractDefinition", "nodes": [], - "src": "15:20:1" + "src": "15:20:1", + "usedErrors": [] } ], "src": "0:36:1" diff --git a/test/libsolidity/ASTJSON/license.json b/test/libsolidity/ASTJSON/license.json index 89bffe6a9..2afd9a017 100644 --- a/test/libsolidity/ASTJSON/license.json +++ b/test/libsolidity/ASTJSON/license.json @@ -28,7 +28,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 2, - "src": "36:13:1" + "src": "36:13:1", + "usedErrors": [] } ], "src": "36:14:1" diff --git a/test/libsolidity/ASTJSON/license_parseOnly.json b/test/libsolidity/ASTJSON/license_parseOnly.json index 26ce58653..748b2548a 100644 --- a/test/libsolidity/ASTJSON/license_parseOnly.json +++ b/test/libsolidity/ASTJSON/license_parseOnly.json @@ -15,7 +15,8 @@ "nameLocation": "45:1:1", "nodeType": "ContractDefinition", "nodes": [], - "src": "36:13:1" + "src": "36:13:1", + "usedErrors": [] } ], "src": "36:14:1" diff --git a/test/libsolidity/ASTJSON/long_type_name_binary_operation.json b/test/libsolidity/ASTJSON/long_type_name_binary_operation.json index c980ab1ca..a2dbdc41c 100644 --- a/test/libsolidity/ASTJSON/long_type_name_binary_operation.json +++ b/test/libsolidity/ASTJSON/long_type_name_binary_operation.json @@ -166,7 +166,8 @@ } ], "scope": 12, - "src": "0:54:1" + "src": "0:54:1", + "usedErrors": [] } ], "src": "0:55:1" diff --git a/test/libsolidity/ASTJSON/long_type_name_binary_operation_parseOnly.json b/test/libsolidity/ASTJSON/long_type_name_binary_operation_parseOnly.json index cf0c6881e..df2db3926 100644 --- a/test/libsolidity/ASTJSON/long_type_name_binary_operation_parseOnly.json +++ b/test/libsolidity/ASTJSON/long_type_name_binary_operation_parseOnly.json @@ -114,7 +114,8 @@ "visibility": "public" } ], - "src": "0:54:1" + "src": "0:54:1", + "usedErrors": [] } ], "src": "0:55:1" diff --git a/test/libsolidity/ASTJSON/long_type_name_identifier.json b/test/libsolidity/ASTJSON/long_type_name_identifier.json index db240f5fe..8263dcda2 100644 --- a/test/libsolidity/ASTJSON/long_type_name_identifier.json +++ b/test/libsolidity/ASTJSON/long_type_name_identifier.json @@ -175,7 +175,8 @@ } ], "scope": 16, - "src": "0:70:1" + "src": "0:70:1", + "usedErrors": [] } ], "src": "0:71:1" diff --git a/test/libsolidity/ASTJSON/long_type_name_identifier_parseOnly.json b/test/libsolidity/ASTJSON/long_type_name_identifier_parseOnly.json index 4f92ad651..ef76f30aa 100644 --- a/test/libsolidity/ASTJSON/long_type_name_identifier_parseOnly.json +++ b/test/libsolidity/ASTJSON/long_type_name_identifier_parseOnly.json @@ -129,7 +129,8 @@ "visibility": "public" } ], - "src": "0:70:1" + "src": "0:70:1", + "usedErrors": [] } ], "src": "0:71:1" diff --git a/test/libsolidity/ASTJSON/mappings.json b/test/libsolidity/ASTJSON/mappings.json index 2aee1601e..f3951853e 100644 --- a/test/libsolidity/ASTJSON/mappings.json +++ b/test/libsolidity/ASTJSON/mappings.json @@ -236,7 +236,8 @@ } ], "scope": 20, - "src": "0:121:1" + "src": "0:121:1", + "usedErrors": [] } ], "src": "0:122:1" diff --git a/test/libsolidity/ASTJSON/mappings_parseOnly.json b/test/libsolidity/ASTJSON/mappings_parseOnly.json index c29ee050e..977ee776c 100644 --- a/test/libsolidity/ASTJSON/mappings_parseOnly.json +++ b/test/libsolidity/ASTJSON/mappings_parseOnly.json @@ -167,7 +167,8 @@ "visibility": "internal" } ], - "src": "0:121:1" + "src": "0:121:1", + "usedErrors": [] } ], "src": "0:122:1" diff --git a/test/libsolidity/ASTJSON/modifier_definition.json b/test/libsolidity/ASTJSON/modifier_definition.json index b20afd429..cddfdd273 100644 --- a/test/libsolidity/ASTJSON/modifier_definition.json +++ b/test/libsolidity/ASTJSON/modifier_definition.json @@ -163,7 +163,8 @@ } ], "scope": 15, - "src": "0:68:1" + "src": "0:68:1", + "usedErrors": [] } ], "src": "0:69:1" diff --git a/test/libsolidity/ASTJSON/modifier_definition_parseOnly.json b/test/libsolidity/ASTJSON/modifier_definition_parseOnly.json index a0249ae86..a31b1f240 100644 --- a/test/libsolidity/ASTJSON/modifier_definition_parseOnly.json +++ b/test/libsolidity/ASTJSON/modifier_definition_parseOnly.json @@ -129,7 +129,8 @@ "visibility": "public" } ], - "src": "0:68:1" + "src": "0:68:1", + "usedErrors": [] } ], "src": "0:69:1" diff --git a/test/libsolidity/ASTJSON/modifier_invocation.json b/test/libsolidity/ASTJSON/modifier_invocation.json index b20afd429..cddfdd273 100644 --- a/test/libsolidity/ASTJSON/modifier_invocation.json +++ b/test/libsolidity/ASTJSON/modifier_invocation.json @@ -163,7 +163,8 @@ } ], "scope": 15, - "src": "0:68:1" + "src": "0:68:1", + "usedErrors": [] } ], "src": "0:69:1" diff --git a/test/libsolidity/ASTJSON/modifier_invocation_parseOnly.json b/test/libsolidity/ASTJSON/modifier_invocation_parseOnly.json index a0249ae86..a31b1f240 100644 --- a/test/libsolidity/ASTJSON/modifier_invocation_parseOnly.json +++ b/test/libsolidity/ASTJSON/modifier_invocation_parseOnly.json @@ -129,7 +129,8 @@ "visibility": "public" } ], - "src": "0:68:1" + "src": "0:68:1", + "usedErrors": [] } ], "src": "0:69:1" diff --git a/test/libsolidity/ASTJSON/mutability.json b/test/libsolidity/ASTJSON/mutability.json index 242feda49..0adce73a7 100644 --- a/test/libsolidity/ASTJSON/mutability.json +++ b/test/libsolidity/ASTJSON/mutability.json @@ -176,7 +176,8 @@ } ], "scope": 11, - "src": "0:102:1" + "src": "0:102:1", + "usedErrors": [] } ], "src": "0:103:1" diff --git a/test/libsolidity/ASTJSON/mutability_parseOnly.json b/test/libsolidity/ASTJSON/mutability_parseOnly.json index 0ec1feaba..88d3968f2 100644 --- a/test/libsolidity/ASTJSON/mutability_parseOnly.json +++ b/test/libsolidity/ASTJSON/mutability_parseOnly.json @@ -109,7 +109,8 @@ "visibility": "public" } ], - "src": "0:102:1" + "src": "0:102:1", + "usedErrors": [] } ], "src": "0:103:1" diff --git a/test/libsolidity/ASTJSON/non_utf8.json b/test/libsolidity/ASTJSON/non_utf8.json index 447fc7765..5c433531a 100644 --- a/test/libsolidity/ASTJSON/non_utf8.json +++ b/test/libsolidity/ASTJSON/non_utf8.json @@ -126,7 +126,8 @@ } ], "scope": 10, - "src": "0:65:1" + "src": "0:65:1", + "usedErrors": [] } ], "src": "0:66:1" diff --git a/test/libsolidity/ASTJSON/non_utf8_parseOnly.json b/test/libsolidity/ASTJSON/non_utf8_parseOnly.json index 9bd73fc3f..e33388a07 100644 --- a/test/libsolidity/ASTJSON/non_utf8_parseOnly.json +++ b/test/libsolidity/ASTJSON/non_utf8_parseOnly.json @@ -94,7 +94,8 @@ "visibility": "public" } ], - "src": "0:65:1" + "src": "0:65:1", + "usedErrors": [] } ], "src": "0:66:1" diff --git a/test/libsolidity/ASTJSON/not_existing_import_parseOnly.json b/test/libsolidity/ASTJSON/not_existing_import_parseOnly.json index aacb25cb0..a42a10aed 100644 --- a/test/libsolidity/ASTJSON/not_existing_import_parseOnly.json +++ b/test/libsolidity/ASTJSON/not_existing_import_parseOnly.json @@ -99,7 +99,8 @@ "virtual": false } ], - "src": "41:90:1" + "src": "41:90:1", + "usedErrors": [] } ], "src": "0:132:1" diff --git a/test/libsolidity/ASTJSON/override.json b/test/libsolidity/ASTJSON/override.json index d433342b5..1eda7ba09 100644 --- a/test/libsolidity/ASTJSON/override.json +++ b/test/libsolidity/ASTJSON/override.json @@ -73,7 +73,8 @@ } ], "scope": 30, - "src": "0:48:1" + "src": "0:48:1", + "usedErrors": [] }, { "abstract": true, @@ -185,7 +186,8 @@ } ], "scope": 30, - "src": "49:103:1" + "src": "49:103:1", + "usedErrors": [] }, { "abstract": false, @@ -316,7 +318,8 @@ } ], "scope": 30, - "src": "153:91:1" + "src": "153:91:1", + "usedErrors": [] } ], "src": "0:245:1" diff --git a/test/libsolidity/ASTJSON/override_parseOnly.json b/test/libsolidity/ASTJSON/override_parseOnly.json index d75b9b8e5..b092df459 100644 --- a/test/libsolidity/ASTJSON/override_parseOnly.json +++ b/test/libsolidity/ASTJSON/override_parseOnly.json @@ -50,7 +50,8 @@ "visibility": "public" } ], - "src": "0:48:1" + "src": "0:48:1", + "usedErrors": [] }, { "abstract": true, @@ -146,7 +147,8 @@ "visibility": "public" } ], - "src": "49:103:1" + "src": "49:103:1", + "usedErrors": [] }, { "abstract": false, @@ -256,7 +258,8 @@ "visibility": "public" } ], - "src": "153:91:1" + "src": "153:91:1", + "usedErrors": [] } ], "src": "0:245:1" diff --git a/test/libsolidity/ASTJSON/placeholder_statement.json b/test/libsolidity/ASTJSON/placeholder_statement.json index 4db3665ec..62631f003 100644 --- a/test/libsolidity/ASTJSON/placeholder_statement.json +++ b/test/libsolidity/ASTJSON/placeholder_statement.json @@ -59,7 +59,8 @@ } ], "scope": 6, - "src": "0:32:1" + "src": "0:32:1", + "usedErrors": [] } ], "src": "0:33:1" diff --git a/test/libsolidity/ASTJSON/placeholder_statement_parseOnly.json b/test/libsolidity/ASTJSON/placeholder_statement_parseOnly.json index f0748ea5e..8f73cde60 100644 --- a/test/libsolidity/ASTJSON/placeholder_statement_parseOnly.json +++ b/test/libsolidity/ASTJSON/placeholder_statement_parseOnly.json @@ -46,7 +46,8 @@ "visibility": "internal" } ], - "src": "0:32:1" + "src": "0:32:1", + "usedErrors": [] } ], "src": "0:33:1" diff --git a/test/libsolidity/ASTJSON/receive_ether.json b/test/libsolidity/ASTJSON/receive_ether.json index 549cf325d..b36dcd338 100644 --- a/test/libsolidity/ASTJSON/receive_ether.json +++ b/test/libsolidity/ASTJSON/receive_ether.json @@ -64,7 +64,8 @@ } ], "scope": 6, - "src": "0:49:1" + "src": "0:49:1", + "usedErrors": [] } ], "src": "0:50:1" diff --git a/test/libsolidity/ASTJSON/receive_ether_parseOnly.json b/test/libsolidity/ASTJSON/receive_ether_parseOnly.json index 4855a18e0..413c10564 100644 --- a/test/libsolidity/ASTJSON/receive_ether_parseOnly.json +++ b/test/libsolidity/ASTJSON/receive_ether_parseOnly.json @@ -50,7 +50,8 @@ "visibility": "external" } ], - "src": "0:49:1" + "src": "0:49:1", + "usedErrors": [] } ], "src": "0:50:1" diff --git a/test/libsolidity/ASTJSON/short_type_name.json b/test/libsolidity/ASTJSON/short_type_name.json index b320c9979..a4d25b46f 100644 --- a/test/libsolidity/ASTJSON/short_type_name.json +++ b/test/libsolidity/ASTJSON/short_type_name.json @@ -120,7 +120,8 @@ } ], "scope": 12, - "src": "0:55:1" + "src": "0:55:1", + "usedErrors": [] } ], "src": "0:56:1" diff --git a/test/libsolidity/ASTJSON/short_type_name_parseOnly.json b/test/libsolidity/ASTJSON/short_type_name_parseOnly.json index a88babaa6..02590363a 100644 --- a/test/libsolidity/ASTJSON/short_type_name_parseOnly.json +++ b/test/libsolidity/ASTJSON/short_type_name_parseOnly.json @@ -92,7 +92,8 @@ "visibility": "public" } ], - "src": "0:55:1" + "src": "0:55:1", + "usedErrors": [] } ], "src": "0:56:1" diff --git a/test/libsolidity/ASTJSON/short_type_name_ref.json b/test/libsolidity/ASTJSON/short_type_name_ref.json index e6dde6f4d..eba4ae96d 100644 --- a/test/libsolidity/ASTJSON/short_type_name_ref.json +++ b/test/libsolidity/ASTJSON/short_type_name_ref.json @@ -131,7 +131,8 @@ } ], "scope": 13, - "src": "0:60:1" + "src": "0:60:1", + "usedErrors": [] } ], "src": "0:61:1" diff --git a/test/libsolidity/ASTJSON/short_type_name_ref_parseOnly.json b/test/libsolidity/ASTJSON/short_type_name_ref_parseOnly.json index bd6883813..00799a212 100644 --- a/test/libsolidity/ASTJSON/short_type_name_ref_parseOnly.json +++ b/test/libsolidity/ASTJSON/short_type_name_ref_parseOnly.json @@ -99,7 +99,8 @@ "visibility": "public" } ], - "src": "0:60:1" + "src": "0:60:1", + "usedErrors": [] } ], "src": "0:61:1" diff --git a/test/libsolidity/ASTJSON/smoke.json b/test/libsolidity/ASTJSON/smoke.json index 3561ace5e..b32ff7673 100644 --- a/test/libsolidity/ASTJSON/smoke.json +++ b/test/libsolidity/ASTJSON/smoke.json @@ -27,7 +27,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 2, - "src": "0:13:1" + "src": "0:13:1", + "usedErrors": [] } ], "src": "0:14:1" diff --git a/test/libsolidity/ASTJSON/smoke_parseOnly.json b/test/libsolidity/ASTJSON/smoke_parseOnly.json index c8a86073f..d03e98654 100644 --- a/test/libsolidity/ASTJSON/smoke_parseOnly.json +++ b/test/libsolidity/ASTJSON/smoke_parseOnly.json @@ -14,7 +14,8 @@ "nameLocation": "9:1:1", "nodeType": "ContractDefinition", "nodes": [], - "src": "0:13:1" + "src": "0:13:1", + "usedErrors": [] } ], "src": "0:14:1" diff --git a/test/libsolidity/ASTJSON/source_location.json b/test/libsolidity/ASTJSON/source_location.json index 379257401..0518c8a1b 100644 --- a/test/libsolidity/ASTJSON/source_location.json +++ b/test/libsolidity/ASTJSON/source_location.json @@ -163,7 +163,8 @@ } ], "scope": 13, - "src": "0:48:1" + "src": "0:48:1", + "usedErrors": [] } ], "src": "0:49:1" diff --git a/test/libsolidity/ASTJSON/source_location_parseOnly.json b/test/libsolidity/ASTJSON/source_location_parseOnly.json index 96f04708f..decc215fe 100644 --- a/test/libsolidity/ASTJSON/source_location_parseOnly.json +++ b/test/libsolidity/ASTJSON/source_location_parseOnly.json @@ -118,7 +118,8 @@ "visibility": "public" } ], - "src": "0:48:1" + "src": "0:48:1", + "usedErrors": [] } ], "src": "0:49:1" diff --git a/test/libsolidity/ASTJSON/string.json b/test/libsolidity/ASTJSON/string.json index 748423fe0..67f5c16f7 100644 --- a/test/libsolidity/ASTJSON/string.json +++ b/test/libsolidity/ASTJSON/string.json @@ -127,7 +127,8 @@ } ], "scope": 10, - "src": "0:71:1" + "src": "0:71:1", + "usedErrors": [] } ], "src": "0:72:1" diff --git a/test/libsolidity/ASTJSON/string_parseOnly.json b/test/libsolidity/ASTJSON/string_parseOnly.json index 607ab5dc5..444a1f7b2 100644 --- a/test/libsolidity/ASTJSON/string_parseOnly.json +++ b/test/libsolidity/ASTJSON/string_parseOnly.json @@ -95,7 +95,8 @@ "visibility": "public" } ], - "src": "0:71:1" + "src": "0:71:1", + "usedErrors": [] } ], "src": "0:72:1" diff --git a/test/libsolidity/ASTJSON/two_base_functions.json b/test/libsolidity/ASTJSON/two_base_functions.json index f6c7a176e..dde1c5d61 100644 --- a/test/libsolidity/ASTJSON/two_base_functions.json +++ b/test/libsolidity/ASTJSON/two_base_functions.json @@ -73,7 +73,8 @@ } ], "scope": 23, - "src": "0:49:1" + "src": "0:49:1", + "usedErrors": [] }, { "abstract": false, @@ -129,7 +130,8 @@ } ], "scope": 23, - "src": "50:49:1" + "src": "50:49:1", + "usedErrors": [] }, { "abstract": false, @@ -243,7 +245,8 @@ } ], "scope": 23, - "src": "100:64:1" + "src": "100:64:1", + "usedErrors": [] } ], "src": "0:165:1" diff --git a/test/libsolidity/ASTJSON/two_base_functions_parseOnly.json b/test/libsolidity/ASTJSON/two_base_functions_parseOnly.json index 8858b2079..7a077e705 100644 --- a/test/libsolidity/ASTJSON/two_base_functions_parseOnly.json +++ b/test/libsolidity/ASTJSON/two_base_functions_parseOnly.json @@ -50,7 +50,8 @@ "visibility": "public" } ], - "src": "0:49:1" + "src": "0:49:1", + "usedErrors": [] }, { "abstract": false, @@ -98,7 +99,8 @@ "visibility": "public" } ], - "src": "50:49:1" + "src": "50:49:1", + "usedErrors": [] }, { "abstract": false, @@ -193,7 +195,8 @@ "visibility": "public" } ], - "src": "100:64:1" + "src": "100:64:1", + "usedErrors": [] } ], "src": "0:165:1" diff --git a/test/libsolidity/ASTJSON/unicode.json b/test/libsolidity/ASTJSON/unicode.json index de4b74e77..937a40943 100644 --- a/test/libsolidity/ASTJSON/unicode.json +++ b/test/libsolidity/ASTJSON/unicode.json @@ -127,7 +127,8 @@ } ], "scope": 10, - "src": "0:77:1" + "src": "0:77:1", + "usedErrors": [] } ], "src": "0:78:1" diff --git a/test/libsolidity/ASTJSON/unicode_parseOnly.json b/test/libsolidity/ASTJSON/unicode_parseOnly.json index 8d36703c8..a6f52aa4a 100644 --- a/test/libsolidity/ASTJSON/unicode_parseOnly.json +++ b/test/libsolidity/ASTJSON/unicode_parseOnly.json @@ -95,7 +95,8 @@ "visibility": "public" } ], - "src": "0:77:1" + "src": "0:77:1", + "usedErrors": [] } ], "src": "0:78:1" diff --git a/test/libsolidity/ASTJSON/used_errors.json b/test/libsolidity/ASTJSON/used_errors.json new file mode 100644 index 000000000..5e7d0bc3a --- /dev/null +++ b/test/libsolidity/ASTJSON/used_errors.json @@ -0,0 +1,230 @@ +{ + "absolutePath": "a", + "exportedSymbols": + { + "C": + [ + 19 + ], + "X": + [ + 2 + ], + "f": + [ + 9 + ] + }, + "id": 20, + "nodeType": "SourceUnit", + "nodes": + [ + { + "id": 2, + "name": "X", + "nameLocation": "6:1:1", + "nodeType": "ErrorDefinition", + "parameters": + { + "id": 1, + "nodeType": "ParameterList", + "parameters": [], + "src": "7:2:1" + }, + "src": "0:10:1" + }, + { + "body": + { + "id": 8, + "nodeType": "Block", + "src": "24:15:1", + "statements": + [ + { + "errorCall": + { + "arguments": [], + "expression": + { + "argumentTypes": [], + "id": 5, + "name": "X", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 2, + "src": "33:1:1", + "typeDescriptions": + { + "typeIdentifier": "t_function_error_pure$__$returns$__$", + "typeString": "function () pure" + } + }, + "id": 6, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "33:3:1", + "tryCall": false, + "typeDescriptions": + { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 7, + "nodeType": "RevertStatement", + "src": "26:10:1" + } + ] + }, + "id": 9, + "implemented": true, + "kind": "freeFunction", + "modifiers": [], + "name": "f", + "nameLocation": "20:1:1", + "nodeType": "FunctionDefinition", + "parameters": + { + "id": 3, + "nodeType": "ParameterList", + "parameters": [], + "src": "21:2:1" + }, + "returnParameters": + { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "24:0:1" + }, + "scope": 20, + "src": "11:28:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "fullyImplemented": true, + "id": 19, + "linearizedBaseContracts": + [ + 19 + ], + "name": "C", + "nameLocation": "49:1:1", + "nodeType": "ContractDefinition", + "nodes": + [ + { + "id": 11, + "name": "T", + "nameLocation": "63:1:1", + "nodeType": "ErrorDefinition", + "parameters": + { + "id": 10, + "nodeType": "ParameterList", + "parameters": [], + "src": "64:2:1" + }, + "src": "57:10:1" + }, + { + "body": + { + "id": 17, + "nodeType": "Block", + "src": "97:8:1", + "statements": + [ + { + "expression": + { + "arguments": [], + "expression": + { + "argumentTypes": [], + "id": 14, + "name": "f", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "referencedDeclaration": 9, + "src": "99:1:1", + "typeDescriptions": + { + "typeIdentifier": "t_function_internal_nonpayable$__$returns$__$", + "typeString": "function ()" + } + }, + "id": 15, + "isConstant": false, + "isLValue": false, + "isPure": false, + "kind": "functionCall", + "lValueRequested": false, + "names": [], + "nodeType": "FunctionCall", + "src": "99:3:1", + "tryCall": false, + "typeDescriptions": + { + "typeIdentifier": "t_tuple$__$", + "typeString": "tuple()" + } + }, + "id": 16, + "nodeType": "ExpressionStatement", + "src": "99:3:1" + } + ] + }, + "functionSelector": "b8c9d365", + "id": 18, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "h", + "nameLocation": "81:1:1", + "nodeType": "FunctionDefinition", + "parameters": + { + "id": 12, + "nodeType": "ParameterList", + "parameters": [], + "src": "82:2:1" + }, + "returnParameters": + { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "97:0:1" + }, + "scope": 19, + "src": "72:33:1", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "scope": 20, + "src": "40:67:1", + "usedErrors": + [ + 2, + 11 + ] + } + ], + "src": "0:108:1" +} diff --git a/test/libsolidity/ASTJSON/used_errors.sol b/test/libsolidity/ASTJSON/used_errors.sol new file mode 100644 index 000000000..e891a20ee --- /dev/null +++ b/test/libsolidity/ASTJSON/used_errors.sol @@ -0,0 +1,8 @@ +error X(); +function f() { revert X(); } +contract C { + error T(); + function h() public pure { f(); } +} + +// ---- diff --git a/test/libsolidity/ASTJSON/used_errors_parseOnly.json b/test/libsolidity/ASTJSON/used_errors_parseOnly.json new file mode 100644 index 000000000..162f441c4 --- /dev/null +++ b/test/libsolidity/ASTJSON/used_errors_parseOnly.json @@ -0,0 +1,172 @@ +{ + "absolutePath": "a", + "id": 20, + "nodeType": "SourceUnit", + "nodes": + [ + { + "id": 2, + "name": "X", + "nameLocation": "6:1:1", + "nodeType": "ErrorDefinition", + "parameters": + { + "id": 1, + "nodeType": "ParameterList", + "parameters": [], + "src": "7:2:1" + }, + "src": "0:10:1" + }, + { + "body": + { + "id": 8, + "nodeType": "Block", + "src": "24:15:1", + "statements": + [ + { + "errorCall": + { + "arguments": [], + "expression": + { + "id": 5, + "name": "X", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "33:1:1", + "typeDescriptions": {} + }, + "id": 6, + "names": [], + "nodeType": "FunctionCall", + "src": "33:3:1", + "tryCall": false, + "typeDescriptions": {} + }, + "id": 7, + "nodeType": "RevertStatement", + "src": "26:10:1" + } + ] + }, + "id": 9, + "implemented": true, + "kind": "freeFunction", + "modifiers": [], + "name": "f", + "nameLocation": "20:1:1", + "nodeType": "FunctionDefinition", + "parameters": + { + "id": 3, + "nodeType": "ParameterList", + "parameters": [], + "src": "21:2:1" + }, + "returnParameters": + { + "id": 4, + "nodeType": "ParameterList", + "parameters": [], + "src": "24:0:1" + }, + "src": "11:28:1", + "stateMutability": "nonpayable", + "virtual": false, + "visibility": "internal" + }, + { + "abstract": false, + "baseContracts": [], + "contractDependencies": [], + "contractKind": "contract", + "id": 19, + "name": "C", + "nameLocation": "49:1:1", + "nodeType": "ContractDefinition", + "nodes": + [ + { + "id": 11, + "name": "T", + "nameLocation": "63:1:1", + "nodeType": "ErrorDefinition", + "parameters": + { + "id": 10, + "nodeType": "ParameterList", + "parameters": [], + "src": "64:2:1" + }, + "src": "57:10:1" + }, + { + "body": + { + "id": 17, + "nodeType": "Block", + "src": "97:8:1", + "statements": + [ + { + "expression": + { + "arguments": [], + "expression": + { + "id": 14, + "name": "f", + "nodeType": "Identifier", + "overloadedDeclarations": [], + "src": "99:1:1", + "typeDescriptions": {} + }, + "id": 15, + "names": [], + "nodeType": "FunctionCall", + "src": "99:3:1", + "tryCall": false, + "typeDescriptions": {} + }, + "id": 16, + "nodeType": "ExpressionStatement", + "src": "99:3:1" + } + ] + }, + "id": 18, + "implemented": true, + "kind": "function", + "modifiers": [], + "name": "h", + "nameLocation": "81:1:1", + "nodeType": "FunctionDefinition", + "parameters": + { + "id": 12, + "nodeType": "ParameterList", + "parameters": [], + "src": "82:2:1" + }, + "returnParameters": + { + "id": 13, + "nodeType": "ParameterList", + "parameters": [], + "src": "97:0:1" + }, + "src": "72:33:1", + "stateMutability": "pure", + "virtual": false, + "visibility": "public" + } + ], + "src": "40:67:1", + "usedErrors": [] + } + ], + "src": "0:108:1" +} diff --git a/test/libsolidity/ASTJSON/using_for_directive.json b/test/libsolidity/ASTJSON/using_for_directive.json index 00fbca234..b8a8fd3b7 100644 --- a/test/libsolidity/ASTJSON/using_for_directive.json +++ b/test/libsolidity/ASTJSON/using_for_directive.json @@ -31,7 +31,8 @@ "nodeType": "ContractDefinition", "nodes": [], "scope": 6, - "src": "0:12:1" + "src": "0:12:1", + "usedErrors": [] }, { "abstract": false, @@ -76,7 +77,8 @@ } ], "scope": 6, - "src": "13:32:1" + "src": "13:32:1", + "usedErrors": [] } ], "src": "0:46:1" diff --git a/test/libsolidity/ASTJSON/using_for_directive_parseOnly.json b/test/libsolidity/ASTJSON/using_for_directive_parseOnly.json index 486d76d71..b4b016ac1 100644 --- a/test/libsolidity/ASTJSON/using_for_directive_parseOnly.json +++ b/test/libsolidity/ASTJSON/using_for_directive_parseOnly.json @@ -14,7 +14,8 @@ "nameLocation": "8:1:1", "nodeType": "ContractDefinition", "nodes": [], - "src": "0:12:1" + "src": "0:12:1", + "usedErrors": [] }, { "abstract": false, @@ -48,7 +49,8 @@ } } ], - "src": "13:32:1" + "src": "13:32:1", + "usedErrors": [] } ], "src": "0:46:1" diff --git a/test/libsolidity/StandardCompiler.cpp b/test/libsolidity/StandardCompiler.cpp index a1f9c06a3..7e0d5de29 100644 --- a/test/libsolidity/StandardCompiler.cpp +++ b/test/libsolidity/StandardCompiler.cpp @@ -474,7 +474,7 @@ BOOST_AUTO_TEST_CASE(basic_compilation) "{\"absolutePath\":\"fileA\",\"exportedSymbols\":{\"A\":[1]},\"id\":2,\"nodeType\":\"SourceUnit\",\"nodes\":[{\"abstract\":false," "\"baseContracts\":[],\"contractDependencies\":[],\"contractKind\":\"contract\",\"fullyImplemented\":true,\"id\":1," "\"linearizedBaseContracts\":[1],\"name\":\"A\",\"nameLocation\":\"9:1:0\",\"nodeType\":\"ContractDefinition\",\"nodes\":[],\"scope\":2," - "\"src\":\"0:14:0\"}],\"src\":\"0:14:0\"}" + "\"src\":\"0:14:0\",\"usedErrors\":[]}],\"src\":\"0:14:0\"}" ); }