From be248312866b820a297faff6ec4b7681c87bc12b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Gir=C3=A1ldez?= Date: Mon, 23 Dec 2024 11:57:22 -0500 Subject: [PATCH] Test definiens cursors and verify that all identifiers are bound (#1200) Closes #1191 Closes #1199 - Add output of definiens cursors in all bindings snapshots - Check all `Identifier` and `YulIdentifier` nodes are bound to a reference or definition (except those under `ExperimentalFeature`) in snapshots - Fix missing binding for catch clauses: the identifiers there can only be `Error` or `Panic`, but they are still parsed as identifiers (maybe it's better to add them as keywords?). Also added them as error definitions in built-ins. - Relax modifier definition rules to bind the name identifier even if failing to parse the body. --- .../inputs/language/bindings/rules.msgb | 14 +- .../inputs/language/src/definition.rs | 12 ++ .../bindings/generated/binding_rules.rs | 14 +- .../bindings/generated/built_ins/0.6.0.sol | 6 + .../bindings/generated/built_ins/0.6.2.sol | 6 + .../bindings/generated/built_ins/0.6.7.sol | 6 + .../bindings/generated/built_ins/0.6.8.sol | 6 + .../bindings/generated/built_ins/0.7.0.sol | 6 + .../bindings/generated/built_ins/0.8.0.sol | 6 + .../bindings/generated/built_ins/0.8.11.sol | 6 + .../bindings/generated/built_ins/0.8.18.sol | 6 + .../bindings/generated/built_ins/0.8.2.sol | 6 + .../bindings/generated/built_ins/0.8.24.sol | 6 + .../bindings/generated/built_ins/0.8.26.sol | 6 + .../bindings/generated/built_ins/0.8.4.sol | 6 + .../bindings/generated/built_ins/0.8.7.sol | 6 + .../bindings/generated/built_ins/0.8.8.sol | 6 + .../src/bindings_output/generated/control.rs | 5 + .../tests/src/bindings_output/renderer.rs | 111 ++++++++++++-- .../solidity/testing/sanctuary/src/tests.rs | 70 ++++++--- .../indexing/generated/0.4.11-success.txt | 39 ++++- .../length/generated/0.4.11-success.txt | 37 ++++- .../address/generated/0.4.11-failure.txt | 63 ++++++-- .../address/generated/0.5.0-success.txt | 63 ++++++-- .../array_push/generated/0.4.11-failure.txt | 31 +++- .../array_push/generated/0.6.0-success.txt | 31 +++- .../arrays/generated/0.4.11-success.txt | 27 +++- .../arrays/generated/0.6.0-success.txt | 27 +++- .../bytes/generated/0.4.11-success.txt | 54 +++++-- .../generated/0.4.11-failure.txt | 78 ++++++++-- .../generated/0.4.21-failure.txt | 78 ++++++++-- .../function_type/generated/0.8.4-success.txt | 78 ++++++++-- .../functions/generated/0.4.11-failure.txt | 143 +++++++++++++++--- .../functions/generated/0.4.21-failure.txt | 143 +++++++++++++++--- .../functions/generated/0.4.22-failure.txt | 143 +++++++++++++++--- .../functions/generated/0.5.0-failure.txt | 143 +++++++++++++++--- .../functions/generated/0.8.13-failure.txt | 143 +++++++++++++++--- .../functions/generated/0.8.24-success.txt | 143 +++++++++++++++--- .../functions/generated/0.8.27-success.txt | 143 +++++++++++++++--- .../functions/generated/0.8.4-failure.txt | 143 +++++++++++++++--- .../generated/0.4.11-failure.txt | 105 ++++++++++--- .../generated/0.8.0-failure.txt | 105 ++++++++++--- .../generated/0.8.18-failure.txt | 105 ++++++++++--- .../generated/0.8.24-success.txt | 105 ++++++++++--- .../generated/0.8.7-failure.txt | 105 ++++++++++--- .../shadowing/generated/0.4.11-failure.txt | 34 ++++- .../shadowing/generated/0.6.0-failure.txt | 34 ++++- .../shadowing/generated/0.7.1-success.txt | 40 ++++- .../this/generated/0.4.11-success.txt | 17 ++- .../generated/0.4.11-success.txt | 17 ++- .../generated/0.5.0-failure.txt | 17 ++- .../type_expr/generated/0.4.11-failure.txt | 120 ++++++++++++--- .../type_expr/generated/0.5.3-failure.txt | 120 ++++++++++++--- .../type_expr/generated/0.6.7-failure.txt | 120 ++++++++++++--- .../type_expr/generated/0.6.8-success.txt | 120 ++++++++++++--- .../generated/0.4.11-failure.txt | 16 +- .../generated/0.4.22-success.txt | 16 +- .../generated/0.4.11-failure.txt | 34 ++++- .../generated/0.4.22-success.txt | 39 ++++- .../generated/0.5.0-success.txt | 39 ++++- .../generated/0.4.11-failure.txt | 22 ++- .../generated/0.4.22-success.txt | 27 +++- .../constructors/generated/0.4.11-failure.txt | 16 +- .../constructors/generated/0.4.22-success.txt | 22 ++- .../generated/0.4.11-failure.txt | 29 +++- .../generated/0.6.0-success.txt | 39 ++++- .../inheritance/generated/0.4.11-success.txt | 31 +++- .../generated/0.4.11-success.txt | 39 ++++- .../generated/0.4.11-failure.txt | 1 + .../generated/0.6.0-success.txt | 38 ++++- .../generated/0.4.11-success.txt | 21 ++- .../generated/0.5.0-failure.txt | 21 ++- .../generated/0.4.11-success.txt | 33 +++- .../generated/0.7.0-failure.txt | 33 +++- .../generated/0.4.11-success.txt | 41 ++++- .../generated/0.4.11-success.txt | 32 +++- .../generated/0.4.11-success.txt | 32 +++- .../generated/0.4.11-success.txt | 39 ++++- .../generated/0.4.11-success.txt | 40 ++++- .../generated/0.4.11-success.txt | 32 +++- .../generated/0.4.11-success.txt | 41 ++++- .../generated/0.4.11-success.txt | 28 +++- .../generated/0.4.11-success.txt | 33 +++- .../super_deep/generated/0.4.11-success.txt | 33 +++- .../generated/0.4.11-success.txt | 54 ++++++- .../super_scope/generated/0.4.11-failure.txt | 31 +++- .../super_scope/generated/0.4.16-failure.txt | 32 +++- .../super_scope/generated/0.5.0-failure.txt | 32 +++- .../super_scope/generated/0.6.0-success.txt | 32 +++- .../this_scope/generated/0.4.11-success.txt | 22 ++- .../generated/0.4.11-success.txt | 11 +- .../generated/0.4.22-success.txt | 11 +- .../generated/0.6.0-failure.txt | 11 +- .../generated/0.6.5-failure.txt | 11 +- .../generated/0.8.27-failure.txt | 11 +- .../generated/0.4.11-success.txt | 34 ++++- .../generated/0.4.11-failure.txt | 57 ++++++- .../generated/0.4.16-failure.txt | 60 +++++++- .../generated/0.5.0-failure.txt | 58 ++++++- .../generated/0.6.0-success.txt | 60 +++++++- .../visibility/generated/0.4.11-success.txt | 67 ++++++-- .../emit_event/generated/0.4.11-failure.txt | 37 ++++- .../emit_event/generated/0.4.21-success.txt | 32 +++- .../generated/0.4.11-success.txt | 22 ++- .../generated/0.4.11-success.txt | 27 +++- .../generated/0.4.11-success.txt | 27 +++- .../generated/0.4.11-success.txt | 27 +++- .../for_stmt/generated/0.4.11-success.txt | 32 +++- .../generated/0.4.11-success.txt | 31 +++- .../if_else/generated/0.4.11-success.txt | 45 +++++- .../try_catch/generated/0.4.11-failure.txt | 43 ++++++ .../try_catch/generated/0.4.21-failure.txt | 43 ++++++ .../try_catch/generated/0.5.0-failure.txt | 43 ++++++ .../try_catch/generated/0.5.3-failure.txt | 43 ++++++ .../try_catch/generated/0.6.0-success.txt | 60 ++++++++ .../control/try_catch/input.sol | 12 ++ .../try_stmt/generated/0.4.11-failure.txt | 67 ++++++-- .../try_stmt/generated/0.4.21-failure.txt | 67 ++++++-- .../try_stmt/generated/0.5.0-failure.txt | 67 ++++++-- .../try_stmt/generated/0.5.3-failure.txt | 67 ++++++-- .../try_stmt/generated/0.6.0-success.txt | 82 ++++++++-- .../while_stmt/generated/0.4.11-success.txt | 22 ++- .../enums/decls/generated/0.4.11-failure.txt | 63 ++++++-- .../enums/decls/generated/0.6.0-success.txt | 85 ++++++++--- .../in_params/generated/0.4.11-success.txt | 53 +++++-- .../generated/0.4.11-success.txt | 29 +++- .../enums/sample/generated/0.4.11-failure.txt | 51 +++++-- .../enums/sample/generated/0.4.16-failure.txt | 78 ++++++++-- .../enums/sample/generated/0.5.3-failure.txt | 78 ++++++++-- .../enums/sample/generated/0.6.8-success.txt | 78 ++++++++-- .../custom_types/generated/0.4.11-failure.txt | 45 +++++- .../custom_types/generated/0.4.22-failure.txt | 45 +++++- .../custom_types/generated/0.8.4-success.txt | 50 +++++- .../selector/generated/0.4.11-failure.txt | 22 ++- .../selector/generated/0.8.4-success.txt | 22 ++- .../custom_types/generated/0.4.11-failure.txt | 55 +++++-- .../custom_types/generated/0.4.21-success.txt | 50 +++++- .../generated/0.4.11-success.txt | 50 ++++-- .../call_options/generated/0.4.11-failure.txt | 42 ++++- .../call_options/generated/0.6.2-success.txt | 42 ++++- .../generated/0.4.11-failure.txt | 39 ++++- .../generated/0.4.21-failure.txt | 39 ++++- .../generated/0.5.0-failure.txt | 39 ++++- .../generated/0.5.3-failure.txt | 39 ++++- .../generated/0.6.0-success.txt | 39 ++++- .../generated/0.4.11-failure.txt | 38 ++++- .../generated/0.4.21-success.txt | 33 +++- .../funcalls/generated/0.4.11-success.txt | 31 +++- .../generated/0.4.11-success.txt | 34 ++++- .../generated/0.4.11-success.txt | 42 ++++- .../generated/0.4.11-success.txt | 25 ++- .../generated/0.7.0-failure.txt | 25 ++- .../generated/0.4.11-success.txt | 21 ++- .../generated/0.4.11-success.txt | 33 +++- .../new_output/generated/0.4.11-success.txt | 42 ++++- .../generated/0.4.11-failure.txt | 29 +++- .../generated/0.4.22-failure.txt | 29 +++- .../generated/0.8.4-success.txt | 33 +++- .../type_expr/generated/0.4.11-failure.txt | 39 ++++- .../type_expr/generated/0.5.3-failure.txt | 39 ++++- .../type_expr/generated/0.6.8-success.txt | 39 ++++- .../call/generated/0.4.11-success.txt | 32 +++- .../externals/generated/0.4.11-failure.txt | 22 ++- .../externals/generated/0.4.21-failure.txt | 22 ++- .../externals/generated/0.8.4-success.txt | 22 ++- .../reference/generated/0.4.11-success.txt | 43 +++++- .../alias_import/generated/0.4.11-failure.txt | 10 +- .../alias_import/generated/0.6.0-failure.txt | 10 +- .../alias_import/generated/0.7.1-success.txt | 27 +++- .../default/generated/0.4.11-failure.txt | 2 + .../default/generated/0.6.0-failure.txt | 2 + .../default/generated/0.7.1-success.txt | 22 ++- .../inheritance/generated/0.4.11-success.txt | 68 +++++++-- .../generated/0.4.11-success.txt | 30 +++- .../simple/generated/0.4.11-success.txt | 33 +++- .../visibility/generated/0.4.11-success.txt | 59 ++++++-- .../constants/generated/0.4.11-success.txt | 41 ++++- .../modifiers/generated/0.4.11-success.txt | 22 ++- .../generated/0.4.11-failure.txt | 27 +++- .../generated/0.4.22-failure.txt | 27 +++- .../generated/0.8.4-success.txt | 22 ++- .../generated/0.4.11-success.txt | 53 +++++-- .../visibility/generated/0.4.11-success.txt | 75 +++++++-- .../custom_types/generated/0.4.11-success.txt | 118 ++++++++++++--- .../indexing/generated/0.4.11-success.txt | 38 ++++- .../diamond/generated/0.4.11-failure.txt | 60 +++++++- .../diamond/generated/0.6.0-success.txt | 51 ++++++- .../inherited/generated/0.4.11-success.txt | 28 +++- .../simple/generated/0.4.11-success.txt | 29 +++- .../generated/0.4.11-failure.txt | 30 +++- .../generated/0.6.0-success.txt | 32 +++- .../with_args/generated/0.4.11-success.txt | 39 ++++- .../declaration/generated/0.4.11-failure.txt | 1 + .../declaration/generated/0.6.0-success.txt | 61 ++++++-- .../generated/0.4.11-success.txt | 28 +++- .../generated/0.4.11-success.txt | 33 +++- .../nested/generated/0.4.11-failure.txt | 1 + .../nested/generated/0.6.0-success.txt | 131 +++++++++++++--- .../sample/generated/0.4.11-failure.txt | 1 + .../sample/generated/0.6.0-success.txt | 139 ++++++++++++++--- .../simple/generated/0.4.11-success.txt | 47 +++++- .../wrap_unwrap/generated/0.4.11-failure.txt | 1 + .../wrap_unwrap/generated/0.6.0-failure.txt | 1 + .../wrap_unwrap/generated/0.7.1-failure.txt | 1 + .../wrap_unwrap/generated/0.7.4-failure.txt | 1 + .../wrap_unwrap/generated/0.8.0-failure.txt | 1 + .../wrap_unwrap/generated/0.8.4-failure.txt | 1 + .../wrap_unwrap/generated/0.8.8-success.txt | 32 +++- .../address/generated/0.4.11-failure.txt | 37 ++++- .../address/generated/0.4.21-failure.txt | 37 ++++- .../using/address/generated/0.5.0-failure.txt | 37 ++++- .../using/address/generated/0.5.3-failure.txt | 37 ++++- .../using/address/generated/0.6.0-success.txt | 37 ++++- .../casting/generated/0.4.11-success.txt | 43 +++++- .../generated/0.4.11-success.txt | 66 ++++++-- .../generated/0.4.11-failure.txt | 50 +++++- .../generated/0.8.13-success.txt | 50 +++++- .../elementary/generated/0.4.11-failure.txt | 1 + .../elementary/generated/0.6.0-failure.txt | 1 + .../elementary/generated/0.7.1-failure.txt | 13 +- .../elementary/generated/0.7.4-failure.txt | 13 +- .../elementary/generated/0.8.0-failure.txt | 13 +- .../elementary/generated/0.8.13-success.txt | 26 +++- .../elementary/generated/0.8.4-failure.txt | 13 +- .../elementary/generated/0.8.8-failure.txt | 13 +- .../generated/0.4.11-failure.txt | 1 + .../generated/0.6.0-failure.txt | 1 + .../generated/0.7.1-failure.txt | 15 +- .../generated/0.7.4-failure.txt | 15 +- .../generated/0.8.0-failure.txt | 15 +- .../generated/0.8.13-success.txt | 28 +++- .../generated/0.8.4-failure.txt | 15 +- .../generated/0.8.8-failure.txt | 15 +- .../generated/0.4.11-failure.txt | 1 + .../generated/0.6.0-failure.txt | 1 + .../generated/0.7.1-failure.txt | 1 + .../generated/0.7.4-failure.txt | 1 + .../generated/0.8.0-failure.txt | 1 + .../generated/0.8.13-success.txt | 40 ++++- .../generated/0.8.4-failure.txt | 1 + .../generated/0.8.8-failure.txt | 1 + .../using/global/generated/0.4.11-failure.txt | 28 +++- .../using/global/generated/0.6.0-failure.txt | 42 ++++- .../using/global/generated/0.7.1-failure.txt | 52 ++++++- .../using/global/generated/0.7.4-failure.txt | 52 ++++++- .../using/global/generated/0.8.0-failure.txt | 52 ++++++- .../using/global/generated/0.8.13-success.txt | 52 ++++++- .../using/global/generated/0.8.4-failure.txt | 52 ++++++- .../using/global/generated/0.8.8-failure.txt | 52 ++++++- .../in_contract/generated/0.4.11-success.txt | 50 +++++- .../in_library/generated/0.4.11-success.txt | 50 +++++- .../generated/0.4.11-success.txt | 51 ++++++- .../generated/0.7.0-failure.txt | 51 ++++++- .../generated/0.4.11-success.txt | 59 ++++++-- .../mappings/generated/0.4.11-success.txt | 38 ++++- .../generated/0.4.11-success.txt | 49 +++++- .../generated/0.7.0-failure.txt | 49 +++++- .../generated/0.4.11-success.txt | 41 ++++- .../generated/0.4.11-success.txt | 36 ++++- .../generated/0.4.11-success.txt | 44 +++++- .../generated/0.4.11-success.txt | 49 +++++- .../using/star/generated/0.4.11-success.txt | 38 ++++- .../generated/0.4.11-success.txt | 41 ++++- .../generated/0.4.11-success.txt | 44 +++++- .../generated/0.7.0-failure.txt | 44 +++++- .../top_level/generated/0.4.11-failure.txt | 1 + .../top_level/generated/0.6.0-failure.txt | 15 +- .../top_level/generated/0.7.1-failure.txt | 25 ++- .../top_level/generated/0.7.4-failure.txt | 25 ++- .../top_level/generated/0.8.0-failure.txt | 25 ++- .../top_level/generated/0.8.13-success.txt | 44 +++++- .../top_level/generated/0.8.4-failure.txt | 25 ++- .../top_level/generated/0.8.8-failure.txt | 25 ++- .../uint_alias/generated/0.4.11-success.txt | 38 ++++- .../user_types/generated/0.4.11-failure.txt | 1 + .../user_types/generated/0.6.0-failure.txt | 1 + .../user_types/generated/0.7.1-failure.txt | 1 + .../user_types/generated/0.7.4-failure.txt | 1 + .../user_types/generated/0.8.0-failure.txt | 1 + .../user_types/generated/0.8.4-failure.txt | 1 + .../user_types/generated/0.8.8-success.txt | 58 +++++-- .../local_vars/generated/0.4.11-success.txt | 27 +++- .../params/generated/0.4.11-success.txt | 57 +++++-- .../state_vars/generated/0.4.11-success.txt | 22 ++- .../generated/0.4.11-success.txt | 35 ++++- .../generated/0.5.0-failure.txt | 30 +++- .../generated/0.5.3-failure.txt | 30 +++- .../generated/0.6.0-failure.txt | 30 +++- .../generated/0.7.0-failure.txt | 30 +++- .../generated/0.8.0-failure.txt | 30 +++- .../generated/0.8.4-failure.txt | 30 +++- .../conditionals/generated/0.4.11-success.txt | 41 ++++- .../generated/0.4.11-failure.txt | 65 ++++++-- .../generated/0.6.0-failure.txt | 65 ++++++-- .../generated/0.7.1-failure.txt | 65 ++++++-- .../generated/0.7.4-success.txt | 71 +++++++-- .../functions/generated/0.4.11-success.txt | 56 +++++-- .../generated/0.4.11-failure.txt | 23 ++- .../generated/0.4.12-failure.txt | 23 ++- .../generated/0.5.0-failure.txt | 23 ++- .../generated/0.5.8-success.txt | 28 +++- .../generated/0.7.0-failure.txt | 23 ++- .../generated/0.8.18-failure.txt | 23 ++- .../generated/0.8.24-failure.txt | 23 ++- .../generated/0.8.7-failure.txt | 23 ++- .../yul/loops/generated/0.4.11-success.txt | 45 +++++- .../generated/0.4.11-success.txt | 33 +++- .../generated/0.5.8-failure.txt | 33 +++- .../generated/0.7.0-success.txt | 33 +++- .../slot_suffix/generated/0.4.11-success.txt | 33 +++- .../slot_suffix/generated/0.7.0-failure.txt | 33 +++- .../variables/generated/0.4.11-success.txt | 27 +++- 312 files changed, 10098 insertions(+), 1876 deletions(-) create mode 100644 crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.4.11-failure.txt create mode 100644 crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.4.21-failure.txt create mode 100644 crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.5.0-failure.txt create mode 100644 crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.5.3-failure.txt create mode 100644 crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.6.0-success.txt create mode 100644 crates/solidity/testing/snapshots/bindings_output/control/try_catch/input.sol diff --git a/crates/solidity/inputs/language/bindings/rules.msgb b/crates/solidity/inputs/language/bindings/rules.msgb index 0033e7f90e..f6b54ffcf2 100644 --- a/crates/solidity/inputs/language/bindings/rules.msgb +++ b/crates/solidity/inputs/language/bindings/rules.msgb @@ -1606,11 +1606,14 @@ inherit .star_extension @modifier [ModifierDefinition @name name: [Identifier] - body: [FunctionBody @body [Block]] ] { attr (@modifier.def) node_definition = @name attr (@modifier.def) definiens_node = @modifier +} +@modifier [ModifierDefinition + body: [FunctionBody @body [Block]] +] { edge @body.lexical_scope -> @modifier.lexical_scope ; Special case: bind the place holder statement `_` to the built-in @@ -1939,6 +1942,15 @@ inherit .star_extension attr (@body.lexical_scope -> @catch_params.defs) precedence = 1 } +@stmt [Statement [TryStatement [CatchClauses [CatchClause + [CatchClauseError @name [Identifier]] +]]]] { + node ref + attr (ref) node_reference = @name + + edge ref -> @stmt.lexical_scope +} + ;;; Revert statements diff --git a/crates/solidity/inputs/language/src/definition.rs b/crates/solidity/inputs/language/src/definition.rs index a4feaa287a..80830bc363 100644 --- a/crates/solidity/inputs/language/src/definition.rs +++ b/crates/solidity/inputs/language/src/definition.rs @@ -6920,6 +6920,12 @@ codegen_language_macros::compile!(Language( functions = [], enabled = From("0.6.2") ), + BuiltInType( + name = "Error", + fields = [BuiltInField(definition = "string reason")], + functions = [], + enabled = From("0.6.0") + ), BuiltInType( name = "$ErrorType", fields = [BuiltInField(definition = "bytes4 selector")], @@ -6980,6 +6986,12 @@ codegen_language_macros::compile!(Language( ], functions = [] ), + BuiltInType( + name = "Panic", + fields = [BuiltInField(definition = "uint errorCode")], + functions = [], + enabled = From("0.6.0") + ), BuiltInType( name = "$StringType", fields = [], diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/binding_rules.rs b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/binding_rules.rs index 4817a55eb7..28d75105e5 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/binding_rules.rs +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/binding_rules.rs @@ -1611,11 +1611,14 @@ inherit .star_extension @modifier [ModifierDefinition @name name: [Identifier] - body: [FunctionBody @body [Block]] ] { attr (@modifier.def) node_definition = @name attr (@modifier.def) definiens_node = @modifier +} +@modifier [ModifierDefinition + body: [FunctionBody @body [Block]] +] { edge @body.lexical_scope -> @modifier.lexical_scope ; Special case: bind the place holder statement `_` to the built-in @@ -1944,6 +1947,15 @@ inherit .star_extension attr (@body.lexical_scope -> @catch_params.defs) precedence = 1 } +@stmt [Statement [TryStatement [CatchClauses [CatchClause + [CatchClauseError @name [Identifier]] +]]]] { + node ref + attr (ref) node_reference = @name + + edge ref -> @stmt.lexical_scope +} + ;;; Revert statements diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.0.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.0.sol index 2fcabbc92e..cd27030b12 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.0.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.0.sol @@ -57,6 +57,9 @@ contract $BuiltIns$ { struct $BytesType { function(bytes[] bytesToConcatenate) returns (bytes memory) concat; } + struct Error { + string reason; + } struct $Function { function(uint amount) returns (function()) gas; function(uint amount) returns (function()) value; @@ -72,6 +75,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.2.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.2.sol index dc00818947..8bba63d2df 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.2.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.2.sol @@ -62,6 +62,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $Function { function(uint amount) returns (function()) gas; function(uint amount) returns (function()) value; @@ -77,6 +80,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.7.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.7.sol index 4a57dfa48f..73c8732e8d 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.7.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.7.sol @@ -62,6 +62,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $Function { function(uint amount) returns (function()) gas; function(uint amount) returns (function()) value; @@ -77,6 +80,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.8.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.8.sol index a20e478f50..4e2c9b3802 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.8.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.6.8.sol @@ -62,6 +62,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $Function { function(uint amount) returns (function()) gas; function(uint amount) returns (function()) value; @@ -77,6 +80,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.7.0.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.7.0.sol index 6c4e69b5d9..fe1b3e5d27 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.7.0.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.7.0.sol @@ -62,6 +62,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $Function { } struct $ExternalFunction { @@ -73,6 +76,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.0.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.0.sol index 4626514db5..c497a9bc17 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.0.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.0.sol @@ -60,6 +60,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $Function { } struct $ExternalFunction { @@ -71,6 +74,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.11.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.11.sol index 4fd057bb07..2924fa5d0f 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.11.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.11.sol @@ -62,6 +62,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $ErrorType { bytes4 selector; } @@ -77,6 +80,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.18.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.18.sol index edf82c7c7d..a9a2bced7a 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.18.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.18.sol @@ -63,6 +63,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $ErrorType { bytes4 selector; } @@ -78,6 +81,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.2.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.2.sol index be45a8cbf4..3a753bda51 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.2.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.2.sol @@ -60,6 +60,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $Function { } struct $ExternalFunction { @@ -72,6 +75,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.24.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.24.sol index 5b537bd6f5..398f185000 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.24.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.24.sol @@ -65,6 +65,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $ErrorType { bytes4 selector; } @@ -80,6 +83,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.26.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.26.sol index b27eff44b4..4b3e9ac0db 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.26.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.26.sol @@ -66,6 +66,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $ErrorType { bytes4 selector; } @@ -81,6 +84,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.4.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.4.sol index 4ac08e94dd..a1869696e1 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.4.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.4.sol @@ -60,6 +60,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $ErrorType { bytes4 selector; } @@ -75,6 +78,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.7.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.7.sol index 503367efb7..eb32310320 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.7.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.7.sol @@ -61,6 +61,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $ErrorType { bytes4 selector; } @@ -76,6 +79,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.8.sol b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.8.sol index ec34656dbc..aadc2f08ae 100644 --- a/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.8.sol +++ b/crates/solidity/outputs/cargo/crate/src/generated/bindings/generated/built_ins/0.8.8.sol @@ -61,6 +61,9 @@ contract $BuiltIns$ { uint salt; uint value; } + struct Error { + string reason; + } struct $ErrorType { bytes4 selector; } @@ -76,6 +79,9 @@ contract $BuiltIns$ { bytes4 sig; uint value; } + struct Panic { + uint errorCode; + } struct $StringType { function(string[] stringsToConcatenate) returns (string memory) concat; } diff --git a/crates/solidity/outputs/cargo/tests/src/bindings_output/generated/control.rs b/crates/solidity/outputs/cargo/tests/src/bindings_output/generated/control.rs index f673d69920..cdb289dd0b 100644 --- a/crates/solidity/outputs/cargo/tests/src/bindings_output/generated/control.rs +++ b/crates/solidity/outputs/cargo/tests/src/bindings_output/generated/control.rs @@ -44,6 +44,11 @@ fn if_else() -> Result<()> { run("control", "if_else") } +#[test] +fn try_catch() -> Result<()> { + run("control", "try_catch") +} + #[test] fn try_stmt() -> Result<()> { run("control", "try_stmt") diff --git a/crates/solidity/outputs/cargo/tests/src/bindings_output/renderer.rs b/crates/solidity/outputs/cargo/tests/src/bindings_output/renderer.rs index b347b541d7..e3db19ffd7 100644 --- a/crates/solidity/outputs/cargo/tests/src/bindings_output/renderer.rs +++ b/crates/solidity/outputs/cargo/tests/src/bindings_output/renderer.rs @@ -5,6 +5,7 @@ use anyhow::Result; use ariadne::{Color, Config, FnCache, Label, Report, ReportBuilder, ReportKind, Source}; use metaslang_bindings::ResolutionError; use slang_solidity::bindings::{BindingGraph, Definition, Reference}; +use slang_solidity::cst::{NonterminalKind, Query}; use slang_solidity::diagnostic; use super::runner::ParsedPart; @@ -28,28 +29,46 @@ pub(crate) fn render_bindings( buffer.push(b'\n'); } + let (coverage_report, part_identifiers_bound) = + check_bindings_coverage(part, binding_graph); + all_resolved = all_resolved && part_identifiers_bound; + if !part_identifiers_bound { + write_part_report(part, &coverage_report, &mut buffer)?; + } + let part_references = binding_graph .all_references() .filter(|reference| reference.get_file().is_user_path(part.path)); let (bindings_report, part_all_resolved) = build_report_for_part(part, &all_definitions, part_references); all_resolved = all_resolved && part_all_resolved; + write_part_report(part, &bindings_report, &mut buffer)?; - let file_cache = FnCache::new( - (move |id| Err(Box::new(format!("Failed to fetch source '{id}'")) as _)) as fn(&_) -> _, - ) - .with_sources( - once(part) - .map(|part| (part.path, Source::from(part.contents))) - .collect(), - ); - bindings_report.write(file_cache, &mut buffer)?; + let definiens_report = build_definiens_report(part, &all_definitions); + write_part_report(part, &definiens_report, &mut buffer)?; } let result = String::from_utf8(buffer)?; Ok((result, all_resolved)) } +fn write_part_report<'a>( + part: &'a ParsedPart<'a>, + report: &Report<'a, ReportSpan<'a>>, + buffer: &'a mut Vec, +) -> Result<()> { + let file_cache = FnCache::new( + (move |id| Err(Box::new(format!("Failed to fetch source '{id}'")) as _)) as fn(&_) -> _, + ) + .with_sources( + once(part) + .map(|part| (part.path, Source::from(part.contents))) + .collect(), + ); + report.write(file_cache, buffer)?; + Ok(()) +} + // We collect all non built-in definitions in a vector to be able to identify // them by a numeric index fn collect_all_definitions(binding_graph: &BindingGraph) -> Vec> { @@ -73,6 +92,51 @@ impl ParsedPart<'_> { } } +fn check_bindings_coverage<'a>( + part: &'a ParsedPart<'a>, + binding_graph: &'a BindingGraph, +) -> (Report<'a, ReportSpan<'a>>, bool) { + let mut all_identifiers_bound = true; + let mut builder: ReportBuilder<'_, ReportSpan<'_>> = Report::build( + ReportKind::Custom("Missing definitions/references:", Color::Unset), + part.path, + 0, + ) + .with_config(Config::default().with_color(false)); + + let query = Query::parse("@identifier ([Identifier] | [YulIdentifier])").unwrap(); + let tree_cursor = part.parse_output.create_tree_cursor(); + for result in tree_cursor.query(vec![query]) { + let identifier_cursor = result.captures.get("identifier").unwrap().first().unwrap(); + let parent = { + let mut parent_cursor = identifier_cursor.spawn(); + parent_cursor.go_to_parent(); + parent_cursor.node() + }; + if parent.is_nonterminal_with_kind(NonterminalKind::ExperimentalFeature) { + // ignore identifiers in `pragma experimental` directives + continue; + } + if binding_graph.definition_at(identifier_cursor).is_none() + && binding_graph.reference_at(identifier_cursor).is_none() + { + let range = { + let range = identifier_cursor.text_range(); + let start = part.contents[..range.start.utf8].chars().count(); + let end = part.contents[..range.end.utf8].chars().count(); + start..end + }; + + builder = builder.with_label( + Label::new((part.path, range)).with_message("missing definition/reference"), + ); + all_identifiers_bound = false; + } + } + + (builder.finish(), all_identifiers_bound) +} + fn build_report_for_part<'a>( part: &'a ParsedPart<'a>, all_definitions: &'a [Definition<'a>], @@ -97,7 +161,7 @@ fn build_report_for_part<'a>( start..end }; - let message = format!("def: {}", index + 1); + let message = format!("name: {}", index + 1); builder = builder.with_label(Label::new((part.path, range)).with_message(message)); } @@ -151,3 +215,30 @@ fn build_report_for_part<'a>( (builder.finish(), all_resolved) } + +fn build_definiens_report<'a>( + part: &'a ParsedPart<'a>, + all_definitions: &'a [Definition<'a>], +) -> Report<'a, ReportSpan<'a>> { + let mut builder: ReportBuilder<'_, ReportSpan<'_>> = + Report::build(ReportKind::Custom("Definiens", Color::Unset), part.path, 0) + .with_config(Config::default().with_color(false)); + + for (index, definition) in all_definitions.iter().enumerate() { + if !definition.get_file().is_user_path(part.path) { + continue; + } + + let range = { + let range = definition.get_definiens_cursor().text_range(); + let start = part.contents[..range.start.utf8].chars().count(); + let end = part.contents[..range.end.utf8].chars().count(); + start..end + }; + + let message = format!("definiens: {}", index + 1); + builder = builder.with_label(Label::new((part.path, range)).with_message(message)); + } + + builder.finish() +} diff --git a/crates/solidity/testing/sanctuary/src/tests.rs b/crates/solidity/testing/sanctuary/src/tests.rs index 948184697f..c02c60b79f 100644 --- a/crates/solidity/testing/sanctuary/src/tests.rs +++ b/crates/solidity/testing/sanctuary/src/tests.rs @@ -9,7 +9,7 @@ use metaslang_bindings::PathResolver; use semver::Version; use slang_solidity::bindings; use slang_solidity::bindings::BindingGraph; -use slang_solidity::cst::{Cursor, KindTypes, NonterminalKind, TextRange}; +use slang_solidity::cst::{Cursor, KindTypes, NonterminalKind, Query, TextRange}; use slang_solidity::diagnostic::{Diagnostic, Severity}; use slang_solidity::parser::{ParseOutput, Parser}; use slang_solidity::utils::LanguageFacts; @@ -122,11 +122,11 @@ pub fn run_test(file: &SourceFile, events: &Events, check_bindings: bool) -> Res } if check_bindings { - let unresolved_references = run_bindings_check(&version, source_id, &output)?; - if !unresolved_references.is_empty() { - for unresolved in &unresolved_references { + let binding_errors = run_bindings_check(&version, source_id, &output)?; + if !binding_errors.is_empty() { + for error in &binding_errors { let report = - slang_solidity::diagnostic::render(unresolved, source_id, &source, with_color); + slang_solidity::diagnostic::render(error, source_id, &source, with_color); events.bindings_error(format!("[{version}] {report}")); } @@ -185,8 +185,8 @@ fn run_bindings_check( version: &Version, source_id: &str, output: &ParseOutput, -) -> Result> { - let mut unresolved = Vec::new(); +) -> Result> { + let mut errors = Vec::new(); let binding_graph = create_bindings(version, source_id, output)?; for reference in binding_graph.all_references() { @@ -198,11 +198,32 @@ fn run_bindings_check( // to, so we lookup all of them and fail if we find none. if reference.definitions().is_empty() { let cursor = reference.get_cursor().to_owned(); - unresolved.push(UnresolvedReference { cursor }); + errors.push(BindingError::UnresolvedReference(cursor)); } } - Ok(unresolved) + // Check that all `Identifier` and `YulIdentifier` nodes are bound to either + // a definition or a reference + let query = Query::parse("@identifier ([Identifier] | [YulIdentifier])").unwrap(); + let tree_cursor = output.create_tree_cursor(); + for result in tree_cursor.query(vec![query]) { + let identifier_cursor = result.captures.get("identifier").unwrap().first().unwrap(); + let parent = { + let mut parent_cursor = identifier_cursor.spawn(); + parent_cursor.go_to_parent(); + parent_cursor.node() + }; + if parent.is_nonterminal_with_kind(NonterminalKind::ExperimentalFeature) { + // ignore identifiers in `pragma experimental` directives + continue; + } + if binding_graph.definition_at(identifier_cursor).is_none() + && binding_graph.reference_at(identifier_cursor).is_none() + { + errors.push(BindingError::UnboundIdentifier(identifier_cursor.clone())); + } + } + Ok(errors) } fn create_bindings( @@ -235,13 +256,18 @@ impl PathResolver for SingleFileResolver { } } -struct UnresolvedReference { - pub cursor: Cursor, +enum BindingError { + UnresolvedReference(Cursor), + UnboundIdentifier(Cursor), } -impl Diagnostic for UnresolvedReference { +impl Diagnostic for BindingError { fn text_range(&self) -> TextRange { - self.cursor.text_range() + let cursor = match self { + Self::UnboundIdentifier(cursor) => cursor, + Self::UnresolvedReference(cursor) => cursor, + }; + cursor.text_range() } fn severity(&self) -> Severity { @@ -249,9 +275,19 @@ impl Diagnostic for UnresolvedReference { } fn message(&self) -> String { - format!( - "Unresolved reference to `{symbol}`", - symbol = self.cursor.node().unparse() - ) + match self { + Self::UnresolvedReference(cursor) => { + format!( + "Unresolved reference to `{symbol}`", + symbol = cursor.node().unparse() + ) + } + Self::UnboundIdentifier(cursor) => { + format!( + "Missing identifier or definition for `{symbol}`", + symbol = cursor.node().unparse() + ) + } + } } } diff --git a/crates/solidity/testing/snapshots/bindings_output/arrays/indexing/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/arrays/indexing/generated/0.4.11-success.txt index 7415efefc6..0edab98d63 100644 --- a/crates/solidity/testing/snapshots/bindings_output/arrays/indexing/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/arrays/indexing/generated/0.4.11-success.txt @@ -5,28 +5,28 @@ References and definitions: │ 1 │ contract CustomArrays { │ ──────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ struct Value { │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ uint value; │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 6 │ Value[] values; │ ──┬── ───┬── │ ╰───────────── ref: 2 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 7 │ Value[][5] matrix; │ ──┬── ───┬── │ ╰──────────────── ref: 2 │ │ - │ ╰──── def: 5 + │ ╰──── name: 5 │ 9 │ function test() public { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 10 │ matrix[0][1].value += values[1].value; │ ───┬── ──┬── ───┬── ──┬── │ ╰─────────────────────────────────── ref: 5 @@ -37,3 +37,30 @@ References and definitions: │ │ │ ╰──── ref: 3 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ──▶ contract CustomArrays { + 2 │ │ ╭───▶ struct Value { + 3 │ │ │ uint value; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ ├─│ ▶ } + │ │ │ │ + │ │ ╰───────────── definiens: 2 + 5 │ │ ╭─▶ + 6 │ │ ├─▶ Value[] values; + │ │ │ + │ │ ╰───────────────────────── definiens: 4 + 7 │ │ │ Value[][5] matrix; + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────── definiens: 5 + 8 │ │ ╭─────▶ + ┆ ┆ ┆ + 11 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 6 + 12 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/arrays/length/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/arrays/length/generated/0.4.11-success.txt index 2e3248e35d..150017710d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/arrays/length/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/arrays/length/generated/0.4.11-success.txt @@ -5,24 +5,24 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function nop(uint x) internal {} │ ─┬─ ┬ - │ ╰────────── def: 2 + │ ╰────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 5 │ using Lib for uint; │ ─┬─ │ ╰─── ref: 1 6 │ function test(uint256[] memory data) public { │ ──┬─ ──┬─ - │ ╰───────────────────────── def: 5 + │ ╰───────────────────────── name: 5 │ │ - │ ╰─── def: 6 + │ ╰─── name: 6 7 │ data.length.nop(); │ ──┬─ ───┬── ─┬─ │ ╰────────────── ref: 6 @@ -31,3 +31,28 @@ References and definitions: │ │ │ ╰─── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ library Lib { + 2 │ │ function nop(uint x) internal {} + │ │ ──────────────────┬─┬──────────────── + │ │ ╰──────────────────── definiens: 2 + │ │ │ + │ │ ╰────────────────── definiens: 3 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 6 │ │ ╭───▶ function test(uint256[] memory data) public { + │ │ │ ──────────┬────────── + │ │ │ ╰──────────── definiens: 6 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/address/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/address/generated/0.4.11-failure.txt index 9ff8c9567f..be6b20b6d7 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/address/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/address/generated/0.4.11-failure.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function testAddress(address recipient) public { │ ─────┬───── ────┬──── - │ ╰───────────────────────── def: 2 + │ ╰───────────────────────── name: 2 │ │ - │ ╰────── def: 3 + │ ╰────── name: 3 3 │ bytes memory x1; │ ─┬ - │ ╰── def: 4 + │ ╰── name: 4 4 │ (bool v1, bytes memory v2) = recipient.call(x1); │ ─┬ ─┬ ────┬──── ──┬─ ─┬ - │ ╰──────────────────────────────────────── def: 5 + │ ╰──────────────────────────────────────── name: 5 │ │ │ │ │ - │ ╰─────────────────────── def: 6 + │ ╰─────────────────────── name: 6 │ │ │ │ │ ╰────────────── ref: 3 │ │ │ @@ -27,9 +27,9 @@ References and definitions: │ ╰── ref: 4 5 │ (bool v5, bytes memory v6) = recipient.delegatecall(x1); │ ─┬ ─┬ ────┬──── ──────┬───── ─┬ - │ ╰──────────────────────────────────────────────── def: 7 + │ ╰──────────────────────────────────────────────── name: 7 │ │ │ │ │ - │ ╰─────────────────────────────── def: 8 + │ ╰─────────────────────────────── name: 8 │ │ │ │ │ ╰────────────────────── ref: 3 │ │ │ @@ -38,9 +38,9 @@ References and definitions: │ ╰── ref: 4 6 │ (bool v7, bytes memory v8) = recipient.staticcall(x1); │ ─┬ ─┬ ────┬──── ─────┬──── ─┬ - │ ╰────────────────────────────────────────────── def: 9 + │ ╰────────────────────────────────────────────── name: 9 │ │ │ │ │ - │ ╰───────────────────────────── def: 10 + │ ╰───────────────────────────── name: 10 │ │ │ │ │ ╰──────────────────── ref: 3 │ │ │ @@ -54,14 +54,53 @@ References and definitions: │ ╰───── ref: built-in 8 │ bool v9 = recipient.send(1); │ ─┬ ────┬──── ──┬─ - │ ╰─────────────────── def: 11 + │ ╰─────────────────── name: 11 │ │ │ │ ╰─────────── ref: 3 │ │ │ ╰─── ref: built-in 9 │ uint256 v10 = address(this).balance; │ ─┬─ ───┬─── - │ ╰─────────────────────────── def: 12 + │ ╰─────────────────────────── name: 12 │ │ │ ╰───── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function testAddress(address recipient) public { + │ │ │ ────────┬──────── + │ │ │ ╰────────── definiens: 3 + 3 │ │ │ bytes memory x1; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 4 + 4 │ │ │ (bool v1, bytes memory v2) = recipient.call(x1); + │ │ │ ───┬─── ────────┬─────── + │ │ │ ╰────────────────────── definiens: 5 + │ │ │ │ + │ │ │ ╰───────── definiens: 6 + 5 │ │ │ (bool v5, bytes memory v6) = recipient.delegatecall(x1); + │ │ │ ───┬─── ────────┬─────── + │ │ │ ╰────────────────────── definiens: 7 + │ │ │ │ + │ │ │ ╰───────── definiens: 8 + 6 │ │ │ (bool v7, bytes memory v8) = recipient.staticcall(x1); + │ │ │ ───┬─── ────────┬─────── + │ │ │ ╰────────────────────── definiens: 9 + │ │ │ │ + │ │ │ ╰───────── definiens: 10 + ┆ ┆ ┆ + 8 │ │ │ bool v9 = recipient.send(1); + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 11 + 9 │ │ │ uint256 v10 = address(this).balance; + │ │ │ ──────────────────────┬────────────────────── + │ │ │ ╰──────────────────────── definiens: 12 + 10 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 11 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/address/generated/0.5.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/address/generated/0.5.0-success.txt index d5f0a1db53..808faac598 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/address/generated/0.5.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/address/generated/0.5.0-success.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function testAddress(address recipient) public { │ ─────┬───── ────┬──── - │ ╰───────────────────────── def: 2 + │ ╰───────────────────────── name: 2 │ │ - │ ╰────── def: 3 + │ ╰────── name: 3 3 │ bytes memory x1; │ ─┬ - │ ╰── def: 4 + │ ╰── name: 4 4 │ (bool v1, bytes memory v2) = recipient.call(x1); │ ─┬ ─┬ ────┬──── ──┬─ ─┬ - │ ╰──────────────────────────────────────── def: 5 + │ ╰──────────────────────────────────────── name: 5 │ │ │ │ │ - │ ╰─────────────────────── def: 6 + │ ╰─────────────────────── name: 6 │ │ │ │ │ ╰────────────── ref: 3 │ │ │ @@ -27,9 +27,9 @@ References and definitions: │ ╰── ref: 4 5 │ (bool v5, bytes memory v6) = recipient.delegatecall(x1); │ ─┬ ─┬ ────┬──── ──────┬───── ─┬ - │ ╰──────────────────────────────────────────────── def: 7 + │ ╰──────────────────────────────────────────────── name: 7 │ │ │ │ │ - │ ╰─────────────────────────────── def: 8 + │ ╰─────────────────────────────── name: 8 │ │ │ │ │ ╰────────────────────── ref: 3 │ │ │ @@ -38,9 +38,9 @@ References and definitions: │ ╰── ref: 4 6 │ (bool v7, bytes memory v8) = recipient.staticcall(x1); │ ─┬ ─┬ ────┬──── ─────┬──── ─┬ - │ ╰────────────────────────────────────────────── def: 9 + │ ╰────────────────────────────────────────────── name: 9 │ │ │ │ │ - │ ╰───────────────────────────── def: 10 + │ ╰───────────────────────────── name: 10 │ │ │ │ │ ╰──────────────────── ref: 3 │ │ │ @@ -54,14 +54,53 @@ References and definitions: │ ╰───── ref: built-in 8 │ bool v9 = recipient.send(1); │ ─┬ ────┬──── ──┬─ - │ ╰─────────────────── def: 11 + │ ╰─────────────────── name: 11 │ │ │ │ ╰─────────── ref: 3 │ │ │ ╰─── ref: built-in 9 │ uint256 v10 = address(this).balance; │ ─┬─ ───┬─── - │ ╰─────────────────────────── def: 12 + │ ╰─────────────────────────── name: 12 │ │ │ ╰───── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function testAddress(address recipient) public { + │ │ │ ────────┬──────── + │ │ │ ╰────────── definiens: 3 + 3 │ │ │ bytes memory x1; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 4 + 4 │ │ │ (bool v1, bytes memory v2) = recipient.call(x1); + │ │ │ ───┬─── ────────┬─────── + │ │ │ ╰────────────────────── definiens: 5 + │ │ │ │ + │ │ │ ╰───────── definiens: 6 + 5 │ │ │ (bool v5, bytes memory v6) = recipient.delegatecall(x1); + │ │ │ ───┬─── ────────┬─────── + │ │ │ ╰────────────────────── definiens: 7 + │ │ │ │ + │ │ │ ╰───────── definiens: 8 + 6 │ │ │ (bool v7, bytes memory v8) = recipient.staticcall(x1); + │ │ │ ───┬─── ────────┬─────── + │ │ │ ╰────────────────────── definiens: 9 + │ │ │ │ + │ │ │ ╰───────── definiens: 10 + ┆ ┆ ┆ + 8 │ │ │ bool v9 = recipient.send(1); + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 11 + 9 │ │ │ uint256 v10 = address(this).balance; + │ │ │ ──────────────────────┬────────────────────── + │ │ │ ╰──────────────────────── definiens: 12 + 10 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 11 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/array_push/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/array_push/generated/0.4.11-failure.txt index 9b373527f5..56ce68ee7c 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/array_push/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/array_push/generated/0.4.11-failure.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Data { uint value; } │ ──┬─ ──┬── - │ ╰──────────────── def: 2 + │ ╰──────────────── name: 2 │ │ - │ ╰──── def: 3 + │ ╰──── name: 3 3 │ Data[] values; │ ──┬─ ───┬── │ ╰──────────── ref: 2 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 4 │ function test() public { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 5 │ values.push().value = 1; │ ───┬── ──┬─ ──┬── │ ╰───────────────── ref: 4 @@ -27,3 +27,24 @@ References and definitions: │ │ │ ╰──── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ struct Data { uint value; } + │ │ ────────────────┬──────┬──────── + │ │ ╰───────────────── definiens: 2 + │ │ │ + │ │ ╰────────── definiens: 3 + 3 │ │ │ Data[] values; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 4 + 4 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 5 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/array_push/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/array_push/generated/0.6.0-success.txt index 2329857715..c9c1b85102 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/array_push/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/array_push/generated/0.6.0-success.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Data { uint value; } │ ──┬─ ──┬── - │ ╰──────────────── def: 2 + │ ╰──────────────── name: 2 │ │ - │ ╰──── def: 3 + │ ╰──── name: 3 3 │ Data[] values; │ ──┬─ ───┬── │ ╰──────────── ref: 2 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 4 │ function test() public { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 5 │ values.push().value = 1; │ ───┬── ──┬─ ──┬── │ ╰───────────────── ref: 4 @@ -27,3 +27,24 @@ References and definitions: │ │ │ ╰──── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ struct Data { uint value; } + │ │ ────────────────┬──────┬──────── + │ │ ╰───────────────── definiens: 2 + │ │ │ + │ │ ╰────────── definiens: 3 + 3 │ │ │ Data[] values; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 4 + 4 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 5 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/arrays/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/arrays/generated/0.4.11-success.txt index 7d6647ad22..e0070de95d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/arrays/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/arrays/generated/0.4.11-success.txt @@ -5,16 +5,16 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ uint[] a; │ ┬ - │ ╰── def: 2 + │ ╰── name: 2 3 │ function testArray() public { │ ────┬──── - │ ╰────── def: 3 + │ ╰────── name: 3 4 │ uint[] storage b = new uint[](5); │ ┬ - │ ╰── def: 4 + │ ╰── name: 4 5 │ assert(b.length == 5); │ ───┬── ┬ ───┬── │ ╰───────────── ref: built-in @@ -39,3 +39,22 @@ References and definitions: │ │ │ ╰─── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ uint[] a; + │ │ │ ───────┬────── + │ │ │ ╰──────── definiens: 2 + 3 │ │ ╭─▶ function testArray() public { + 4 │ │ │ uint[] storage b = new uint[](5); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 4 + ┆ ┆ ┆ + 10 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 11 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/arrays/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/arrays/generated/0.6.0-success.txt index c8f4c1481f..1972b2a897 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/arrays/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/arrays/generated/0.6.0-success.txt @@ -5,16 +5,16 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ uint[] a; │ ┬ - │ ╰── def: 2 + │ ╰── name: 2 3 │ function testArray() public { │ ────┬──── - │ ╰────── def: 3 + │ ╰────── name: 3 4 │ uint[] storage b = new uint[](5); │ ┬ - │ ╰── def: 4 + │ ╰── name: 4 5 │ assert(b.length == 5); │ ───┬── ┬ ───┬── │ ╰───────────── ref: built-in @@ -39,3 +39,22 @@ References and definitions: │ │ │ ╰─── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ uint[] a; + │ │ │ ───────┬────── + │ │ │ ╰──────── definiens: 2 + 3 │ │ ╭─▶ function testArray() public { + 4 │ │ │ uint[] storage b = new uint[](5); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 4 + ┆ ┆ ┆ + 10 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 11 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/bytes/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/bytes/generated/0.4.11-success.txt index 01319e37d0..3223c62408 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/bytes/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/bytes/generated/0.4.11-success.txt @@ -5,19 +5,19 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function testBytes() public { │ ────┬──── - │ ╰────── def: 2 + │ ╰────── name: 2 3 │ bytes memory b1; │ ─┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ bytes memory b2; │ ─┬ - │ ╰── def: 4 + │ ╰── name: 4 5 │ bytes memory b3 = bytes.concat(b1, b2); │ ─┬ ───┬── ─┬ ─┬ - │ ╰──────────────────────── def: 5 + │ ╰──────────────────────── name: 5 │ │ │ │ │ ╰─────────── ref: built-in │ │ │ @@ -32,16 +32,16 @@ References and definitions: │ 9 │ function testString() public { │ ─────┬──── - │ ╰────── def: 6 + │ ╰────── name: 6 10 │ string memory s1; │ ─┬ - │ ╰── def: 7 + │ ╰── name: 7 11 │ string memory s2; │ ─┬ - │ ╰── def: 8 + │ ╰── name: 8 12 │ string memory s3 = string.concat(s1, s2); │ ─┬ ───┬── ─┬ ─┬ - │ ╰───────────────────────── def: 9 + │ ╰───────────────────────── name: 9 │ │ │ │ │ ╰─────────── ref: built-in │ │ │ @@ -49,3 +49,39 @@ References and definitions: │ │ │ ╰── ref: 8 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ──▶ contract Test { + 2 │ │ ╭───▶ function testBytes() public { + 3 │ │ │ bytes memory b1; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 3 + 4 │ │ │ bytes memory b2; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 4 + 5 │ │ │ bytes memory b3 = bytes.concat(b1, b2); + │ │ │ ────────────────────────┬─────────────────────── + │ │ │ ╰───────────────────────── definiens: 5 + ┆ ┆ ┆ + 7 │ │ ├─│ ▶ } + │ │ │ │ + │ │ ╰───────────── definiens: 2 + 8 │ │ ╭─▶ + ┆ ┆ ┆ + 10 │ │ │ string memory s1; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 7 + 11 │ │ │ string memory s2; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 8 + 12 │ │ │ string memory s3 = string.concat(s1, s2); + │ │ │ ─────────────────────────┬──────────────────────── + │ │ │ ╰────────────────────────── definiens: 9 + 13 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 6 + 14 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.4.11-failure.txt index 8164d93dfd..3e261dbd78 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.4.11-failure.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ bytes4 v1 = this.test.selector; │ ─┬ ──┬─ ────┬─── - │ ╰─────────────────────── def: 3 + │ ╰─────────────────────── name: 3 │ │ │ │ ╰──────────── ref: 2 │ │ │ ╰───── unresolved 4 │ address v2 = this.test.address; │ ─┬ ──┬─ ───┬─── - │ ╰────────────────────── def: 4 + │ ╰────────────────────── name: 4 │ │ │ │ ╰─────────── ref: 2 │ │ @@ -26,7 +26,7 @@ References and definitions: │ 6 │ bytes4 v3 = Foo.bar.selector; │ ─┬ ─┬─ ─┬─ ────┬─── - │ ╰───────────────────── def: 5 + │ ╰───────────────────── name: 5 │ │ │ │ │ ╰──────────────── ref: 10 │ │ │ @@ -38,10 +38,10 @@ References and definitions: │ ─┬─ ─┬ │ ╰────── ref: 10 │ │ - │ ╰── def: 6 + │ ╰── name: 6 9 │ bytes4 v4 = f1.bar.selector; │ ─┬ ─┬ ─┬─ ────┬─── - │ ╰──────────────────── def: 7 + │ ╰──────────────────── name: 7 │ │ │ │ │ ╰─────────────── ref: 6 │ │ │ @@ -50,7 +50,7 @@ References and definitions: │ ╰───── unresolved 10 │ address v5 = f1.bar.address; │ ─┬ ─┬ ─┬─ ───┬─── - │ ╰─────────────────── def: 8 + │ ╰─────────────────── name: 8 │ │ │ │ │ ╰────────────── ref: 6 │ │ │ @@ -60,7 +60,7 @@ References and definitions: │ 12 │ bytes4 v6 = Baz.quux.selector; │ ─┬ ─┬─ ──┬─ ────┬─── - │ ╰────────────────────── def: 9 + │ ╰────────────────────── name: 9 │ │ │ │ │ ╰───────────────── ref: 12 │ │ │ @@ -70,15 +70,67 @@ References and definitions: │ 16 │ interface Foo { │ ─┬─ - │ ╰─── def: 10 + │ ╰─── name: 10 17 │ function bar() external payable; │ ─┬─ - │ ╰─── def: 11 + │ ╰─── name: 11 │ 20 │ library Baz { │ ─┬─ - │ ╰─── def: 12 + │ ╰─── name: 12 21 │ function quux() public {} │ ──┬─ - │ ╰─── def: 13 + │ ╰─── name: 13 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ──────────▶ contract Test { + 2 │ │ ╭───────────▶ function test() public { + 3 │ │ │ bytes4 v1 = this.test.selector; + │ │ │ ────────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 3 + 4 │ │ │ │ address v2 = this.test.address; + │ │ │ │ ────────────────────┬─────────────────── + │ │ │ │ ╰───────────────────── definiens: 4 + 5 │ │ │ ╭───▶ + 6 │ │ │ ├─│ ▶ bytes4 v3 = Foo.bar.selector; + │ │ │ │ │ + │ │ │ ╰───────────────────────────────────────────── definiens: 5 + 7 │ │ │ ╭─▶ + 8 │ │ │ ├─▶ Foo f1; + │ │ │ │ + │ │ │ ╰───────────────────── definiens: 6 + 9 │ │ │ bytes4 v4 = f1.bar.selector; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 7 + 10 │ │ │ │ address v5 = f1.bar.address; + │ │ │ │ ──────────────────┬────────────────── + │ │ │ │ ╰──────────────────── definiens: 8 + 11 │ │ │ ╭─────▶ + 12 │ │ │ ├─────▶ bytes4 v6 = Baz.quux.selector; + │ │ │ │ + │ │ │ ╰──────────────────────────────────────────────── definiens: 9 + 13 │ │ ├───────────▶ } + │ │ │ + │ │ ╰───────────────────── definiens: 2 + 14 │ ├───│ ────────▶ } + │ │ │ + │ ╰─────────────────── definiens: 1 + 15 │ ╭─────────▶ + ┆ ┆ + 17 │ │ function bar() external payable; + │ │ ──────────────────┬────────────────── + │ │ ╰──────────────────── definiens: 11 + 18 │ ├─│ ──────▶ } + │ │ │ + │ ╰─────────────── definiens: 10 + 19 │ ╭───────▶ + ┆ ┆ + 21 │ │ function quux() public {} + │ │ ───────────────┬────────────── + │ │ ╰──────────────── definiens: 13 + 22 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 12 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.4.21-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.4.21-failure.txt index ec1fe46b15..4f44ec635b 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.4.21-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.4.21-failure.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ bytes4 v1 = this.test.selector; │ ─┬ ──┬─ ────┬─── - │ ╰─────────────────────── def: 3 + │ ╰─────────────────────── name: 3 │ │ │ │ ╰──────────── ref: 2 │ │ │ ╰───── ref: built-in 4 │ address v2 = this.test.address; │ ─┬ ──┬─ ───┬─── - │ ╰────────────────────── def: 4 + │ ╰────────────────────── name: 4 │ │ │ │ ╰─────────── ref: 2 │ │ @@ -26,7 +26,7 @@ References and definitions: │ 6 │ bytes4 v3 = Foo.bar.selector; │ ─┬ ─┬─ ─┬─ ────┬─── - │ ╰───────────────────── def: 5 + │ ╰───────────────────── name: 5 │ │ │ │ │ ╰──────────────── ref: 10 │ │ │ @@ -38,10 +38,10 @@ References and definitions: │ ─┬─ ─┬ │ ╰────── ref: 10 │ │ - │ ╰── def: 6 + │ ╰── name: 6 9 │ bytes4 v4 = f1.bar.selector; │ ─┬ ─┬ ─┬─ ────┬─── - │ ╰──────────────────── def: 7 + │ ╰──────────────────── name: 7 │ │ │ │ │ ╰─────────────── ref: 6 │ │ │ @@ -50,7 +50,7 @@ References and definitions: │ ╰───── ref: built-in 10 │ address v5 = f1.bar.address; │ ─┬ ─┬ ─┬─ ───┬─── - │ ╰─────────────────── def: 8 + │ ╰─────────────────── name: 8 │ │ │ │ │ ╰────────────── ref: 6 │ │ │ @@ -60,7 +60,7 @@ References and definitions: │ 12 │ bytes4 v6 = Baz.quux.selector; │ ─┬ ─┬─ ──┬─ ────┬─── - │ ╰────────────────────── def: 9 + │ ╰────────────────────── name: 9 │ │ │ │ │ ╰───────────────── ref: 12 │ │ │ @@ -70,15 +70,67 @@ References and definitions: │ 16 │ interface Foo { │ ─┬─ - │ ╰─── def: 10 + │ ╰─── name: 10 17 │ function bar() external payable; │ ─┬─ - │ ╰─── def: 11 + │ ╰─── name: 11 │ 20 │ library Baz { │ ─┬─ - │ ╰─── def: 12 + │ ╰─── name: 12 21 │ function quux() public {} │ ──┬─ - │ ╰─── def: 13 + │ ╰─── name: 13 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ──────────▶ contract Test { + 2 │ │ ╭───────────▶ function test() public { + 3 │ │ │ bytes4 v1 = this.test.selector; + │ │ │ ────────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 3 + 4 │ │ │ │ address v2 = this.test.address; + │ │ │ │ ────────────────────┬─────────────────── + │ │ │ │ ╰───────────────────── definiens: 4 + 5 │ │ │ ╭───▶ + 6 │ │ │ ├─│ ▶ bytes4 v3 = Foo.bar.selector; + │ │ │ │ │ + │ │ │ ╰───────────────────────────────────────────── definiens: 5 + 7 │ │ │ ╭─▶ + 8 │ │ │ ├─▶ Foo f1; + │ │ │ │ + │ │ │ ╰───────────────────── definiens: 6 + 9 │ │ │ bytes4 v4 = f1.bar.selector; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 7 + 10 │ │ │ │ address v5 = f1.bar.address; + │ │ │ │ ──────────────────┬────────────────── + │ │ │ │ ╰──────────────────── definiens: 8 + 11 │ │ │ ╭─────▶ + 12 │ │ │ ├─────▶ bytes4 v6 = Baz.quux.selector; + │ │ │ │ + │ │ │ ╰──────────────────────────────────────────────── definiens: 9 + 13 │ │ ├───────────▶ } + │ │ │ + │ │ ╰───────────────────── definiens: 2 + 14 │ ├───│ ────────▶ } + │ │ │ + │ ╰─────────────────── definiens: 1 + 15 │ ╭─────────▶ + ┆ ┆ + 17 │ │ function bar() external payable; + │ │ ──────────────────┬────────────────── + │ │ ╰──────────────────── definiens: 11 + 18 │ ├─│ ──────▶ } + │ │ │ + │ ╰─────────────── definiens: 10 + 19 │ ╭───────▶ + ┆ ┆ + 21 │ │ function quux() public {} + │ │ ───────────────┬────────────── + │ │ ╰──────────────── definiens: 13 + 22 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 12 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.8.4-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.8.4-success.txt index 1b10c554b8..5a35572d97 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.8.4-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/function_type/generated/0.8.4-success.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ bytes4 v1 = this.test.selector; │ ─┬ ──┬─ ────┬─── - │ ╰─────────────────────── def: 3 + │ ╰─────────────────────── name: 3 │ │ │ │ ╰──────────── ref: 2 │ │ │ ╰───── ref: built-in 4 │ address v2 = this.test.address; │ ─┬ ──┬─ ───┬─── - │ ╰────────────────────── def: 4 + │ ╰────────────────────── name: 4 │ │ │ │ ╰─────────── ref: 2 │ │ @@ -26,7 +26,7 @@ References and definitions: │ 6 │ bytes4 v3 = Foo.bar.selector; │ ─┬ ─┬─ ─┬─ ────┬─── - │ ╰───────────────────── def: 5 + │ ╰───────────────────── name: 5 │ │ │ │ │ ╰──────────────── ref: 10 │ │ │ @@ -38,10 +38,10 @@ References and definitions: │ ─┬─ ─┬ │ ╰────── ref: 10 │ │ - │ ╰── def: 6 + │ ╰── name: 6 9 │ bytes4 v4 = f1.bar.selector; │ ─┬ ─┬ ─┬─ ────┬─── - │ ╰──────────────────── def: 7 + │ ╰──────────────────── name: 7 │ │ │ │ │ ╰─────────────── ref: 6 │ │ │ @@ -50,7 +50,7 @@ References and definitions: │ ╰───── ref: built-in 10 │ address v5 = f1.bar.address; │ ─┬ ─┬ ─┬─ ───┬─── - │ ╰─────────────────── def: 8 + │ ╰─────────────────── name: 8 │ │ │ │ │ ╰────────────── ref: 6 │ │ │ @@ -60,7 +60,7 @@ References and definitions: │ 12 │ bytes4 v6 = Baz.quux.selector; │ ─┬ ─┬─ ──┬─ ────┬─── - │ ╰────────────────────── def: 9 + │ ╰────────────────────── name: 9 │ │ │ │ │ ╰───────────────── ref: 12 │ │ │ @@ -70,15 +70,67 @@ References and definitions: │ 16 │ interface Foo { │ ─┬─ - │ ╰─── def: 10 + │ ╰─── name: 10 17 │ function bar() external payable; │ ─┬─ - │ ╰─── def: 11 + │ ╰─── name: 11 │ 20 │ library Baz { │ ─┬─ - │ ╰─── def: 12 + │ ╰─── name: 12 21 │ function quux() public {} │ ──┬─ - │ ╰─── def: 13 + │ ╰─── name: 13 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ──────────▶ contract Test { + 2 │ │ ╭───────────▶ function test() public { + 3 │ │ │ bytes4 v1 = this.test.selector; + │ │ │ ────────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 3 + 4 │ │ │ │ address v2 = this.test.address; + │ │ │ │ ────────────────────┬─────────────────── + │ │ │ │ ╰───────────────────── definiens: 4 + 5 │ │ │ ╭───▶ + 6 │ │ │ ├─│ ▶ bytes4 v3 = Foo.bar.selector; + │ │ │ │ │ + │ │ │ ╰───────────────────────────────────────────── definiens: 5 + 7 │ │ │ ╭─▶ + 8 │ │ │ ├─▶ Foo f1; + │ │ │ │ + │ │ │ ╰───────────────────── definiens: 6 + 9 │ │ │ bytes4 v4 = f1.bar.selector; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 7 + 10 │ │ │ │ address v5 = f1.bar.address; + │ │ │ │ ──────────────────┬────────────────── + │ │ │ │ ╰──────────────────── definiens: 8 + 11 │ │ │ ╭─────▶ + 12 │ │ │ ├─────▶ bytes4 v6 = Baz.quux.selector; + │ │ │ │ + │ │ │ ╰──────────────────────────────────────────────── definiens: 9 + 13 │ │ ├───────────▶ } + │ │ │ + │ │ ╰───────────────────── definiens: 2 + 14 │ ├───│ ────────▶ } + │ │ │ + │ ╰─────────────────── definiens: 1 + 15 │ ╭─────────▶ + ┆ ┆ + 17 │ │ function bar() external payable; + │ │ ──────────────────┬────────────────── + │ │ ╰──────────────────── definiens: 11 + 18 │ ├─│ ──────▶ } + │ │ │ + │ ╰─────────────── definiens: 10 + 19 │ ╭───────▶ + ┆ ┆ + 21 │ │ function quux() public {} + │ │ ───────────────┬────────────── + │ │ ╰──────────────── definiens: 13 + 22 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 12 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.11-failure.txt index 1968dc3495..2be3b1106a 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.11-failure.txt @@ -5,53 +5,53 @@ References and definitions: │ 1 │ contract BuiltInsTest { │ ──────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ function testRequire() public { │ ─────┬───── - │ ╰─────── def: 2 + │ ╰─────── name: 2 3 │ require(true, "should always succeed"); │ ───┬─── │ ╰───── ref: built-in │ 6 │ function testRevert() public { │ ─────┬──── - │ ╰────── def: 3 + │ ╰────── name: 3 7 │ revert("testing revert"); │ ───┬── │ ╰──── ref: built-in │ 10 │ function testAssert() public { │ ─────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 11 │ assert(2 + 2 == 4); │ ───┬── │ ╰──── ref: built-in │ 14 │ function testMath() public { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 15 │ bytes memory x1; │ ─┬ - │ ╰── def: 6 + │ ╰── name: 6 │ 17 │ uint v1 = addmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 7 + │ ╰─────────── name: 7 │ │ │ ╰──── ref: built-in 18 │ bytes32 v2 = blockhash(1); │ ─┬ ────┬──── - │ ╰────────────── def: 8 + │ ╰────────────── name: 8 │ │ │ ╰────── unresolved 19 │ bytes32 v3 = blobhash(2); │ ─┬ ────┬─── - │ ╰───────────── def: 9 + │ ╰───────────── name: 9 │ │ │ ╰───── unresolved 20 │ address v4 = ecrecover(v2, 1, v2, v2); │ ─┬ ────┬──── ─┬ ─┬ ─┬ - │ ╰──────────────────────────── def: 10 + │ ╰──────────────────────────── name: 10 │ │ │ │ │ │ ╰──────────────────── ref: built-in │ │ │ │ @@ -62,31 +62,31 @@ References and definitions: │ ╰── ref: 8 21 │ uint256 v5 = gasleft(); │ ─┬ ───┬─── - │ ╰──────────── def: 11 + │ ╰──────────── name: 11 │ │ │ ╰───── unresolved 22 │ bytes32 v6 = keccak256(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 23 │ uint v7 = mulmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 13 + │ ╰─────────── name: 13 │ │ │ ╰──── ref: built-in 24 │ bytes20 v8 = ripemd160(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 14 + │ ╰───────────────── name: 14 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 25 │ bytes32 v9 = sha256(x1); │ ─┬ ───┬── ─┬ - │ ╰────────────── def: 15 + │ ╰────────────── name: 15 │ │ │ │ ╰─────── ref: built-in │ │ @@ -94,20 +94,20 @@ References and definitions: │ 28 │ function testSelfDestruct() public { │ ────────┬─────── - │ ╰───────── def: 16 + │ ╰───────── name: 16 29 │ selfdestruct(address(0x0)); │ ──────┬───── │ ╰─────── ref: built-in │ 32 │ function testAbiFunctions() public { │ ────────┬─────── - │ ╰───────── def: 17 + │ ╰───────── name: 17 33 │ bytes memory x1; │ ─┬ - │ ╰── def: 18 + │ ╰── name: 18 34 │ uint v1 = abi.decode(x1, (uint)); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 19 + │ ╰────────────────── name: 19 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -116,7 +116,7 @@ References and definitions: │ ╰── ref: 18 35 │ bytes memory v2 = abi.encode(v1); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 20 + │ ╰────────────────── name: 20 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -125,7 +125,7 @@ References and definitions: │ ╰── ref: 19 36 │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); │ ─┬ ─┬─ ─────┬──── ────┬─── - │ ╰───────────────────────────────── def: 21 + │ ╰───────────────────────────────── name: 21 │ │ │ │ │ ╰──────────────────────────── ref: built-in │ │ │ @@ -134,14 +134,14 @@ References and definitions: │ ╰───── ref: 5 37 │ bytes memory v4 = abi.encodePacked(10, 20); │ ─┬ ─┬─ ──────┬───── - │ ╰───────────────────── def: 22 + │ ╰───────────────────── name: 22 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── unresolved 38 │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬──────── ────┬─── ────┬─── - │ ╰────────────────────────────────────────────────── def: 23 + │ ╰────────────────────────────────────────────────── name: 23 │ │ │ │ │ │ ╰───────────────────────────────────────────── ref: built-in │ │ │ │ @@ -152,10 +152,10 @@ References and definitions: │ ╰───── unresolved 39 │ string memory x2; │ ─┬ - │ ╰── def: 24 + │ ╰── name: 24 40 │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬───────── ─┬ - │ ╰─────────────────────────────── def: 25 + │ ╰─────────────────────────────── name: 25 │ │ │ │ │ ╰────────────────────────── ref: built-in │ │ │ @@ -163,3 +163,96 @@ References and definitions: │ │ │ ╰── ref: 24 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ────────▶ contract BuiltInsTest { + 2 │ │ ╭─────────▶ function testRequire() public { + ┆ ┆ ┆ + 4 │ │ ├───│ ────▶ } + │ │ │ │ + │ │ ╰─────────────────── definiens: 2 + 5 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 3 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 4 + 13 │ │ ╭───────────▶ + ┆ ┆ ┆ + 15 │ │ │ │ bytes memory x1; + │ │ │ │ ────────────┬──────────── + │ │ │ │ ╰────────────── definiens: 6 + 16 │ │ │ ╭─▶ + 17 │ │ │ ├─▶ uint v1 = addmod(1, 2, 3); + │ │ │ │ + │ │ │ ╰──────────────────────────────────────── definiens: 7 + 18 │ │ │ bytes32 v2 = blockhash(1); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 8 + 19 │ │ │ bytes32 v3 = blobhash(2); + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 9 + 20 │ │ │ address v4 = ecrecover(v2, 1, v2, v2); + │ │ │ ───────────────────────┬─────────────────────── + │ │ │ ╰───────────────────────── definiens: 10 + 21 │ │ │ uint256 v5 = gasleft(); + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 11 + 22 │ │ │ bytes32 v6 = keccak256(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 12 + 23 │ │ │ uint v7 = mulmod(1, 2, 3); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 24 │ │ │ bytes20 v8 = ripemd160(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 25 │ │ │ bytes32 v9 = sha256(x1); + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 15 + 26 │ │ ├───│ ──────▶ } + │ │ │ │ + │ │ ╰───────────────────── definiens: 5 + 27 │ │ ╭───────▶ + ┆ ┆ ┆ + 30 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 16 + 31 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 33 │ │ │ bytes memory x1; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 18 + 34 │ │ │ uint v1 = abi.decode(x1, (uint)); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 19 + 35 │ │ │ bytes memory v2 = abi.encode(v1); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 20 + 36 │ │ │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); + │ │ │ ──────────────────────────────────┬───────────────────────────────── + │ │ │ ╰─────────────────────────────────── definiens: 21 + 37 │ │ │ bytes memory v4 = abi.encodePacked(10, 20); + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 38 │ │ │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); + │ │ │ ──────────────────────────────────────────┬────────────────────────────────────────── + │ │ │ ╰──────────────────────────────────────────── definiens: 23 + 39 │ │ │ string memory x2; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 24 + 40 │ │ │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); + │ │ │ ─────────────────────────────────┬──────────────────────────────── + │ │ │ ╰────────────────────────────────── definiens: 25 + 41 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 17 + 42 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.21-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.21-failure.txt index 54e971d730..61cc9b4e98 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.21-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.21-failure.txt @@ -5,53 +5,53 @@ References and definitions: │ 1 │ contract BuiltInsTest { │ ──────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ function testRequire() public { │ ─────┬───── - │ ╰─────── def: 2 + │ ╰─────── name: 2 3 │ require(true, "should always succeed"); │ ───┬─── │ ╰───── ref: built-in │ 6 │ function testRevert() public { │ ─────┬──── - │ ╰────── def: 3 + │ ╰────── name: 3 7 │ revert("testing revert"); │ ───┬── │ ╰──── ref: built-in │ 10 │ function testAssert() public { │ ─────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 11 │ assert(2 + 2 == 4); │ ───┬── │ ╰──── ref: built-in │ 14 │ function testMath() public { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 15 │ bytes memory x1; │ ─┬ - │ ╰── def: 6 + │ ╰── name: 6 │ 17 │ uint v1 = addmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 7 + │ ╰─────────── name: 7 │ │ │ ╰──── ref: built-in 18 │ bytes32 v2 = blockhash(1); │ ─┬ ────┬──── - │ ╰────────────── def: 8 + │ ╰────────────── name: 8 │ │ │ ╰────── unresolved 19 │ bytes32 v3 = blobhash(2); │ ─┬ ────┬─── - │ ╰───────────── def: 9 + │ ╰───────────── name: 9 │ │ │ ╰───── unresolved 20 │ address v4 = ecrecover(v2, 1, v2, v2); │ ─┬ ────┬──── ─┬ ─┬ ─┬ - │ ╰──────────────────────────── def: 10 + │ ╰──────────────────────────── name: 10 │ │ │ │ │ │ ╰──────────────────── ref: built-in │ │ │ │ @@ -62,31 +62,31 @@ References and definitions: │ ╰── ref: 8 21 │ uint256 v5 = gasleft(); │ ─┬ ───┬─── - │ ╰──────────── def: 11 + │ ╰──────────── name: 11 │ │ │ ╰───── unresolved 22 │ bytes32 v6 = keccak256(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 23 │ uint v7 = mulmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 13 + │ ╰─────────── name: 13 │ │ │ ╰──── ref: built-in 24 │ bytes20 v8 = ripemd160(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 14 + │ ╰───────────────── name: 14 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 25 │ bytes32 v9 = sha256(x1); │ ─┬ ───┬── ─┬ - │ ╰────────────── def: 15 + │ ╰────────────── name: 15 │ │ │ │ ╰─────── ref: built-in │ │ @@ -94,20 +94,20 @@ References and definitions: │ 28 │ function testSelfDestruct() public { │ ────────┬─────── - │ ╰───────── def: 16 + │ ╰───────── name: 16 29 │ selfdestruct(address(0x0)); │ ──────┬───── │ ╰─────── ref: built-in │ 32 │ function testAbiFunctions() public { │ ────────┬─────── - │ ╰───────── def: 17 + │ ╰───────── name: 17 33 │ bytes memory x1; │ ─┬ - │ ╰── def: 18 + │ ╰── name: 18 34 │ uint v1 = abi.decode(x1, (uint)); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 19 + │ ╰────────────────── name: 19 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -116,7 +116,7 @@ References and definitions: │ ╰── ref: 18 35 │ bytes memory v2 = abi.encode(v1); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 20 + │ ╰────────────────── name: 20 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -125,7 +125,7 @@ References and definitions: │ ╰── ref: 19 36 │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); │ ─┬ ─┬─ ─────┬──── ────┬─── - │ ╰───────────────────────────────── def: 21 + │ ╰───────────────────────────────── name: 21 │ │ │ │ │ ╰──────────────────────────── ref: built-in │ │ │ @@ -134,14 +134,14 @@ References and definitions: │ ╰───── ref: 5 37 │ bytes memory v4 = abi.encodePacked(10, 20); │ ─┬ ─┬─ ──────┬───── - │ ╰───────────────────── def: 22 + │ ╰───────────────────── name: 22 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── unresolved 38 │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬──────── ────┬─── ────┬─── - │ ╰────────────────────────────────────────────────── def: 23 + │ ╰────────────────────────────────────────────────── name: 23 │ │ │ │ │ │ ╰───────────────────────────────────────────── ref: built-in │ │ │ │ @@ -152,10 +152,10 @@ References and definitions: │ ╰───── ref: built-in 39 │ string memory x2; │ ─┬ - │ ╰── def: 24 + │ ╰── name: 24 40 │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬───────── ─┬ - │ ╰─────────────────────────────── def: 25 + │ ╰─────────────────────────────── name: 25 │ │ │ │ │ ╰────────────────────────── ref: built-in │ │ │ @@ -163,3 +163,96 @@ References and definitions: │ │ │ ╰── ref: 24 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ────────▶ contract BuiltInsTest { + 2 │ │ ╭─────────▶ function testRequire() public { + ┆ ┆ ┆ + 4 │ │ ├───│ ────▶ } + │ │ │ │ + │ │ ╰─────────────────── definiens: 2 + 5 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 3 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 4 + 13 │ │ ╭───────────▶ + ┆ ┆ ┆ + 15 │ │ │ │ bytes memory x1; + │ │ │ │ ────────────┬──────────── + │ │ │ │ ╰────────────── definiens: 6 + 16 │ │ │ ╭─▶ + 17 │ │ │ ├─▶ uint v1 = addmod(1, 2, 3); + │ │ │ │ + │ │ │ ╰──────────────────────────────────────── definiens: 7 + 18 │ │ │ bytes32 v2 = blockhash(1); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 8 + 19 │ │ │ bytes32 v3 = blobhash(2); + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 9 + 20 │ │ │ address v4 = ecrecover(v2, 1, v2, v2); + │ │ │ ───────────────────────┬─────────────────────── + │ │ │ ╰───────────────────────── definiens: 10 + 21 │ │ │ uint256 v5 = gasleft(); + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 11 + 22 │ │ │ bytes32 v6 = keccak256(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 12 + 23 │ │ │ uint v7 = mulmod(1, 2, 3); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 24 │ │ │ bytes20 v8 = ripemd160(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 25 │ │ │ bytes32 v9 = sha256(x1); + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 15 + 26 │ │ ├───│ ──────▶ } + │ │ │ │ + │ │ ╰───────────────────── definiens: 5 + 27 │ │ ╭───────▶ + ┆ ┆ ┆ + 30 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 16 + 31 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 33 │ │ │ bytes memory x1; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 18 + 34 │ │ │ uint v1 = abi.decode(x1, (uint)); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 19 + 35 │ │ │ bytes memory v2 = abi.encode(v1); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 20 + 36 │ │ │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); + │ │ │ ──────────────────────────────────┬───────────────────────────────── + │ │ │ ╰─────────────────────────────────── definiens: 21 + 37 │ │ │ bytes memory v4 = abi.encodePacked(10, 20); + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 38 │ │ │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); + │ │ │ ──────────────────────────────────────────┬────────────────────────────────────────── + │ │ │ ╰──────────────────────────────────────────── definiens: 23 + 39 │ │ │ string memory x2; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 24 + 40 │ │ │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); + │ │ │ ─────────────────────────────────┬──────────────────────────────── + │ │ │ ╰────────────────────────────────── definiens: 25 + 41 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 17 + 42 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.22-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.22-failure.txt index fc3aaa04ce..296a9a73fe 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.22-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.4.22-failure.txt @@ -5,53 +5,53 @@ References and definitions: │ 1 │ contract BuiltInsTest { │ ──────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ function testRequire() public { │ ─────┬───── - │ ╰─────── def: 2 + │ ╰─────── name: 2 3 │ require(true, "should always succeed"); │ ───┬─── │ ╰───── refs: built-in, built-in │ 6 │ function testRevert() public { │ ─────┬──── - │ ╰────── def: 3 + │ ╰────── name: 3 7 │ revert("testing revert"); │ ───┬── │ ╰──── refs: built-in, built-in │ 10 │ function testAssert() public { │ ─────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 11 │ assert(2 + 2 == 4); │ ───┬── │ ╰──── ref: built-in │ 14 │ function testMath() public { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 15 │ bytes memory x1; │ ─┬ - │ ╰── def: 6 + │ ╰── name: 6 │ 17 │ uint v1 = addmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 7 + │ ╰─────────── name: 7 │ │ │ ╰──── ref: built-in 18 │ bytes32 v2 = blockhash(1); │ ─┬ ────┬──── - │ ╰────────────── def: 8 + │ ╰────────────── name: 8 │ │ │ ╰────── ref: built-in 19 │ bytes32 v3 = blobhash(2); │ ─┬ ────┬─── - │ ╰───────────── def: 9 + │ ╰───────────── name: 9 │ │ │ ╰───── unresolved 20 │ address v4 = ecrecover(v2, 1, v2, v2); │ ─┬ ────┬──── ─┬ ─┬ ─┬ - │ ╰──────────────────────────── def: 10 + │ ╰──────────────────────────── name: 10 │ │ │ │ │ │ ╰──────────────────── ref: built-in │ │ │ │ @@ -62,31 +62,31 @@ References and definitions: │ ╰── ref: 8 21 │ uint256 v5 = gasleft(); │ ─┬ ───┬─── - │ ╰──────────── def: 11 + │ ╰──────────── name: 11 │ │ │ ╰───── ref: built-in 22 │ bytes32 v6 = keccak256(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 23 │ uint v7 = mulmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 13 + │ ╰─────────── name: 13 │ │ │ ╰──── ref: built-in 24 │ bytes20 v8 = ripemd160(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 14 + │ ╰───────────────── name: 14 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 25 │ bytes32 v9 = sha256(x1); │ ─┬ ───┬── ─┬ - │ ╰────────────── def: 15 + │ ╰────────────── name: 15 │ │ │ │ ╰─────── ref: built-in │ │ @@ -94,20 +94,20 @@ References and definitions: │ 28 │ function testSelfDestruct() public { │ ────────┬─────── - │ ╰───────── def: 16 + │ ╰───────── name: 16 29 │ selfdestruct(address(0x0)); │ ──────┬───── │ ╰─────── ref: built-in │ 32 │ function testAbiFunctions() public { │ ────────┬─────── - │ ╰───────── def: 17 + │ ╰───────── name: 17 33 │ bytes memory x1; │ ─┬ - │ ╰── def: 18 + │ ╰── name: 18 34 │ uint v1 = abi.decode(x1, (uint)); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 19 + │ ╰────────────────── name: 19 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -116,7 +116,7 @@ References and definitions: │ ╰── ref: 18 35 │ bytes memory v2 = abi.encode(v1); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 20 + │ ╰────────────────── name: 20 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -125,7 +125,7 @@ References and definitions: │ ╰── ref: 19 36 │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); │ ─┬ ─┬─ ─────┬──── ────┬─── - │ ╰───────────────────────────────── def: 21 + │ ╰───────────────────────────────── name: 21 │ │ │ │ │ ╰──────────────────────────── ref: built-in │ │ │ @@ -134,14 +134,14 @@ References and definitions: │ ╰───── ref: 5 37 │ bytes memory v4 = abi.encodePacked(10, 20); │ ─┬ ─┬─ ──────┬───── - │ ╰───────────────────── def: 22 + │ ╰───────────────────── name: 22 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── ref: built-in 38 │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬──────── ────┬─── ────┬─── - │ ╰────────────────────────────────────────────────── def: 23 + │ ╰────────────────────────────────────────────────── name: 23 │ │ │ │ │ │ ╰───────────────────────────────────────────── ref: built-in │ │ │ │ @@ -152,10 +152,10 @@ References and definitions: │ ╰───── ref: built-in 39 │ string memory x2; │ ─┬ - │ ╰── def: 24 + │ ╰── name: 24 40 │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬───────── ─┬ - │ ╰─────────────────────────────── def: 25 + │ ╰─────────────────────────────── name: 25 │ │ │ │ │ ╰────────────────────────── ref: built-in │ │ │ @@ -163,3 +163,96 @@ References and definitions: │ │ │ ╰── ref: 24 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ────────▶ contract BuiltInsTest { + 2 │ │ ╭─────────▶ function testRequire() public { + ┆ ┆ ┆ + 4 │ │ ├───│ ────▶ } + │ │ │ │ + │ │ ╰─────────────────── definiens: 2 + 5 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 3 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 4 + 13 │ │ ╭───────────▶ + ┆ ┆ ┆ + 15 │ │ │ │ bytes memory x1; + │ │ │ │ ────────────┬──────────── + │ │ │ │ ╰────────────── definiens: 6 + 16 │ │ │ ╭─▶ + 17 │ │ │ ├─▶ uint v1 = addmod(1, 2, 3); + │ │ │ │ + │ │ │ ╰──────────────────────────────────────── definiens: 7 + 18 │ │ │ bytes32 v2 = blockhash(1); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 8 + 19 │ │ │ bytes32 v3 = blobhash(2); + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 9 + 20 │ │ │ address v4 = ecrecover(v2, 1, v2, v2); + │ │ │ ───────────────────────┬─────────────────────── + │ │ │ ╰───────────────────────── definiens: 10 + 21 │ │ │ uint256 v5 = gasleft(); + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 11 + 22 │ │ │ bytes32 v6 = keccak256(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 12 + 23 │ │ │ uint v7 = mulmod(1, 2, 3); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 24 │ │ │ bytes20 v8 = ripemd160(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 25 │ │ │ bytes32 v9 = sha256(x1); + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 15 + 26 │ │ ├───│ ──────▶ } + │ │ │ │ + │ │ ╰───────────────────── definiens: 5 + 27 │ │ ╭───────▶ + ┆ ┆ ┆ + 30 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 16 + 31 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 33 │ │ │ bytes memory x1; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 18 + 34 │ │ │ uint v1 = abi.decode(x1, (uint)); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 19 + 35 │ │ │ bytes memory v2 = abi.encode(v1); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 20 + 36 │ │ │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); + │ │ │ ──────────────────────────────────┬───────────────────────────────── + │ │ │ ╰─────────────────────────────────── definiens: 21 + 37 │ │ │ bytes memory v4 = abi.encodePacked(10, 20); + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 38 │ │ │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); + │ │ │ ──────────────────────────────────────────┬────────────────────────────────────────── + │ │ │ ╰──────────────────────────────────────────── definiens: 23 + 39 │ │ │ string memory x2; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 24 + 40 │ │ │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); + │ │ │ ─────────────────────────────────┬──────────────────────────────── + │ │ │ ╰────────────────────────────────── definiens: 25 + 41 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 17 + 42 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.5.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.5.0-failure.txt index 3a79b59191..f943c81b61 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.5.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.5.0-failure.txt @@ -5,53 +5,53 @@ References and definitions: │ 1 │ contract BuiltInsTest { │ ──────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ function testRequire() public { │ ─────┬───── - │ ╰─────── def: 2 + │ ╰─────── name: 2 3 │ require(true, "should always succeed"); │ ───┬─── │ ╰───── refs: built-in, built-in │ 6 │ function testRevert() public { │ ─────┬──── - │ ╰────── def: 3 + │ ╰────── name: 3 7 │ revert("testing revert"); │ ───┬── │ ╰──── refs: built-in, built-in │ 10 │ function testAssert() public { │ ─────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 11 │ assert(2 + 2 == 4); │ ───┬── │ ╰──── ref: built-in │ 14 │ function testMath() public { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 15 │ bytes memory x1; │ ─┬ - │ ╰── def: 6 + │ ╰── name: 6 │ 17 │ uint v1 = addmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 7 + │ ╰─────────── name: 7 │ │ │ ╰──── ref: built-in 18 │ bytes32 v2 = blockhash(1); │ ─┬ ────┬──── - │ ╰────────────── def: 8 + │ ╰────────────── name: 8 │ │ │ ╰────── ref: built-in 19 │ bytes32 v3 = blobhash(2); │ ─┬ ────┬─── - │ ╰───────────── def: 9 + │ ╰───────────── name: 9 │ │ │ ╰───── unresolved 20 │ address v4 = ecrecover(v2, 1, v2, v2); │ ─┬ ────┬──── ─┬ ─┬ ─┬ - │ ╰──────────────────────────── def: 10 + │ ╰──────────────────────────── name: 10 │ │ │ │ │ │ ╰──────────────────── ref: built-in │ │ │ │ @@ -62,31 +62,31 @@ References and definitions: │ ╰── ref: 8 21 │ uint256 v5 = gasleft(); │ ─┬ ───┬─── - │ ╰──────────── def: 11 + │ ╰──────────── name: 11 │ │ │ ╰───── ref: built-in 22 │ bytes32 v6 = keccak256(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 23 │ uint v7 = mulmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 13 + │ ╰─────────── name: 13 │ │ │ ╰──── ref: built-in 24 │ bytes20 v8 = ripemd160(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 14 + │ ╰───────────────── name: 14 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 25 │ bytes32 v9 = sha256(x1); │ ─┬ ───┬── ─┬ - │ ╰────────────── def: 15 + │ ╰────────────── name: 15 │ │ │ │ ╰─────── ref: built-in │ │ @@ -94,20 +94,20 @@ References and definitions: │ 28 │ function testSelfDestruct() public { │ ────────┬─────── - │ ╰───────── def: 16 + │ ╰───────── name: 16 29 │ selfdestruct(address(0x0)); │ ──────┬───── │ ╰─────── ref: built-in │ 32 │ function testAbiFunctions() public { │ ────────┬─────── - │ ╰───────── def: 17 + │ ╰───────── name: 17 33 │ bytes memory x1; │ ─┬ - │ ╰── def: 18 + │ ╰── name: 18 34 │ uint v1 = abi.decode(x1, (uint)); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 19 + │ ╰────────────────── name: 19 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -116,7 +116,7 @@ References and definitions: │ ╰── ref: 18 35 │ bytes memory v2 = abi.encode(v1); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 20 + │ ╰────────────────── name: 20 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -125,7 +125,7 @@ References and definitions: │ ╰── ref: 19 36 │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); │ ─┬ ─┬─ ─────┬──── ────┬─── - │ ╰───────────────────────────────── def: 21 + │ ╰───────────────────────────────── name: 21 │ │ │ │ │ ╰──────────────────────────── ref: built-in │ │ │ @@ -134,14 +134,14 @@ References and definitions: │ ╰───── ref: 5 37 │ bytes memory v4 = abi.encodePacked(10, 20); │ ─┬ ─┬─ ──────┬───── - │ ╰───────────────────── def: 22 + │ ╰───────────────────── name: 22 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── ref: built-in 38 │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬──────── ────┬─── ────┬─── - │ ╰────────────────────────────────────────────────── def: 23 + │ ╰────────────────────────────────────────────────── name: 23 │ │ │ │ │ │ ╰───────────────────────────────────────────── ref: built-in │ │ │ │ @@ -152,10 +152,10 @@ References and definitions: │ ╰───── ref: built-in 39 │ string memory x2; │ ─┬ - │ ╰── def: 24 + │ ╰── name: 24 40 │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬───────── ─┬ - │ ╰─────────────────────────────── def: 25 + │ ╰─────────────────────────────── name: 25 │ │ │ │ │ ╰────────────────────────── ref: built-in │ │ │ @@ -163,3 +163,96 @@ References and definitions: │ │ │ ╰── ref: 24 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ────────▶ contract BuiltInsTest { + 2 │ │ ╭─────────▶ function testRequire() public { + ┆ ┆ ┆ + 4 │ │ ├───│ ────▶ } + │ │ │ │ + │ │ ╰─────────────────── definiens: 2 + 5 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 3 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 4 + 13 │ │ ╭───────────▶ + ┆ ┆ ┆ + 15 │ │ │ │ bytes memory x1; + │ │ │ │ ────────────┬──────────── + │ │ │ │ ╰────────────── definiens: 6 + 16 │ │ │ ╭─▶ + 17 │ │ │ ├─▶ uint v1 = addmod(1, 2, 3); + │ │ │ │ + │ │ │ ╰──────────────────────────────────────── definiens: 7 + 18 │ │ │ bytes32 v2 = blockhash(1); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 8 + 19 │ │ │ bytes32 v3 = blobhash(2); + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 9 + 20 │ │ │ address v4 = ecrecover(v2, 1, v2, v2); + │ │ │ ───────────────────────┬─────────────────────── + │ │ │ ╰───────────────────────── definiens: 10 + 21 │ │ │ uint256 v5 = gasleft(); + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 11 + 22 │ │ │ bytes32 v6 = keccak256(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 12 + 23 │ │ │ uint v7 = mulmod(1, 2, 3); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 24 │ │ │ bytes20 v8 = ripemd160(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 25 │ │ │ bytes32 v9 = sha256(x1); + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 15 + 26 │ │ ├───│ ──────▶ } + │ │ │ │ + │ │ ╰───────────────────── definiens: 5 + 27 │ │ ╭───────▶ + ┆ ┆ ┆ + 30 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 16 + 31 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 33 │ │ │ bytes memory x1; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 18 + 34 │ │ │ uint v1 = abi.decode(x1, (uint)); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 19 + 35 │ │ │ bytes memory v2 = abi.encode(v1); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 20 + 36 │ │ │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); + │ │ │ ──────────────────────────────────┬───────────────────────────────── + │ │ │ ╰─────────────────────────────────── definiens: 21 + 37 │ │ │ bytes memory v4 = abi.encodePacked(10, 20); + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 38 │ │ │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); + │ │ │ ──────────────────────────────────────────┬────────────────────────────────────────── + │ │ │ ╰──────────────────────────────────────────── definiens: 23 + 39 │ │ │ string memory x2; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 24 + 40 │ │ │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); + │ │ │ ─────────────────────────────────┬──────────────────────────────── + │ │ │ ╰────────────────────────────────── definiens: 25 + 41 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 17 + 42 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.13-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.13-failure.txt index 43b3aa3a88..bad4d80172 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.13-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.13-failure.txt @@ -5,50 +5,50 @@ References and definitions: │ 1 │ contract BuiltInsTest { │ ──────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ function testRequire() public { │ ─────┬───── - │ ╰─────── def: 2 + │ ╰─────── name: 2 3 │ require(true, "should always succeed"); │ ───┬─── │ ╰───── refs: built-in, built-in │ 6 │ function testRevert() public { │ ─────┬──── - │ ╰────── def: 3 + │ ╰────── name: 3 │ 10 │ function testAssert() public { │ ─────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 11 │ assert(2 + 2 == 4); │ ───┬── │ ╰──── ref: built-in │ 14 │ function testMath() public { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 15 │ bytes memory x1; │ ─┬ - │ ╰── def: 6 + │ ╰── name: 6 │ 17 │ uint v1 = addmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 7 + │ ╰─────────── name: 7 │ │ │ ╰──── ref: built-in 18 │ bytes32 v2 = blockhash(1); │ ─┬ ────┬──── - │ ╰────────────── def: 8 + │ ╰────────────── name: 8 │ │ │ ╰────── ref: built-in 19 │ bytes32 v3 = blobhash(2); │ ─┬ ────┬─── - │ ╰───────────── def: 9 + │ ╰───────────── name: 9 │ │ │ ╰───── unresolved 20 │ address v4 = ecrecover(v2, 1, v2, v2); │ ─┬ ────┬──── ─┬ ─┬ ─┬ - │ ╰──────────────────────────── def: 10 + │ ╰──────────────────────────── name: 10 │ │ │ │ │ │ ╰──────────────────── ref: built-in │ │ │ │ @@ -59,31 +59,31 @@ References and definitions: │ ╰── ref: 8 21 │ uint256 v5 = gasleft(); │ ─┬ ───┬─── - │ ╰──────────── def: 11 + │ ╰──────────── name: 11 │ │ │ ╰───── ref: built-in 22 │ bytes32 v6 = keccak256(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 23 │ uint v7 = mulmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 13 + │ ╰─────────── name: 13 │ │ │ ╰──── ref: built-in 24 │ bytes20 v8 = ripemd160(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 14 + │ ╰───────────────── name: 14 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 25 │ bytes32 v9 = sha256(x1); │ ─┬ ───┬── ─┬ - │ ╰────────────── def: 15 + │ ╰────────────── name: 15 │ │ │ │ ╰─────── ref: built-in │ │ @@ -91,20 +91,20 @@ References and definitions: │ 28 │ function testSelfDestruct() public { │ ────────┬─────── - │ ╰───────── def: 16 + │ ╰───────── name: 16 29 │ selfdestruct(address(0x0)); │ ──────┬───── │ ╰─────── ref: built-in │ 32 │ function testAbiFunctions() public { │ ────────┬─────── - │ ╰───────── def: 17 + │ ╰───────── name: 17 33 │ bytes memory x1; │ ─┬ - │ ╰── def: 18 + │ ╰── name: 18 34 │ uint v1 = abi.decode(x1, (uint)); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 19 + │ ╰────────────────── name: 19 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -113,7 +113,7 @@ References and definitions: │ ╰── ref: 18 35 │ bytes memory v2 = abi.encode(v1); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 20 + │ ╰────────────────── name: 20 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -122,7 +122,7 @@ References and definitions: │ ╰── ref: 19 36 │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); │ ─┬ ─┬─ ─────┬──── ────┬─── - │ ╰───────────────────────────────── def: 21 + │ ╰───────────────────────────────── name: 21 │ │ │ │ │ ╰──────────────────────────── ref: built-in │ │ │ @@ -131,14 +131,14 @@ References and definitions: │ ╰───── ref: 5 37 │ bytes memory v4 = abi.encodePacked(10, 20); │ ─┬ ─┬─ ──────┬───── - │ ╰───────────────────── def: 22 + │ ╰───────────────────── name: 22 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── ref: built-in 38 │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬──────── ────┬─── ────┬─── - │ ╰────────────────────────────────────────────────── def: 23 + │ ╰────────────────────────────────────────────────── name: 23 │ │ │ │ │ │ ╰───────────────────────────────────────────── ref: built-in │ │ │ │ @@ -149,10 +149,10 @@ References and definitions: │ ╰───── ref: built-in 39 │ string memory x2; │ ─┬ - │ ╰── def: 24 + │ ╰── name: 24 40 │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬───────── ─┬ - │ ╰─────────────────────────────── def: 25 + │ ╰─────────────────────────────── name: 25 │ │ │ │ │ ╰────────────────────────── ref: built-in │ │ │ @@ -160,3 +160,96 @@ References and definitions: │ │ │ ╰── ref: 24 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ────────▶ contract BuiltInsTest { + 2 │ │ ╭─────────▶ function testRequire() public { + ┆ ┆ ┆ + 4 │ │ ├───│ ────▶ } + │ │ │ │ + │ │ ╰─────────────────── definiens: 2 + 5 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 3 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 4 + 13 │ │ ╭───────────▶ + ┆ ┆ ┆ + 15 │ │ │ │ bytes memory x1; + │ │ │ │ ────────────┬──────────── + │ │ │ │ ╰────────────── definiens: 6 + 16 │ │ │ ╭─▶ + 17 │ │ │ ├─▶ uint v1 = addmod(1, 2, 3); + │ │ │ │ + │ │ │ ╰──────────────────────────────────────── definiens: 7 + 18 │ │ │ bytes32 v2 = blockhash(1); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 8 + 19 │ │ │ bytes32 v3 = blobhash(2); + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 9 + 20 │ │ │ address v4 = ecrecover(v2, 1, v2, v2); + │ │ │ ───────────────────────┬─────────────────────── + │ │ │ ╰───────────────────────── definiens: 10 + 21 │ │ │ uint256 v5 = gasleft(); + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 11 + 22 │ │ │ bytes32 v6 = keccak256(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 12 + 23 │ │ │ uint v7 = mulmod(1, 2, 3); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 24 │ │ │ bytes20 v8 = ripemd160(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 25 │ │ │ bytes32 v9 = sha256(x1); + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 15 + 26 │ │ ├───│ ──────▶ } + │ │ │ │ + │ │ ╰───────────────────── definiens: 5 + 27 │ │ ╭───────▶ + ┆ ┆ ┆ + 30 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 16 + 31 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 33 │ │ │ bytes memory x1; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 18 + 34 │ │ │ uint v1 = abi.decode(x1, (uint)); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 19 + 35 │ │ │ bytes memory v2 = abi.encode(v1); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 20 + 36 │ │ │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); + │ │ │ ──────────────────────────────────┬───────────────────────────────── + │ │ │ ╰─────────────────────────────────── definiens: 21 + 37 │ │ │ bytes memory v4 = abi.encodePacked(10, 20); + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 38 │ │ │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); + │ │ │ ──────────────────────────────────────────┬────────────────────────────────────────── + │ │ │ ╰──────────────────────────────────────────── definiens: 23 + 39 │ │ │ string memory x2; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 24 + 40 │ │ │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); + │ │ │ ─────────────────────────────────┬──────────────────────────────── + │ │ │ ╰────────────────────────────────── definiens: 25 + 41 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 17 + 42 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.24-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.24-success.txt index 4134c68526..f5bd17f143 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.24-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.24-success.txt @@ -5,50 +5,50 @@ References and definitions: │ 1 │ contract BuiltInsTest { │ ──────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ function testRequire() public { │ ─────┬───── - │ ╰─────── def: 2 + │ ╰─────── name: 2 3 │ require(true, "should always succeed"); │ ───┬─── │ ╰───── refs: built-in, built-in │ 6 │ function testRevert() public { │ ─────┬──── - │ ╰────── def: 3 + │ ╰────── name: 3 │ 10 │ function testAssert() public { │ ─────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 11 │ assert(2 + 2 == 4); │ ───┬── │ ╰──── ref: built-in │ 14 │ function testMath() public { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 15 │ bytes memory x1; │ ─┬ - │ ╰── def: 6 + │ ╰── name: 6 │ 17 │ uint v1 = addmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 7 + │ ╰─────────── name: 7 │ │ │ ╰──── ref: built-in 18 │ bytes32 v2 = blockhash(1); │ ─┬ ────┬──── - │ ╰────────────── def: 8 + │ ╰────────────── name: 8 │ │ │ ╰────── ref: built-in 19 │ bytes32 v3 = blobhash(2); │ ─┬ ────┬─── - │ ╰───────────── def: 9 + │ ╰───────────── name: 9 │ │ │ ╰───── ref: built-in 20 │ address v4 = ecrecover(v2, 1, v2, v2); │ ─┬ ────┬──── ─┬ ─┬ ─┬ - │ ╰──────────────────────────── def: 10 + │ ╰──────────────────────────── name: 10 │ │ │ │ │ │ ╰──────────────────── ref: built-in │ │ │ │ @@ -59,31 +59,31 @@ References and definitions: │ ╰── ref: 8 21 │ uint256 v5 = gasleft(); │ ─┬ ───┬─── - │ ╰──────────── def: 11 + │ ╰──────────── name: 11 │ │ │ ╰───── ref: built-in 22 │ bytes32 v6 = keccak256(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 23 │ uint v7 = mulmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 13 + │ ╰─────────── name: 13 │ │ │ ╰──── ref: built-in 24 │ bytes20 v8 = ripemd160(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 14 + │ ╰───────────────── name: 14 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 25 │ bytes32 v9 = sha256(x1); │ ─┬ ───┬── ─┬ - │ ╰────────────── def: 15 + │ ╰────────────── name: 15 │ │ │ │ ╰─────── ref: built-in │ │ @@ -91,20 +91,20 @@ References and definitions: │ 28 │ function testSelfDestruct() public { │ ────────┬─────── - │ ╰───────── def: 16 + │ ╰───────── name: 16 29 │ selfdestruct(address(0x0)); │ ──────┬───── │ ╰─────── ref: built-in │ 32 │ function testAbiFunctions() public { │ ────────┬─────── - │ ╰───────── def: 17 + │ ╰───────── name: 17 33 │ bytes memory x1; │ ─┬ - │ ╰── def: 18 + │ ╰── name: 18 34 │ uint v1 = abi.decode(x1, (uint)); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 19 + │ ╰────────────────── name: 19 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -113,7 +113,7 @@ References and definitions: │ ╰── ref: 18 35 │ bytes memory v2 = abi.encode(v1); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 20 + │ ╰────────────────── name: 20 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -122,7 +122,7 @@ References and definitions: │ ╰── ref: 19 36 │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); │ ─┬ ─┬─ ─────┬──── ────┬─── - │ ╰───────────────────────────────── def: 21 + │ ╰───────────────────────────────── name: 21 │ │ │ │ │ ╰──────────────────────────── ref: built-in │ │ │ @@ -131,14 +131,14 @@ References and definitions: │ ╰───── ref: 5 37 │ bytes memory v4 = abi.encodePacked(10, 20); │ ─┬ ─┬─ ──────┬───── - │ ╰───────────────────── def: 22 + │ ╰───────────────────── name: 22 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── ref: built-in 38 │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬──────── ────┬─── ────┬─── - │ ╰────────────────────────────────────────────────── def: 23 + │ ╰────────────────────────────────────────────────── name: 23 │ │ │ │ │ │ ╰───────────────────────────────────────────── ref: built-in │ │ │ │ @@ -149,10 +149,10 @@ References and definitions: │ ╰───── ref: built-in 39 │ string memory x2; │ ─┬ - │ ╰── def: 24 + │ ╰── name: 24 40 │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬───────── ─┬ - │ ╰─────────────────────────────── def: 25 + │ ╰─────────────────────────────── name: 25 │ │ │ │ │ ╰────────────────────────── ref: built-in │ │ │ @@ -160,3 +160,96 @@ References and definitions: │ │ │ ╰── ref: 24 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ────────▶ contract BuiltInsTest { + 2 │ │ ╭─────────▶ function testRequire() public { + ┆ ┆ ┆ + 4 │ │ ├───│ ────▶ } + │ │ │ │ + │ │ ╰─────────────────── definiens: 2 + 5 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 3 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 4 + 13 │ │ ╭───────────▶ + ┆ ┆ ┆ + 15 │ │ │ │ bytes memory x1; + │ │ │ │ ────────────┬──────────── + │ │ │ │ ╰────────────── definiens: 6 + 16 │ │ │ ╭─▶ + 17 │ │ │ ├─▶ uint v1 = addmod(1, 2, 3); + │ │ │ │ + │ │ │ ╰──────────────────────────────────────── definiens: 7 + 18 │ │ │ bytes32 v2 = blockhash(1); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 8 + 19 │ │ │ bytes32 v3 = blobhash(2); + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 9 + 20 │ │ │ address v4 = ecrecover(v2, 1, v2, v2); + │ │ │ ───────────────────────┬─────────────────────── + │ │ │ ╰───────────────────────── definiens: 10 + 21 │ │ │ uint256 v5 = gasleft(); + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 11 + 22 │ │ │ bytes32 v6 = keccak256(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 12 + 23 │ │ │ uint v7 = mulmod(1, 2, 3); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 24 │ │ │ bytes20 v8 = ripemd160(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 25 │ │ │ bytes32 v9 = sha256(x1); + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 15 + 26 │ │ ├───│ ──────▶ } + │ │ │ │ + │ │ ╰───────────────────── definiens: 5 + 27 │ │ ╭───────▶ + ┆ ┆ ┆ + 30 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 16 + 31 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 33 │ │ │ bytes memory x1; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 18 + 34 │ │ │ uint v1 = abi.decode(x1, (uint)); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 19 + 35 │ │ │ bytes memory v2 = abi.encode(v1); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 20 + 36 │ │ │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); + │ │ │ ──────────────────────────────────┬───────────────────────────────── + │ │ │ ╰─────────────────────────────────── definiens: 21 + 37 │ │ │ bytes memory v4 = abi.encodePacked(10, 20); + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 38 │ │ │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); + │ │ │ ──────────────────────────────────────────┬────────────────────────────────────────── + │ │ │ ╰──────────────────────────────────────────── definiens: 23 + 39 │ │ │ string memory x2; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 24 + 40 │ │ │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); + │ │ │ ─────────────────────────────────┬──────────────────────────────── + │ │ │ ╰────────────────────────────────── definiens: 25 + 41 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 17 + 42 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.27-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.27-success.txt index 1d9544857a..0151bb2ddd 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.27-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.27-success.txt @@ -5,50 +5,50 @@ References and definitions: │ 1 │ contract BuiltInsTest { │ ──────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ function testRequire() public { │ ─────┬───── - │ ╰─────── def: 2 + │ ╰─────── name: 2 3 │ require(true, "should always succeed"); │ ───┬─── │ ╰───── refs: built-in, built-in, built-in │ 6 │ function testRevert() public { │ ─────┬──── - │ ╰────── def: 3 + │ ╰────── name: 3 │ 10 │ function testAssert() public { │ ─────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 11 │ assert(2 + 2 == 4); │ ───┬── │ ╰──── ref: built-in │ 14 │ function testMath() public { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 15 │ bytes memory x1; │ ─┬ - │ ╰── def: 6 + │ ╰── name: 6 │ 17 │ uint v1 = addmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 7 + │ ╰─────────── name: 7 │ │ │ ╰──── ref: built-in 18 │ bytes32 v2 = blockhash(1); │ ─┬ ────┬──── - │ ╰────────────── def: 8 + │ ╰────────────── name: 8 │ │ │ ╰────── ref: built-in 19 │ bytes32 v3 = blobhash(2); │ ─┬ ────┬─── - │ ╰───────────── def: 9 + │ ╰───────────── name: 9 │ │ │ ╰───── ref: built-in 20 │ address v4 = ecrecover(v2, 1, v2, v2); │ ─┬ ────┬──── ─┬ ─┬ ─┬ - │ ╰──────────────────────────── def: 10 + │ ╰──────────────────────────── name: 10 │ │ │ │ │ │ ╰──────────────────── ref: built-in │ │ │ │ @@ -59,31 +59,31 @@ References and definitions: │ ╰── ref: 8 21 │ uint256 v5 = gasleft(); │ ─┬ ───┬─── - │ ╰──────────── def: 11 + │ ╰──────────── name: 11 │ │ │ ╰───── ref: built-in 22 │ bytes32 v6 = keccak256(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 23 │ uint v7 = mulmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 13 + │ ╰─────────── name: 13 │ │ │ ╰──── ref: built-in 24 │ bytes20 v8 = ripemd160(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 14 + │ ╰───────────────── name: 14 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 25 │ bytes32 v9 = sha256(x1); │ ─┬ ───┬── ─┬ - │ ╰────────────── def: 15 + │ ╰────────────── name: 15 │ │ │ │ ╰─────── ref: built-in │ │ @@ -91,20 +91,20 @@ References and definitions: │ 28 │ function testSelfDestruct() public { │ ────────┬─────── - │ ╰───────── def: 16 + │ ╰───────── name: 16 29 │ selfdestruct(address(0x0)); │ ──────┬───── │ ╰─────── ref: built-in │ 32 │ function testAbiFunctions() public { │ ────────┬─────── - │ ╰───────── def: 17 + │ ╰───────── name: 17 33 │ bytes memory x1; │ ─┬ - │ ╰── def: 18 + │ ╰── name: 18 34 │ uint v1 = abi.decode(x1, (uint)); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 19 + │ ╰────────────────── name: 19 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -113,7 +113,7 @@ References and definitions: │ ╰── ref: 18 35 │ bytes memory v2 = abi.encode(v1); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 20 + │ ╰────────────────── name: 20 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -122,7 +122,7 @@ References and definitions: │ ╰── ref: 19 36 │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); │ ─┬ ─┬─ ─────┬──── ────┬─── - │ ╰───────────────────────────────── def: 21 + │ ╰───────────────────────────────── name: 21 │ │ │ │ │ ╰──────────────────────────── ref: built-in │ │ │ @@ -131,14 +131,14 @@ References and definitions: │ ╰───── ref: 5 37 │ bytes memory v4 = abi.encodePacked(10, 20); │ ─┬ ─┬─ ──────┬───── - │ ╰───────────────────── def: 22 + │ ╰───────────────────── name: 22 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── ref: built-in 38 │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬──────── ────┬─── ────┬─── - │ ╰────────────────────────────────────────────────── def: 23 + │ ╰────────────────────────────────────────────────── name: 23 │ │ │ │ │ │ ╰───────────────────────────────────────────── ref: built-in │ │ │ │ @@ -149,10 +149,10 @@ References and definitions: │ ╰───── ref: built-in 39 │ string memory x2; │ ─┬ - │ ╰── def: 24 + │ ╰── name: 24 40 │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬───────── ─┬ - │ ╰─────────────────────────────── def: 25 + │ ╰─────────────────────────────── name: 25 │ │ │ │ │ ╰────────────────────────── ref: built-in │ │ │ @@ -160,3 +160,96 @@ References and definitions: │ │ │ ╰── ref: 24 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ────────▶ contract BuiltInsTest { + 2 │ │ ╭─────────▶ function testRequire() public { + ┆ ┆ ┆ + 4 │ │ ├───│ ────▶ } + │ │ │ │ + │ │ ╰─────────────────── definiens: 2 + 5 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 3 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 4 + 13 │ │ ╭───────────▶ + ┆ ┆ ┆ + 15 │ │ │ │ bytes memory x1; + │ │ │ │ ────────────┬──────────── + │ │ │ │ ╰────────────── definiens: 6 + 16 │ │ │ ╭─▶ + 17 │ │ │ ├─▶ uint v1 = addmod(1, 2, 3); + │ │ │ │ + │ │ │ ╰──────────────────────────────────────── definiens: 7 + 18 │ │ │ bytes32 v2 = blockhash(1); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 8 + 19 │ │ │ bytes32 v3 = blobhash(2); + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 9 + 20 │ │ │ address v4 = ecrecover(v2, 1, v2, v2); + │ │ │ ───────────────────────┬─────────────────────── + │ │ │ ╰───────────────────────── definiens: 10 + 21 │ │ │ uint256 v5 = gasleft(); + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 11 + 22 │ │ │ bytes32 v6 = keccak256(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 12 + 23 │ │ │ uint v7 = mulmod(1, 2, 3); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 24 │ │ │ bytes20 v8 = ripemd160(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 25 │ │ │ bytes32 v9 = sha256(x1); + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 15 + 26 │ │ ├───│ ──────▶ } + │ │ │ │ + │ │ ╰───────────────────── definiens: 5 + 27 │ │ ╭───────▶ + ┆ ┆ ┆ + 30 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 16 + 31 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 33 │ │ │ bytes memory x1; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 18 + 34 │ │ │ uint v1 = abi.decode(x1, (uint)); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 19 + 35 │ │ │ bytes memory v2 = abi.encode(v1); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 20 + 36 │ │ │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); + │ │ │ ──────────────────────────────────┬───────────────────────────────── + │ │ │ ╰─────────────────────────────────── definiens: 21 + 37 │ │ │ bytes memory v4 = abi.encodePacked(10, 20); + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 38 │ │ │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); + │ │ │ ──────────────────────────────────────────┬────────────────────────────────────────── + │ │ │ ╰──────────────────────────────────────────── definiens: 23 + 39 │ │ │ string memory x2; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 24 + 40 │ │ │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); + │ │ │ ─────────────────────────────────┬──────────────────────────────── + │ │ │ ╰────────────────────────────────── definiens: 25 + 41 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 17 + 42 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.4-failure.txt index 3c898c3511..cddf9be974 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/functions/generated/0.8.4-failure.txt @@ -5,50 +5,50 @@ References and definitions: │ 1 │ contract BuiltInsTest { │ ──────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ function testRequire() public { │ ─────┬───── - │ ╰─────── def: 2 + │ ╰─────── name: 2 3 │ require(true, "should always succeed"); │ ───┬─── │ ╰───── refs: built-in, built-in │ 6 │ function testRevert() public { │ ─────┬──── - │ ╰────── def: 3 + │ ╰────── name: 3 │ 10 │ function testAssert() public { │ ─────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 11 │ assert(2 + 2 == 4); │ ───┬── │ ╰──── ref: built-in │ 14 │ function testMath() public { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 15 │ bytes memory x1; │ ─┬ - │ ╰── def: 6 + │ ╰── name: 6 │ 17 │ uint v1 = addmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 7 + │ ╰─────────── name: 7 │ │ │ ╰──── ref: built-in 18 │ bytes32 v2 = blockhash(1); │ ─┬ ────┬──── - │ ╰────────────── def: 8 + │ ╰────────────── name: 8 │ │ │ ╰────── ref: built-in 19 │ bytes32 v3 = blobhash(2); │ ─┬ ────┬─── - │ ╰───────────── def: 9 + │ ╰───────────── name: 9 │ │ │ ╰───── unresolved 20 │ address v4 = ecrecover(v2, 1, v2, v2); │ ─┬ ────┬──── ─┬ ─┬ ─┬ - │ ╰──────────────────────────── def: 10 + │ ╰──────────────────────────── name: 10 │ │ │ │ │ │ ╰──────────────────── ref: built-in │ │ │ │ @@ -59,31 +59,31 @@ References and definitions: │ ╰── ref: 8 21 │ uint256 v5 = gasleft(); │ ─┬ ───┬─── - │ ╰──────────── def: 11 + │ ╰──────────── name: 11 │ │ │ ╰───── ref: built-in 22 │ bytes32 v6 = keccak256(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 23 │ uint v7 = mulmod(1, 2, 3); │ ─┬ ───┬── - │ ╰─────────── def: 13 + │ ╰─────────── name: 13 │ │ │ ╰──── ref: built-in 24 │ bytes20 v8 = ripemd160(x1); │ ─┬ ────┬──── ─┬ - │ ╰───────────────── def: 14 + │ ╰───────────────── name: 14 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰── ref: 6 25 │ bytes32 v9 = sha256(x1); │ ─┬ ───┬── ─┬ - │ ╰────────────── def: 15 + │ ╰────────────── name: 15 │ │ │ │ ╰─────── ref: built-in │ │ @@ -91,20 +91,20 @@ References and definitions: │ 28 │ function testSelfDestruct() public { │ ────────┬─────── - │ ╰───────── def: 16 + │ ╰───────── name: 16 29 │ selfdestruct(address(0x0)); │ ──────┬───── │ ╰─────── ref: built-in │ 32 │ function testAbiFunctions() public { │ ────────┬─────── - │ ╰───────── def: 17 + │ ╰───────── name: 17 33 │ bytes memory x1; │ ─┬ - │ ╰── def: 18 + │ ╰── name: 18 34 │ uint v1 = abi.decode(x1, (uint)); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 19 + │ ╰────────────────── name: 19 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -113,7 +113,7 @@ References and definitions: │ ╰── ref: 18 35 │ bytes memory v2 = abi.encode(v1); │ ─┬ ─┬─ ───┬── ─┬ - │ ╰────────────────── def: 20 + │ ╰────────────────── name: 20 │ │ │ │ │ ╰───────────── ref: built-in │ │ │ @@ -122,7 +122,7 @@ References and definitions: │ ╰── ref: 19 36 │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); │ ─┬ ─┬─ ─────┬──── ────┬─── - │ ╰───────────────────────────────── def: 21 + │ ╰───────────────────────────────── name: 21 │ │ │ │ │ ╰──────────────────────────── ref: built-in │ │ │ @@ -131,14 +131,14 @@ References and definitions: │ ╰───── ref: 5 37 │ bytes memory v4 = abi.encodePacked(10, 20); │ ─┬ ─┬─ ──────┬───── - │ ╰───────────────────── def: 22 + │ ╰───────────────────── name: 22 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── ref: built-in 38 │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬──────── ────┬─── ────┬─── - │ ╰────────────────────────────────────────────────── def: 23 + │ ╰────────────────────────────────────────────────── name: 23 │ │ │ │ │ │ ╰───────────────────────────────────────────── ref: built-in │ │ │ │ @@ -149,10 +149,10 @@ References and definitions: │ ╰───── ref: built-in 39 │ string memory x2; │ ─┬ - │ ╰── def: 24 + │ ╰── name: 24 40 │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); │ ─┬ ─┬─ ─────────┬───────── ─┬ - │ ╰─────────────────────────────── def: 25 + │ ╰─────────────────────────────── name: 25 │ │ │ │ │ ╰────────────────────────── ref: built-in │ │ │ @@ -160,3 +160,96 @@ References and definitions: │ │ │ ╰── ref: 24 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ────────▶ contract BuiltInsTest { + 2 │ │ ╭─────────▶ function testRequire() public { + ┆ ┆ ┆ + 4 │ │ ├───│ ────▶ } + │ │ │ │ + │ │ ╰─────────────────── definiens: 2 + 5 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 3 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 4 + 13 │ │ ╭───────────▶ + ┆ ┆ ┆ + 15 │ │ │ │ bytes memory x1; + │ │ │ │ ────────────┬──────────── + │ │ │ │ ╰────────────── definiens: 6 + 16 │ │ │ ╭─▶ + 17 │ │ │ ├─▶ uint v1 = addmod(1, 2, 3); + │ │ │ │ + │ │ │ ╰──────────────────────────────────────── definiens: 7 + 18 │ │ │ bytes32 v2 = blockhash(1); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 8 + 19 │ │ │ bytes32 v3 = blobhash(2); + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 9 + 20 │ │ │ address v4 = ecrecover(v2, 1, v2, v2); + │ │ │ ───────────────────────┬─────────────────────── + │ │ │ ╰───────────────────────── definiens: 10 + 21 │ │ │ uint256 v5 = gasleft(); + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 11 + 22 │ │ │ bytes32 v6 = keccak256(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 12 + 23 │ │ │ uint v7 = mulmod(1, 2, 3); + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 24 │ │ │ bytes20 v8 = ripemd160(x1); + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 25 │ │ │ bytes32 v9 = sha256(x1); + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 15 + 26 │ │ ├───│ ──────▶ } + │ │ │ │ + │ │ ╰───────────────────── definiens: 5 + 27 │ │ ╭───────▶ + ┆ ┆ ┆ + 30 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 16 + 31 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 33 │ │ │ bytes memory x1; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 18 + 34 │ │ │ uint v1 = abi.decode(x1, (uint)); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 19 + 35 │ │ │ bytes memory v2 = abi.encode(v1); + │ │ │ ─────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 20 + 36 │ │ │ bytes memory v3 = abi.encodeCall(this.testMath, (1, 2, 3)); + │ │ │ ──────────────────────────────────┬───────────────────────────────── + │ │ │ ╰─────────────────────────────────── definiens: 21 + 37 │ │ │ bytes memory v4 = abi.encodePacked(10, 20); + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 38 │ │ │ bytes memory v5 = abi.encodeWithSelector(this.testMath.selector, (1, 2, 3)); + │ │ │ ──────────────────────────────────────────┬────────────────────────────────────────── + │ │ │ ╰──────────────────────────────────────────── definiens: 23 + 39 │ │ │ string memory x2; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 24 + 40 │ │ │ bytes memory v6 = abi.encodeWithSignature(x2, (1, 2, 3)); + │ │ │ ─────────────────────────────────┬──────────────────────────────── + │ │ │ ╰────────────────────────────────── definiens: 25 + 41 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 17 + 42 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.4.11-failure.txt index b459c097b9..313be3d1a3 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.4.11-failure.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function testTx() public { │ ───┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ address origin = tx.origin; │ ───┬── ─┬ ───┬── - │ ╰──────────────── def: 3 + │ ╰──────────────── name: 3 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰──── ref: built-in 4 │ uint price = tx.gasprice; │ ──┬── ─┬ ────┬─── - │ ╰────────────────── def: 4 + │ ╰────────────────── name: 4 │ │ │ │ ╰─────────── ref: built-in │ │ @@ -26,66 +26,66 @@ References and definitions: │ 7 │ function testBlock() public { │ ────┬──── - │ ╰────── def: 5 + │ ╰────── name: 5 8 │ uint v1 = block.basefee; │ ─┬ ──┬── ───┬─── - │ ╰────────────────── def: 6 + │ ╰────────────────── name: 6 │ │ │ │ ╰──────────── ref: built-in │ │ │ ╰───── unresolved 9 │ uint v2 = block.blobbasefee; │ ─┬ ──┬── ─────┬───── - │ ╰────────────────────── def: 7 + │ ╰────────────────────── name: 7 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── unresolved 10 │ uint v3 = block.chainid; │ ─┬ ──┬── ───┬─── - │ ╰────────────────── def: 8 + │ ╰────────────────── name: 8 │ │ │ │ ╰──────────── ref: built-in │ │ │ ╰───── unresolved 11 │ address v4 = block.coinbase; │ ─┬ ──┬── ────┬─── - │ ╰─────────────────── def: 9 + │ ╰─────────────────── name: 9 │ │ │ │ ╰───────────── ref: built-in │ │ │ ╰───── ref: built-in 12 │ uint v5 = block.difficulty; │ ─┬ ──┬── ─────┬──── - │ ╰───────────────────── def: 10 + │ ╰───────────────────── name: 10 │ │ │ │ ╰─────────────── ref: built-in │ │ │ ╰────── ref: built-in 13 │ uint v6 = block.gaslimit; │ ─┬ ──┬── ────┬─── - │ ╰─────────────────── def: 11 + │ ╰─────────────────── name: 11 │ │ │ │ ╰───────────── ref: built-in │ │ │ ╰───── ref: built-in 14 │ uint v7 = block.number; │ ─┬ ──┬── ───┬── - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰─────────── ref: built-in │ │ │ ╰──── ref: built-in 15 │ uint v8 = block.prevrandao; │ ─┬ ──┬── ─────┬──── - │ ╰───────────────────── def: 13 + │ ╰───────────────────── name: 13 │ │ │ │ ╰─────────────── ref: built-in │ │ │ ╰────── unresolved 16 │ uint v9 = block.timestamp; │ ─┬ ──┬── ────┬──── - │ ╰──────────────────── def: 14 + │ ╰──────────────────── name: 14 │ │ │ │ ╰────────────── ref: built-in │ │ @@ -93,33 +93,100 @@ References and definitions: │ 19 │ function testMsg() public { │ ───┬─── - │ ╰───── def: 15 + │ ╰───── name: 15 20 │ bytes v1 = msg.data; │ ─┬ ─┬─ ──┬─ - │ ╰───────────── def: 16 + │ ╰───────────── name: 16 │ │ │ │ ╰──────── ref: built-in │ │ │ ╰─── ref: built-in 21 │ address v2 = msg.sender; │ ─┬ ─┬─ ───┬── - │ ╰─────────────── def: 17 + │ ╰─────────────── name: 17 │ │ │ │ ╰────────── ref: built-in │ │ │ ╰──── ref: built-in 22 │ bytes4 v3 = msg.sig; │ ─┬ ─┬─ ─┬─ - │ ╰──────────── def: 18 + │ ╰──────────── name: 18 │ │ │ │ ╰─────── ref: built-in │ │ │ ╰─── ref: built-in 23 │ uint v4 = msg.value; │ ─┬ ─┬─ ──┬── - │ ╰────────────── def: 19 + │ ╰────────────── name: 19 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰──── ref: built-in ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ contract Test { + 2 │ │ ╭─▶ function testTx() public { + 3 │ │ │ address origin = tx.origin; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 3 + 4 │ │ │ uint price = tx.gasprice; + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ │ uint v1 = block.basefee; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 6 + 9 │ │ │ uint v2 = block.blobbasefee; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 7 + 10 │ │ │ uint v3 = block.chainid; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 8 + 11 │ │ │ address v4 = block.coinbase; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 9 + 12 │ │ │ uint v5 = block.difficulty; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 10 + 13 │ │ │ uint v6 = block.gaslimit; + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 11 + 14 │ │ │ uint v7 = block.number; + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 12 + 15 │ │ │ uint v8 = block.prevrandao; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 16 │ │ │ uint v9 = block.timestamp; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 17 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 5 + 18 │ │ ╭───▶ + ┆ ┆ ┆ + 20 │ │ │ bytes v1 = msg.data; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 16 + 21 │ │ │ address v2 = msg.sender; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 17 + 22 │ │ │ bytes4 v3 = msg.sig; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 18 + 23 │ │ │ uint v4 = msg.value; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 19 + 24 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 15 + 25 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.0-failure.txt index 38ae59d7e1..a0cdc5ea9f 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.0-failure.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function testTx() public { │ ───┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ address origin = tx.origin; │ ───┬── ─┬ ───┬── - │ ╰──────────────── def: 3 + │ ╰──────────────── name: 3 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰──── ref: built-in 4 │ uint price = tx.gasprice; │ ──┬── ─┬ ────┬─── - │ ╰────────────────── def: 4 + │ ╰────────────────── name: 4 │ │ │ │ ╰─────────── ref: built-in │ │ @@ -26,66 +26,66 @@ References and definitions: │ 7 │ function testBlock() public { │ ────┬──── - │ ╰────── def: 5 + │ ╰────── name: 5 8 │ uint v1 = block.basefee; │ ─┬ ──┬── ───┬─── - │ ╰────────────────── def: 6 + │ ╰────────────────── name: 6 │ │ │ │ ╰──────────── ref: built-in │ │ │ ╰───── unresolved 9 │ uint v2 = block.blobbasefee; │ ─┬ ──┬── ─────┬───── - │ ╰────────────────────── def: 7 + │ ╰────────────────────── name: 7 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── unresolved 10 │ uint v3 = block.chainid; │ ─┬ ──┬── ───┬─── - │ ╰────────────────── def: 8 + │ ╰────────────────── name: 8 │ │ │ │ ╰──────────── ref: built-in │ │ │ ╰───── ref: built-in 11 │ address v4 = block.coinbase; │ ─┬ ──┬── ────┬─── - │ ╰─────────────────── def: 9 + │ ╰─────────────────── name: 9 │ │ │ │ ╰───────────── ref: built-in │ │ │ ╰───── ref: built-in 12 │ uint v5 = block.difficulty; │ ─┬ ──┬── ─────┬──── - │ ╰───────────────────── def: 10 + │ ╰───────────────────── name: 10 │ │ │ │ ╰─────────────── ref: built-in │ │ │ ╰────── ref: built-in 13 │ uint v6 = block.gaslimit; │ ─┬ ──┬── ────┬─── - │ ╰─────────────────── def: 11 + │ ╰─────────────────── name: 11 │ │ │ │ ╰───────────── ref: built-in │ │ │ ╰───── ref: built-in 14 │ uint v7 = block.number; │ ─┬ ──┬── ───┬── - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰─────────── ref: built-in │ │ │ ╰──── ref: built-in 15 │ uint v8 = block.prevrandao; │ ─┬ ──┬── ─────┬──── - │ ╰───────────────────── def: 13 + │ ╰───────────────────── name: 13 │ │ │ │ ╰─────────────── ref: built-in │ │ │ ╰────── unresolved 16 │ uint v9 = block.timestamp; │ ─┬ ──┬── ────┬──── - │ ╰──────────────────── def: 14 + │ ╰──────────────────── name: 14 │ │ │ │ ╰────────────── ref: built-in │ │ @@ -93,33 +93,100 @@ References and definitions: │ 19 │ function testMsg() public { │ ───┬─── - │ ╰───── def: 15 + │ ╰───── name: 15 20 │ bytes v1 = msg.data; │ ─┬ ─┬─ ──┬─ - │ ╰───────────── def: 16 + │ ╰───────────── name: 16 │ │ │ │ ╰──────── ref: built-in │ │ │ ╰─── ref: built-in 21 │ address v2 = msg.sender; │ ─┬ ─┬─ ───┬── - │ ╰─────────────── def: 17 + │ ╰─────────────── name: 17 │ │ │ │ ╰────────── ref: built-in │ │ │ ╰──── ref: built-in 22 │ bytes4 v3 = msg.sig; │ ─┬ ─┬─ ─┬─ - │ ╰──────────── def: 18 + │ ╰──────────── name: 18 │ │ │ │ ╰─────── ref: built-in │ │ │ ╰─── ref: built-in 23 │ uint v4 = msg.value; │ ─┬ ─┬─ ──┬── - │ ╰────────────── def: 19 + │ ╰────────────── name: 19 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰──── ref: built-in ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ contract Test { + 2 │ │ ╭─▶ function testTx() public { + 3 │ │ │ address origin = tx.origin; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 3 + 4 │ │ │ uint price = tx.gasprice; + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ │ uint v1 = block.basefee; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 6 + 9 │ │ │ uint v2 = block.blobbasefee; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 7 + 10 │ │ │ uint v3 = block.chainid; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 8 + 11 │ │ │ address v4 = block.coinbase; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 9 + 12 │ │ │ uint v5 = block.difficulty; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 10 + 13 │ │ │ uint v6 = block.gaslimit; + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 11 + 14 │ │ │ uint v7 = block.number; + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 12 + 15 │ │ │ uint v8 = block.prevrandao; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 16 │ │ │ uint v9 = block.timestamp; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 17 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 5 + 18 │ │ ╭───▶ + ┆ ┆ ┆ + 20 │ │ │ bytes v1 = msg.data; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 16 + 21 │ │ │ address v2 = msg.sender; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 17 + 22 │ │ │ bytes4 v3 = msg.sig; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 18 + 23 │ │ │ uint v4 = msg.value; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 19 + 24 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 15 + 25 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.18-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.18-failure.txt index 680c677bd7..4a63decac3 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.18-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.18-failure.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function testTx() public { │ ───┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ address origin = tx.origin; │ ───┬── ─┬ ───┬── - │ ╰──────────────── def: 3 + │ ╰──────────────── name: 3 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰──── ref: built-in 4 │ uint price = tx.gasprice; │ ──┬── ─┬ ────┬─── - │ ╰────────────────── def: 4 + │ ╰────────────────── name: 4 │ │ │ │ ╰─────────── ref: built-in │ │ @@ -26,66 +26,66 @@ References and definitions: │ 7 │ function testBlock() public { │ ────┬──── - │ ╰────── def: 5 + │ ╰────── name: 5 8 │ uint v1 = block.basefee; │ ─┬ ──┬── ───┬─── - │ ╰────────────────── def: 6 + │ ╰────────────────── name: 6 │ │ │ │ ╰──────────── ref: built-in │ │ │ ╰───── ref: built-in 9 │ uint v2 = block.blobbasefee; │ ─┬ ──┬── ─────┬───── - │ ╰────────────────────── def: 7 + │ ╰────────────────────── name: 7 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── unresolved 10 │ uint v3 = block.chainid; │ ─┬ ──┬── ───┬─── - │ ╰────────────────── def: 8 + │ ╰────────────────── name: 8 │ │ │ │ ╰──────────── ref: built-in │ │ │ ╰───── ref: built-in 11 │ address v4 = block.coinbase; │ ─┬ ──┬── ────┬─── - │ ╰─────────────────── def: 9 + │ ╰─────────────────── name: 9 │ │ │ │ ╰───────────── ref: built-in │ │ │ ╰───── ref: built-in 12 │ uint v5 = block.difficulty; │ ─┬ ──┬── ─────┬──── - │ ╰───────────────────── def: 10 + │ ╰───────────────────── name: 10 │ │ │ │ ╰─────────────── ref: built-in │ │ │ ╰────── ref: built-in 13 │ uint v6 = block.gaslimit; │ ─┬ ──┬── ────┬─── - │ ╰─────────────────── def: 11 + │ ╰─────────────────── name: 11 │ │ │ │ ╰───────────── ref: built-in │ │ │ ╰───── ref: built-in 14 │ uint v7 = block.number; │ ─┬ ──┬── ───┬── - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰─────────── ref: built-in │ │ │ ╰──── ref: built-in 15 │ uint v8 = block.prevrandao; │ ─┬ ──┬── ─────┬──── - │ ╰───────────────────── def: 13 + │ ╰───────────────────── name: 13 │ │ │ │ ╰─────────────── ref: built-in │ │ │ ╰────── ref: built-in 16 │ uint v9 = block.timestamp; │ ─┬ ──┬── ────┬──── - │ ╰──────────────────── def: 14 + │ ╰──────────────────── name: 14 │ │ │ │ ╰────────────── ref: built-in │ │ @@ -93,33 +93,100 @@ References and definitions: │ 19 │ function testMsg() public { │ ───┬─── - │ ╰───── def: 15 + │ ╰───── name: 15 20 │ bytes v1 = msg.data; │ ─┬ ─┬─ ──┬─ - │ ╰───────────── def: 16 + │ ╰───────────── name: 16 │ │ │ │ ╰──────── ref: built-in │ │ │ ╰─── ref: built-in 21 │ address v2 = msg.sender; │ ─┬ ─┬─ ───┬── - │ ╰─────────────── def: 17 + │ ╰─────────────── name: 17 │ │ │ │ ╰────────── ref: built-in │ │ │ ╰──── ref: built-in 22 │ bytes4 v3 = msg.sig; │ ─┬ ─┬─ ─┬─ - │ ╰──────────── def: 18 + │ ╰──────────── name: 18 │ │ │ │ ╰─────── ref: built-in │ │ │ ╰─── ref: built-in 23 │ uint v4 = msg.value; │ ─┬ ─┬─ ──┬── - │ ╰────────────── def: 19 + │ ╰────────────── name: 19 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰──── ref: built-in ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ contract Test { + 2 │ │ ╭─▶ function testTx() public { + 3 │ │ │ address origin = tx.origin; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 3 + 4 │ │ │ uint price = tx.gasprice; + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ │ uint v1 = block.basefee; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 6 + 9 │ │ │ uint v2 = block.blobbasefee; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 7 + 10 │ │ │ uint v3 = block.chainid; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 8 + 11 │ │ │ address v4 = block.coinbase; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 9 + 12 │ │ │ uint v5 = block.difficulty; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 10 + 13 │ │ │ uint v6 = block.gaslimit; + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 11 + 14 │ │ │ uint v7 = block.number; + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 12 + 15 │ │ │ uint v8 = block.prevrandao; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 16 │ │ │ uint v9 = block.timestamp; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 17 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 5 + 18 │ │ ╭───▶ + ┆ ┆ ┆ + 20 │ │ │ bytes v1 = msg.data; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 16 + 21 │ │ │ address v2 = msg.sender; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 17 + 22 │ │ │ bytes4 v3 = msg.sig; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 18 + 23 │ │ │ uint v4 = msg.value; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 19 + 24 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 15 + 25 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.24-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.24-success.txt index 5091da0319..80d28b67ba 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.24-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.24-success.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function testTx() public { │ ───┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ address origin = tx.origin; │ ───┬── ─┬ ───┬── - │ ╰──────────────── def: 3 + │ ╰──────────────── name: 3 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰──── ref: built-in 4 │ uint price = tx.gasprice; │ ──┬── ─┬ ────┬─── - │ ╰────────────────── def: 4 + │ ╰────────────────── name: 4 │ │ │ │ ╰─────────── ref: built-in │ │ @@ -26,66 +26,66 @@ References and definitions: │ 7 │ function testBlock() public { │ ────┬──── - │ ╰────── def: 5 + │ ╰────── name: 5 8 │ uint v1 = block.basefee; │ ─┬ ──┬── ───┬─── - │ ╰────────────────── def: 6 + │ ╰────────────────── name: 6 │ │ │ │ ╰──────────── ref: built-in │ │ │ ╰───── ref: built-in 9 │ uint v2 = block.blobbasefee; │ ─┬ ──┬── ─────┬───── - │ ╰────────────────────── def: 7 + │ ╰────────────────────── name: 7 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── ref: built-in 10 │ uint v3 = block.chainid; │ ─┬ ──┬── ───┬─── - │ ╰────────────────── def: 8 + │ ╰────────────────── name: 8 │ │ │ │ ╰──────────── ref: built-in │ │ │ ╰───── ref: built-in 11 │ address v4 = block.coinbase; │ ─┬ ──┬── ────┬─── - │ ╰─────────────────── def: 9 + │ ╰─────────────────── name: 9 │ │ │ │ ╰───────────── ref: built-in │ │ │ ╰───── ref: built-in 12 │ uint v5 = block.difficulty; │ ─┬ ──┬── ─────┬──── - │ ╰───────────────────── def: 10 + │ ╰───────────────────── name: 10 │ │ │ │ ╰─────────────── ref: built-in │ │ │ ╰────── ref: built-in 13 │ uint v6 = block.gaslimit; │ ─┬ ──┬── ────┬─── - │ ╰─────────────────── def: 11 + │ ╰─────────────────── name: 11 │ │ │ │ ╰───────────── ref: built-in │ │ │ ╰───── ref: built-in 14 │ uint v7 = block.number; │ ─┬ ──┬── ───┬── - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰─────────── ref: built-in │ │ │ ╰──── ref: built-in 15 │ uint v8 = block.prevrandao; │ ─┬ ──┬── ─────┬──── - │ ╰───────────────────── def: 13 + │ ╰───────────────────── name: 13 │ │ │ │ ╰─────────────── ref: built-in │ │ │ ╰────── ref: built-in 16 │ uint v9 = block.timestamp; │ ─┬ ──┬── ────┬──── - │ ╰──────────────────── def: 14 + │ ╰──────────────────── name: 14 │ │ │ │ ╰────────────── ref: built-in │ │ @@ -93,33 +93,100 @@ References and definitions: │ 19 │ function testMsg() public { │ ───┬─── - │ ╰───── def: 15 + │ ╰───── name: 15 20 │ bytes v1 = msg.data; │ ─┬ ─┬─ ──┬─ - │ ╰───────────── def: 16 + │ ╰───────────── name: 16 │ │ │ │ ╰──────── ref: built-in │ │ │ ╰─── ref: built-in 21 │ address v2 = msg.sender; │ ─┬ ─┬─ ───┬── - │ ╰─────────────── def: 17 + │ ╰─────────────── name: 17 │ │ │ │ ╰────────── ref: built-in │ │ │ ╰──── ref: built-in 22 │ bytes4 v3 = msg.sig; │ ─┬ ─┬─ ─┬─ - │ ╰──────────── def: 18 + │ ╰──────────── name: 18 │ │ │ │ ╰─────── ref: built-in │ │ │ ╰─── ref: built-in 23 │ uint v4 = msg.value; │ ─┬ ─┬─ ──┬── - │ ╰────────────── def: 19 + │ ╰────────────── name: 19 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰──── ref: built-in ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ contract Test { + 2 │ │ ╭─▶ function testTx() public { + 3 │ │ │ address origin = tx.origin; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 3 + 4 │ │ │ uint price = tx.gasprice; + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ │ uint v1 = block.basefee; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 6 + 9 │ │ │ uint v2 = block.blobbasefee; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 7 + 10 │ │ │ uint v3 = block.chainid; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 8 + 11 │ │ │ address v4 = block.coinbase; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 9 + 12 │ │ │ uint v5 = block.difficulty; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 10 + 13 │ │ │ uint v6 = block.gaslimit; + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 11 + 14 │ │ │ uint v7 = block.number; + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 12 + 15 │ │ │ uint v8 = block.prevrandao; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 16 │ │ │ uint v9 = block.timestamp; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 17 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 5 + 18 │ │ ╭───▶ + ┆ ┆ ┆ + 20 │ │ │ bytes v1 = msg.data; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 16 + 21 │ │ │ address v2 = msg.sender; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 17 + 22 │ │ │ bytes4 v3 = msg.sig; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 18 + 23 │ │ │ uint v4 = msg.value; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 19 + 24 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 15 + 25 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.7-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.7-failure.txt index 5aef6a7846..e324462486 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.7-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/global_properties/generated/0.8.7-failure.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function testTx() public { │ ───┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ address origin = tx.origin; │ ───┬── ─┬ ───┬── - │ ╰──────────────── def: 3 + │ ╰──────────────── name: 3 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰──── ref: built-in 4 │ uint price = tx.gasprice; │ ──┬── ─┬ ────┬─── - │ ╰────────────────── def: 4 + │ ╰────────────────── name: 4 │ │ │ │ ╰─────────── ref: built-in │ │ @@ -26,66 +26,66 @@ References and definitions: │ 7 │ function testBlock() public { │ ────┬──── - │ ╰────── def: 5 + │ ╰────── name: 5 8 │ uint v1 = block.basefee; │ ─┬ ──┬── ───┬─── - │ ╰────────────────── def: 6 + │ ╰────────────────── name: 6 │ │ │ │ ╰──────────── ref: built-in │ │ │ ╰───── ref: built-in 9 │ uint v2 = block.blobbasefee; │ ─┬ ──┬── ─────┬───── - │ ╰────────────────────── def: 7 + │ ╰────────────────────── name: 7 │ │ │ │ ╰──────────────── ref: built-in │ │ │ ╰─────── unresolved 10 │ uint v3 = block.chainid; │ ─┬ ──┬── ───┬─── - │ ╰────────────────── def: 8 + │ ╰────────────────── name: 8 │ │ │ │ ╰──────────── ref: built-in │ │ │ ╰───── ref: built-in 11 │ address v4 = block.coinbase; │ ─┬ ──┬── ────┬─── - │ ╰─────────────────── def: 9 + │ ╰─────────────────── name: 9 │ │ │ │ ╰───────────── ref: built-in │ │ │ ╰───── ref: built-in 12 │ uint v5 = block.difficulty; │ ─┬ ──┬── ─────┬──── - │ ╰───────────────────── def: 10 + │ ╰───────────────────── name: 10 │ │ │ │ ╰─────────────── ref: built-in │ │ │ ╰────── ref: built-in 13 │ uint v6 = block.gaslimit; │ ─┬ ──┬── ────┬─── - │ ╰─────────────────── def: 11 + │ ╰─────────────────── name: 11 │ │ │ │ ╰───────────── ref: built-in │ │ │ ╰───── ref: built-in 14 │ uint v7 = block.number; │ ─┬ ──┬── ───┬── - │ ╰───────────────── def: 12 + │ ╰───────────────── name: 12 │ │ │ │ ╰─────────── ref: built-in │ │ │ ╰──── ref: built-in 15 │ uint v8 = block.prevrandao; │ ─┬ ──┬── ─────┬──── - │ ╰───────────────────── def: 13 + │ ╰───────────────────── name: 13 │ │ │ │ ╰─────────────── ref: built-in │ │ │ ╰────── unresolved 16 │ uint v9 = block.timestamp; │ ─┬ ──┬── ────┬──── - │ ╰──────────────────── def: 14 + │ ╰──────────────────── name: 14 │ │ │ │ ╰────────────── ref: built-in │ │ @@ -93,33 +93,100 @@ References and definitions: │ 19 │ function testMsg() public { │ ───┬─── - │ ╰───── def: 15 + │ ╰───── name: 15 20 │ bytes v1 = msg.data; │ ─┬ ─┬─ ──┬─ - │ ╰───────────── def: 16 + │ ╰───────────── name: 16 │ │ │ │ ╰──────── ref: built-in │ │ │ ╰─── ref: built-in 21 │ address v2 = msg.sender; │ ─┬ ─┬─ ───┬── - │ ╰─────────────── def: 17 + │ ╰─────────────── name: 17 │ │ │ │ ╰────────── ref: built-in │ │ │ ╰──── ref: built-in 22 │ bytes4 v3 = msg.sig; │ ─┬ ─┬─ ─┬─ - │ ╰──────────── def: 18 + │ ╰──────────── name: 18 │ │ │ │ ╰─────── ref: built-in │ │ │ ╰─── ref: built-in 23 │ uint v4 = msg.value; │ ─┬ ─┬─ ──┬── - │ ╰────────────── def: 19 + │ ╰────────────── name: 19 │ │ │ │ ╰───────── ref: built-in │ │ │ ╰──── ref: built-in ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ contract Test { + 2 │ │ ╭─▶ function testTx() public { + 3 │ │ │ address origin = tx.origin; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 3 + 4 │ │ │ uint price = tx.gasprice; + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ │ uint v1 = block.basefee; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 6 + 9 │ │ │ uint v2 = block.blobbasefee; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 7 + 10 │ │ │ uint v3 = block.chainid; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 8 + 11 │ │ │ address v4 = block.coinbase; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 9 + 12 │ │ │ uint v5 = block.difficulty; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 10 + 13 │ │ │ uint v6 = block.gaslimit; + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 11 + 14 │ │ │ uint v7 = block.number; + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 12 + 15 │ │ │ uint v8 = block.prevrandao; + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 16 │ │ │ uint v9 = block.timestamp; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 14 + 17 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 5 + 18 │ │ ╭───▶ + ┆ ┆ ┆ + 20 │ │ │ bytes v1 = msg.data; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 16 + 21 │ │ │ address v2 = msg.sender; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 17 + 22 │ │ │ bytes4 v3 = msg.sig; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 18 + 23 │ │ │ uint v4 = msg.value; + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 19 + 24 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 15 + 25 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.4.11-failure.txt index abe2059ade..edad33637e 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.4.11-failure.txt @@ -13,17 +13,17 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ int tx; │ ─┬ - │ ╰── def: 2 + │ ╰── name: 2 │ 4 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ int block; │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 6 │ block; │ ──┬── │ ╰──── ref: 4 @@ -36,5 +36,29 @@ References and definitions: │ 11 │ function sha256() public {} │ ───┬── - │ ╰──── def: 5 + │ ╰──── name: 5 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract Test { + 2 │ │ │ int tx; + │ │ │ ──────┬───── + │ │ │ ╰─────── definiens: 2 + 3 │ │ ╭───▶ + ┆ ┆ ┆ + 5 │ │ │ int block; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 4 + ┆ ┆ ┆ + 9 │ │ ├─│ ▶ } + │ │ │ │ + │ │ ╰───────────── definiens: 3 + 10 │ │ ╭─▶ + 11 │ │ ├─▶ function sha256() public {} + │ │ │ + │ │ ╰───────────────────────────────────── definiens: 5 + 12 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.6.0-failure.txt index bc8b1ad05d..a6f63e31a7 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.6.0-failure.txt @@ -13,17 +13,17 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ int tx; │ ─┬ - │ ╰── def: 2 + │ ╰── name: 2 │ 4 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ int block; │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 6 │ block; │ ──┬── │ ╰──── ref: 4 @@ -36,5 +36,29 @@ References and definitions: │ 11 │ function sha256() public {} │ ───┬── - │ ╰──── def: 5 + │ ╰──── name: 5 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract Test { + 2 │ │ │ int tx; + │ │ │ ──────┬───── + │ │ │ ╰─────── definiens: 2 + 3 │ │ ╭───▶ + ┆ ┆ ┆ + 5 │ │ │ int block; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 4 + ┆ ┆ ┆ + 9 │ │ ├─│ ▶ } + │ │ │ │ + │ │ ╰───────────── definiens: 3 + 10 │ │ ╭─▶ + 11 │ │ ├─▶ function sha256() public {} + │ │ │ + │ │ ╰───────────────────────────────────── definiens: 5 + 12 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.7.1-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.7.1-success.txt index 2328f83440..3f5d6850a5 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.7.1-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/shadowing/generated/0.7.1-success.txt @@ -5,17 +5,17 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ int tx; │ ─┬ - │ ╰── def: 2 + │ ╰── name: 2 │ 4 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ int block; │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 6 │ block; │ ──┬── │ ╰──── ref: 4 @@ -28,9 +28,37 @@ References and definitions: │ 11 │ function sha256() public {} │ ───┬── - │ ╰──── def: 5 + │ ╰──── name: 5 │ 14 │ function sha256() {} │ ───┬── - │ ╰──── def: 6 + │ ╰──── name: 6 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───────▶ contract Test { + 2 │ │ │ int tx; + │ │ │ ──────┬───── + │ │ │ ╰─────── definiens: 2 + 3 │ │ ╭─────▶ + ┆ ┆ ┆ + 5 │ │ │ int block; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 4 + ┆ ┆ ┆ + 9 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 3 + 10 │ │ ╭───▶ + 11 │ │ ├───▶ function sha256() public {} + │ │ │ + │ │ ╰─────────────────────────────────────── definiens: 5 + 12 │ ├─────│ ▶ } + │ │ │ + │ ╰───────────── definiens: 1 + 13 │ ╭─▶ + 14 │ ├─▶ function sha256() {} + │ │ + │ ╰────────────────────────── definiens: 6 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/this/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/this/generated/0.4.11-success.txt index c86bc2430b..bb805e168b 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/this/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/this/generated/0.4.11-success.txt @@ -5,11 +5,24 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() internal returns (uint) { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ return address(this).balance; │ ───┬─── │ ╰───── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ library Lib { + 2 │ │ ╭─▶ function test() internal returns (uint) { + ┆ ┆ ┆ + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 5 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/this_as_address/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/this_as_address/generated/0.4.11-success.txt index e5572f9274..fcb1881ed8 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/this_as_address/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/this_as_address/generated/0.4.11-success.txt @@ -5,12 +5,25 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ this.balance; │ ───┬─── │ ╰───── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 5 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 6 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/this_as_address/generated/0.5.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/this_as_address/generated/0.5.0-failure.txt index 8d1ee729e4..50d9ccc6ba 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/this_as_address/generated/0.5.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/this_as_address/generated/0.5.0-failure.txt @@ -5,12 +5,25 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ this.balance; │ ───┬─── │ ╰───── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 5 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 6 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.4.11-failure.txt index 27e66e5e3a..6e729b31ea 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.4.11-failure.txt @@ -90,76 +90,152 @@ References and definitions: │ 1 │ contract Sample {} │ ───┬── - │ ╰──── def: 1 + │ ╰──── name: 1 │ 3 │ interface ISample {} │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 │ 5 │ library Utils {} │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 7 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 8 │ enum Direction { North, South, West, East } │ ────┬──── ──┬── ──┬── ──┬─ ──┬─ - │ ╰───────────────────────────────── def: 5 + │ ╰───────────────────────────────── name: 5 │ │ │ │ │ - │ ╰─────────────────────── def: 6 + │ ╰─────────────────────── name: 6 │ │ │ │ - │ ╰──────────────── def: 7 + │ ╰──────────────── name: 7 │ │ │ - │ ╰───────── def: 8 + │ ╰───────── name: 8 │ │ - │ ╰─── def: 9 + │ ╰─── name: 9 │ 10 │ function test() public { │ ──┬─ - │ ╰─── def: 10 + │ ╰─── name: 10 11 │ string memory v1 = type(Sample).name; │ ─┬ - │ ╰── def: 11 + │ ╰── name: 11 12 │ bytes memory v2 = type(Sample).creationCode; │ ─┬ - │ ╰── def: 12 + │ ╰── name: 12 13 │ bytes memory v3 = type(Sample).runtimeCode; │ ─┬ - │ ╰── def: 13 + │ ╰── name: 13 │ 15 │ string memory v4 = type(ISample).name; │ ─┬ - │ ╰── def: 14 + │ ╰── name: 14 16 │ bytes4 v5 = type(ISample).interfaceId; │ ─┬ - │ ╰── def: 15 + │ ╰── name: 15 │ 18 │ Direction v6 = type(Direction).min; │ ────┬──── ─┬ │ ╰───────── ref: 5 │ │ - │ ╰── def: 16 + │ ╰── name: 16 19 │ Direction v7 = type(Direction).max; │ ────┬──── ─┬ │ ╰───────── ref: 5 │ │ - │ ╰── def: 17 + │ ╰── name: 17 │ 21 │ uint v8 = type(uint).min; │ ─┬ - │ ╰── def: 18 + │ ╰── name: 18 22 │ uint v9 = type(uint).max; │ ─┬ - │ ╰── def: 19 + │ ╰── name: 19 │ 24 │ string memory v10 = type(Utils).name; │ ─┬─ - │ ╰─── def: 20 + │ ╰─── name: 20 25 │ bytes memory v11 = type(Utils).creationCode; │ ─┬─ - │ ╰─── def: 21 + │ ╰─── name: 21 26 │ bytes memory v12 = type(Utils).runtimeCode; │ ─┬─ - │ ╰─── def: 22 + │ ╰─── name: 22 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ contract Sample {} + │ │ ─────────┬───────── + │ │ ╰─────────── definiens: 1 + 2 │ ╭───▶ + 3 │ ├─│ ▶ interface ISample {} + │ │ │ + │ ╰──────────────────────────── definiens: 2 + 4 │ ╭─▶ + 5 │ │ ├─▶ library Utils {} + │ │ │ + │ │ ╰────────────────────── definiens: 3 + 6 │ ╭───────────────▶ + ┆ ┆ + 8 │ │ │ enum Direction { North, South, West, East } + │ │ │ ───────────────────────┬┬─────┬──────┬─────┬──── + │ │ │ ╰────────────────────────── definiens: 6 + │ │ │ │ │ │ │ + │ │ │ ╰───────────────────────── definiens: 5 + │ │ │ │ │ │ + │ │ │ ╰─────────────────── definiens: 7 + │ │ │ │ │ + │ │ │ ╰──────────── definiens: 8 + │ │ │ │ + │ │ │ ╰────── definiens: 9 + 9 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 11 │ │ │ string memory v1 = type(Sample).name; + │ │ │ ───────────────────────┬────────────────────── + │ │ │ ╰──────────────────────── definiens: 11 + 12 │ │ │ bytes memory v2 = type(Sample).creationCode; + │ │ │ ──────────────────────────┬────────────────────────── + │ │ │ ╰──────────────────────────── definiens: 12 + 13 │ │ │ │ bytes memory v3 = type(Sample).runtimeCode; + │ │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ │ ╰─────────────────────────── definiens: 13 + 14 │ │ │ ╭───────────▶ + 15 │ │ │ ├───────────▶ string memory v4 = type(ISample).name; + │ │ │ │ + │ │ │ ╰────────────────────────────────────────────────────────────── definiens: 14 + 16 │ │ │ │ bytes4 v5 = type(ISample).interfaceId; + │ │ │ │ ───────────────────────┬─────────────────────── + │ │ │ │ ╰───────────────────────── definiens: 15 + 17 │ │ │ ╭───────▶ + 18 │ │ │ ├───────▶ Direction v6 = type(Direction).min; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────────────────── definiens: 16 + 19 │ │ │ │ Direction v7 = type(Direction).max; + │ │ │ │ ──────────────────────┬───────────────────── + │ │ │ │ ╰─────────────────────── definiens: 17 + 20 │ │ │ ╭─────▶ + 21 │ │ │ ├─────▶ uint v8 = type(uint).min; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────── definiens: 18 + 22 │ │ │ │ uint v9 = type(uint).max; + │ │ │ │ ─────────────────┬──────────────── + │ │ │ │ ╰────────────────── definiens: 19 + 23 │ │ │ ╭─────────▶ + 24 │ │ │ ├─────────▶ string memory v10 = type(Utils).name; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────────────────────── definiens: 20 + 25 │ │ │ bytes memory v11 = type(Utils).creationCode; + │ │ │ ──────────────────────────┬────────────────────────── + │ │ │ ╰──────────────────────────── definiens: 21 + 26 │ │ │ bytes memory v12 = type(Utils).runtimeCode; + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 27 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 10 + 28 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 4 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.5.3-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.5.3-failure.txt index 7e8ca126cf..432004067b 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.5.3-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.5.3-failure.txt @@ -5,51 +5,51 @@ References and definitions: │ 1 │ contract Sample {} │ ───┬── - │ ╰──── def: 1 + │ ╰──── name: 1 │ 3 │ interface ISample {} │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 │ 5 │ library Utils {} │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 7 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 8 │ enum Direction { North, South, West, East } │ ────┬──── ──┬── ──┬── ──┬─ ──┬─ - │ ╰───────────────────────────────── def: 5 + │ ╰───────────────────────────────── name: 5 │ │ │ │ │ - │ ╰─────────────────────── def: 6 + │ ╰─────────────────────── name: 6 │ │ │ │ - │ ╰──────────────── def: 7 + │ ╰──────────────── name: 7 │ │ │ - │ ╰───────── def: 8 + │ ╰───────── name: 8 │ │ - │ ╰─── def: 9 + │ ╰─── name: 9 │ 10 │ function test() public { │ ──┬─ - │ ╰─── def: 10 + │ ╰─── name: 10 11 │ string memory v1 = type(Sample).name; │ ─┬ ───┬── ──┬─ - │ ╰────────────────────── def: 11 + │ ╰────────────────────── name: 11 │ │ │ │ ╰────────── ref: 1 │ │ │ ╰─── ref: built-in 12 │ bytes memory v2 = type(Sample).creationCode; │ ─┬ ───┬── ──────┬───── - │ ╰────────────────────────────── def: 12 + │ ╰────────────────────────────── name: 12 │ │ │ │ ╰────────────────── ref: 1 │ │ │ ╰─────── ref: built-in 13 │ bytes memory v3 = type(Sample).runtimeCode; │ ─┬ ───┬── ─────┬───── - │ ╰───────────────────────────── def: 13 + │ ╰───────────────────────────── name: 13 │ │ │ │ ╰───────────────── ref: 1 │ │ @@ -57,14 +57,14 @@ References and definitions: │ 15 │ string memory v4 = type(ISample).name; │ ─┬ ───┬─── ──┬─ - │ ╰─────────────────────── def: 14 + │ ╰─────────────────────── name: 14 │ │ │ │ ╰─────────── ref: 2 │ │ │ ╰─── ref: built-in 16 │ bytes4 v5 = type(ISample).interfaceId; │ ─┬ ───┬─── ─────┬───── - │ ╰────────────────────────────── def: 15 + │ ╰────────────────────────────── name: 15 │ │ │ │ ╰────────────────── ref: 2 │ │ @@ -74,7 +74,7 @@ References and definitions: │ ────┬──── ─┬ ────┬──── ─┬─ │ ╰─────────────────────────────── ref: 5 │ │ │ │ - │ ╰──────────────────────── def: 16 + │ ╰──────────────────────── name: 16 │ │ │ │ ╰─────────── ref: 5 │ │ @@ -83,7 +83,7 @@ References and definitions: │ ────┬──── ─┬ ────┬──── ─┬─ │ ╰─────────────────────────────── ref: 5 │ │ │ │ - │ ╰──────────────────────── def: 17 + │ ╰──────────────────────── name: 17 │ │ │ │ ╰─────────── ref: 5 │ │ @@ -91,34 +91,110 @@ References and definitions: │ 21 │ uint v8 = type(uint).min; │ ─┬ ─┬─ - │ ╰─────────────────── def: 18 + │ ╰─────────────────── name: 18 │ │ │ ╰─── unresolved 22 │ uint v9 = type(uint).max; │ ─┬ ─┬─ - │ ╰─────────────────── def: 19 + │ ╰─────────────────── name: 19 │ │ │ ╰─── unresolved │ 24 │ string memory v10 = type(Utils).name; │ ─┬─ ──┬── ──┬─ - │ ╰────────────────────── def: 20 + │ ╰────────────────────── name: 20 │ │ │ │ ╰────────── ref: 3 │ │ │ ╰─── ref: built-in 25 │ bytes memory v11 = type(Utils).creationCode; │ ─┬─ ──┬── ──────┬───── - │ ╰────────────────────────────── def: 21 + │ ╰────────────────────────────── name: 21 │ │ │ │ ╰────────────────── ref: 3 │ │ │ ╰─────── ref: built-in 26 │ bytes memory v12 = type(Utils).runtimeCode; │ ─┬─ ──┬── ─────┬───── - │ ╰───────────────────────────── def: 22 + │ ╰───────────────────────────── name: 22 │ │ │ │ ╰───────────────── ref: 3 │ │ │ ╰─────── ref: built-in ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ contract Sample {} + │ │ ─────────┬───────── + │ │ ╰─────────── definiens: 1 + 2 │ ╭───▶ + 3 │ ├─│ ▶ interface ISample {} + │ │ │ + │ ╰──────────────────────────── definiens: 2 + 4 │ ╭─▶ + 5 │ │ ├─▶ library Utils {} + │ │ │ + │ │ ╰────────────────────── definiens: 3 + 6 │ ╭───────────────▶ + ┆ ┆ + 8 │ │ │ enum Direction { North, South, West, East } + │ │ │ ───────────────────────┬┬─────┬──────┬─────┬──── + │ │ │ ╰────────────────────────── definiens: 6 + │ │ │ │ │ │ │ + │ │ │ ╰───────────────────────── definiens: 5 + │ │ │ │ │ │ + │ │ │ ╰─────────────────── definiens: 7 + │ │ │ │ │ + │ │ │ ╰──────────── definiens: 8 + │ │ │ │ + │ │ │ ╰────── definiens: 9 + 9 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 11 │ │ │ string memory v1 = type(Sample).name; + │ │ │ ───────────────────────┬────────────────────── + │ │ │ ╰──────────────────────── definiens: 11 + 12 │ │ │ bytes memory v2 = type(Sample).creationCode; + │ │ │ ──────────────────────────┬────────────────────────── + │ │ │ ╰──────────────────────────── definiens: 12 + 13 │ │ │ │ bytes memory v3 = type(Sample).runtimeCode; + │ │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ │ ╰─────────────────────────── definiens: 13 + 14 │ │ │ ╭───────────▶ + 15 │ │ │ ├───────────▶ string memory v4 = type(ISample).name; + │ │ │ │ + │ │ │ ╰────────────────────────────────────────────────────────────── definiens: 14 + 16 │ │ │ │ bytes4 v5 = type(ISample).interfaceId; + │ │ │ │ ───────────────────────┬─────────────────────── + │ │ │ │ ╰───────────────────────── definiens: 15 + 17 │ │ │ ╭───────▶ + 18 │ │ │ ├───────▶ Direction v6 = type(Direction).min; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────────────────── definiens: 16 + 19 │ │ │ │ Direction v7 = type(Direction).max; + │ │ │ │ ──────────────────────┬───────────────────── + │ │ │ │ ╰─────────────────────── definiens: 17 + 20 │ │ │ ╭─────▶ + 21 │ │ │ ├─────▶ uint v8 = type(uint).min; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────── definiens: 18 + 22 │ │ │ │ uint v9 = type(uint).max; + │ │ │ │ ─────────────────┬──────────────── + │ │ │ │ ╰────────────────── definiens: 19 + 23 │ │ │ ╭─────────▶ + 24 │ │ │ ├─────────▶ string memory v10 = type(Utils).name; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────────────────────── definiens: 20 + 25 │ │ │ bytes memory v11 = type(Utils).creationCode; + │ │ │ ──────────────────────────┬────────────────────────── + │ │ │ ╰──────────────────────────── definiens: 21 + 26 │ │ │ bytes memory v12 = type(Utils).runtimeCode; + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 27 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 10 + 28 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 4 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.6.7-failure.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.6.7-failure.txt index 06c710d1b5..8250b161ad 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.6.7-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.6.7-failure.txt @@ -5,51 +5,51 @@ References and definitions: │ 1 │ contract Sample {} │ ───┬── - │ ╰──── def: 1 + │ ╰──── name: 1 │ 3 │ interface ISample {} │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 │ 5 │ library Utils {} │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 7 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 8 │ enum Direction { North, South, West, East } │ ────┬──── ──┬── ──┬── ──┬─ ──┬─ - │ ╰───────────────────────────────── def: 5 + │ ╰───────────────────────────────── name: 5 │ │ │ │ │ - │ ╰─────────────────────── def: 6 + │ ╰─────────────────────── name: 6 │ │ │ │ - │ ╰──────────────── def: 7 + │ ╰──────────────── name: 7 │ │ │ - │ ╰───────── def: 8 + │ ╰───────── name: 8 │ │ - │ ╰─── def: 9 + │ ╰─── name: 9 │ 10 │ function test() public { │ ──┬─ - │ ╰─── def: 10 + │ ╰─── name: 10 11 │ string memory v1 = type(Sample).name; │ ─┬ ───┬── ──┬─ - │ ╰────────────────────── def: 11 + │ ╰────────────────────── name: 11 │ │ │ │ ╰────────── ref: 1 │ │ │ ╰─── ref: built-in 12 │ bytes memory v2 = type(Sample).creationCode; │ ─┬ ───┬── ──────┬───── - │ ╰────────────────────────────── def: 12 + │ ╰────────────────────────────── name: 12 │ │ │ │ ╰────────────────── ref: 1 │ │ │ ╰─────── ref: built-in 13 │ bytes memory v3 = type(Sample).runtimeCode; │ ─┬ ───┬── ─────┬───── - │ ╰───────────────────────────── def: 13 + │ ╰───────────────────────────── name: 13 │ │ │ │ ╰───────────────── ref: 1 │ │ @@ -57,14 +57,14 @@ References and definitions: │ 15 │ string memory v4 = type(ISample).name; │ ─┬ ───┬─── ──┬─ - │ ╰─────────────────────── def: 14 + │ ╰─────────────────────── name: 14 │ │ │ │ ╰─────────── ref: 2 │ │ │ ╰─── ref: built-in 16 │ bytes4 v5 = type(ISample).interfaceId; │ ─┬ ───┬─── ─────┬───── - │ ╰────────────────────────────── def: 15 + │ ╰────────────────────────────── name: 15 │ │ │ │ ╰────────────────── ref: 2 │ │ @@ -74,7 +74,7 @@ References and definitions: │ ────┬──── ─┬ ────┬──── ─┬─ │ ╰─────────────────────────────── ref: 5 │ │ │ │ - │ ╰──────────────────────── def: 16 + │ ╰──────────────────────── name: 16 │ │ │ │ ╰─────────── ref: 5 │ │ @@ -83,7 +83,7 @@ References and definitions: │ ────┬──── ─┬ ────┬──── ─┬─ │ ╰─────────────────────────────── ref: 5 │ │ │ │ - │ ╰──────────────────────── def: 17 + │ ╰──────────────────────── name: 17 │ │ │ │ ╰─────────── ref: 5 │ │ @@ -91,34 +91,110 @@ References and definitions: │ 21 │ uint v8 = type(uint).min; │ ─┬ ─┬─ - │ ╰─────────────────── def: 18 + │ ╰─────────────────── name: 18 │ │ │ ╰─── unresolved 22 │ uint v9 = type(uint).max; │ ─┬ ─┬─ - │ ╰─────────────────── def: 19 + │ ╰─────────────────── name: 19 │ │ │ ╰─── unresolved │ 24 │ string memory v10 = type(Utils).name; │ ─┬─ ──┬── ──┬─ - │ ╰────────────────────── def: 20 + │ ╰────────────────────── name: 20 │ │ │ │ ╰────────── ref: 3 │ │ │ ╰─── ref: built-in 25 │ bytes memory v11 = type(Utils).creationCode; │ ─┬─ ──┬── ──────┬───── - │ ╰────────────────────────────── def: 21 + │ ╰────────────────────────────── name: 21 │ │ │ │ ╰────────────────── ref: 3 │ │ │ ╰─────── ref: built-in 26 │ bytes memory v12 = type(Utils).runtimeCode; │ ─┬─ ──┬── ─────┬───── - │ ╰───────────────────────────── def: 22 + │ ╰───────────────────────────── name: 22 │ │ │ │ ╰───────────────── ref: 3 │ │ │ ╰─────── ref: built-in ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ contract Sample {} + │ │ ─────────┬───────── + │ │ ╰─────────── definiens: 1 + 2 │ ╭───▶ + 3 │ ├─│ ▶ interface ISample {} + │ │ │ + │ ╰──────────────────────────── definiens: 2 + 4 │ ╭─▶ + 5 │ │ ├─▶ library Utils {} + │ │ │ + │ │ ╰────────────────────── definiens: 3 + 6 │ ╭───────────────▶ + ┆ ┆ + 8 │ │ │ enum Direction { North, South, West, East } + │ │ │ ───────────────────────┬┬─────┬──────┬─────┬──── + │ │ │ ╰────────────────────────── definiens: 6 + │ │ │ │ │ │ │ + │ │ │ ╰───────────────────────── definiens: 5 + │ │ │ │ │ │ + │ │ │ ╰─────────────────── definiens: 7 + │ │ │ │ │ + │ │ │ ╰──────────── definiens: 8 + │ │ │ │ + │ │ │ ╰────── definiens: 9 + 9 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 11 │ │ │ string memory v1 = type(Sample).name; + │ │ │ ───────────────────────┬────────────────────── + │ │ │ ╰──────────────────────── definiens: 11 + 12 │ │ │ bytes memory v2 = type(Sample).creationCode; + │ │ │ ──────────────────────────┬────────────────────────── + │ │ │ ╰──────────────────────────── definiens: 12 + 13 │ │ │ │ bytes memory v3 = type(Sample).runtimeCode; + │ │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ │ ╰─────────────────────────── definiens: 13 + 14 │ │ │ ╭───────────▶ + 15 │ │ │ ├───────────▶ string memory v4 = type(ISample).name; + │ │ │ │ + │ │ │ ╰────────────────────────────────────────────────────────────── definiens: 14 + 16 │ │ │ │ bytes4 v5 = type(ISample).interfaceId; + │ │ │ │ ───────────────────────┬─────────────────────── + │ │ │ │ ╰───────────────────────── definiens: 15 + 17 │ │ │ ╭───────▶ + 18 │ │ │ ├───────▶ Direction v6 = type(Direction).min; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────────────────── definiens: 16 + 19 │ │ │ │ Direction v7 = type(Direction).max; + │ │ │ │ ──────────────────────┬───────────────────── + │ │ │ │ ╰─────────────────────── definiens: 17 + 20 │ │ │ ╭─────▶ + 21 │ │ │ ├─────▶ uint v8 = type(uint).min; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────── definiens: 18 + 22 │ │ │ │ uint v9 = type(uint).max; + │ │ │ │ ─────────────────┬──────────────── + │ │ │ │ ╰────────────────── definiens: 19 + 23 │ │ │ ╭─────────▶ + 24 │ │ │ ├─────────▶ string memory v10 = type(Utils).name; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────────────────────── definiens: 20 + 25 │ │ │ bytes memory v11 = type(Utils).creationCode; + │ │ │ ──────────────────────────┬────────────────────────── + │ │ │ ╰──────────────────────────── definiens: 21 + 26 │ │ │ bytes memory v12 = type(Utils).runtimeCode; + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 27 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 10 + 28 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 4 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.6.8-success.txt b/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.6.8-success.txt index c8dda1fcd7..c29ae8c391 100644 --- a/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.6.8-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/built_ins/type_expr/generated/0.6.8-success.txt @@ -5,51 +5,51 @@ References and definitions: │ 1 │ contract Sample {} │ ───┬── - │ ╰──── def: 1 + │ ╰──── name: 1 │ 3 │ interface ISample {} │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 │ 5 │ library Utils {} │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 7 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 8 │ enum Direction { North, South, West, East } │ ────┬──── ──┬── ──┬── ──┬─ ──┬─ - │ ╰───────────────────────────────── def: 5 + │ ╰───────────────────────────────── name: 5 │ │ │ │ │ - │ ╰─────────────────────── def: 6 + │ ╰─────────────────────── name: 6 │ │ │ │ - │ ╰──────────────── def: 7 + │ ╰──────────────── name: 7 │ │ │ - │ ╰───────── def: 8 + │ ╰───────── name: 8 │ │ - │ ╰─── def: 9 + │ ╰─── name: 9 │ 10 │ function test() public { │ ──┬─ - │ ╰─── def: 10 + │ ╰─── name: 10 11 │ string memory v1 = type(Sample).name; │ ─┬ ───┬── ──┬─ - │ ╰────────────────────── def: 11 + │ ╰────────────────────── name: 11 │ │ │ │ ╰────────── ref: 1 │ │ │ ╰─── ref: built-in 12 │ bytes memory v2 = type(Sample).creationCode; │ ─┬ ───┬── ──────┬───── - │ ╰────────────────────────────── def: 12 + │ ╰────────────────────────────── name: 12 │ │ │ │ ╰────────────────── ref: 1 │ │ │ ╰─────── ref: built-in 13 │ bytes memory v3 = type(Sample).runtimeCode; │ ─┬ ───┬── ─────┬───── - │ ╰───────────────────────────── def: 13 + │ ╰───────────────────────────── name: 13 │ │ │ │ ╰───────────────── ref: 1 │ │ @@ -57,14 +57,14 @@ References and definitions: │ 15 │ string memory v4 = type(ISample).name; │ ─┬ ───┬─── ──┬─ - │ ╰─────────────────────── def: 14 + │ ╰─────────────────────── name: 14 │ │ │ │ ╰─────────── ref: 2 │ │ │ ╰─── ref: built-in 16 │ bytes4 v5 = type(ISample).interfaceId; │ ─┬ ───┬─── ─────┬───── - │ ╰────────────────────────────── def: 15 + │ ╰────────────────────────────── name: 15 │ │ │ │ ╰────────────────── ref: 2 │ │ @@ -74,7 +74,7 @@ References and definitions: │ ────┬──── ─┬ ────┬──── ─┬─ │ ╰─────────────────────────────── ref: 5 │ │ │ │ - │ ╰──────────────────────── def: 16 + │ ╰──────────────────────── name: 16 │ │ │ │ ╰─────────── ref: 5 │ │ @@ -83,7 +83,7 @@ References and definitions: │ ────┬──── ─┬ ────┬──── ─┬─ │ ╰─────────────────────────────── ref: 5 │ │ │ │ - │ ╰──────────────────────── def: 17 + │ ╰──────────────────────── name: 17 │ │ │ │ ╰─────────── ref: 5 │ │ @@ -91,34 +91,110 @@ References and definitions: │ 21 │ uint v8 = type(uint).min; │ ─┬ ─┬─ - │ ╰─────────────────── def: 18 + │ ╰─────────────────── name: 18 │ │ │ ╰─── ref: built-in 22 │ uint v9 = type(uint).max; │ ─┬ ─┬─ - │ ╰─────────────────── def: 19 + │ ╰─────────────────── name: 19 │ │ │ ╰─── ref: built-in │ 24 │ string memory v10 = type(Utils).name; │ ─┬─ ──┬── ──┬─ - │ ╰────────────────────── def: 20 + │ ╰────────────────────── name: 20 │ │ │ │ ╰────────── ref: 3 │ │ │ ╰─── ref: built-in 25 │ bytes memory v11 = type(Utils).creationCode; │ ─┬─ ──┬── ──────┬───── - │ ╰────────────────────────────── def: 21 + │ ╰────────────────────────────── name: 21 │ │ │ │ ╰────────────────── ref: 3 │ │ │ ╰─────── ref: built-in 26 │ bytes memory v12 = type(Utils).runtimeCode; │ ─┬─ ──┬── ─────┬───── - │ ╰───────────────────────────── def: 22 + │ ╰───────────────────────────── name: 22 │ │ │ │ ╰───────────────── ref: 3 │ │ │ ╰─────── ref: built-in ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ contract Sample {} + │ │ ─────────┬───────── + │ │ ╰─────────── definiens: 1 + 2 │ ╭───▶ + 3 │ ├─│ ▶ interface ISample {} + │ │ │ + │ ╰──────────────────────────── definiens: 2 + 4 │ ╭─▶ + 5 │ │ ├─▶ library Utils {} + │ │ │ + │ │ ╰────────────────────── definiens: 3 + 6 │ ╭───────────────▶ + ┆ ┆ + 8 │ │ │ enum Direction { North, South, West, East } + │ │ │ ───────────────────────┬┬─────┬──────┬─────┬──── + │ │ │ ╰────────────────────────── definiens: 6 + │ │ │ │ │ │ │ + │ │ │ ╰───────────────────────── definiens: 5 + │ │ │ │ │ │ + │ │ │ ╰─────────────────── definiens: 7 + │ │ │ │ │ + │ │ │ ╰──────────── definiens: 8 + │ │ │ │ + │ │ │ ╰────── definiens: 9 + 9 │ │ ╭─────────────▶ + ┆ ┆ ┆ + 11 │ │ │ string memory v1 = type(Sample).name; + │ │ │ ───────────────────────┬────────────────────── + │ │ │ ╰──────────────────────── definiens: 11 + 12 │ │ │ bytes memory v2 = type(Sample).creationCode; + │ │ │ ──────────────────────────┬────────────────────────── + │ │ │ ╰──────────────────────────── definiens: 12 + 13 │ │ │ │ bytes memory v3 = type(Sample).runtimeCode; + │ │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ │ ╰─────────────────────────── definiens: 13 + 14 │ │ │ ╭───────────▶ + 15 │ │ │ ├───────────▶ string memory v4 = type(ISample).name; + │ │ │ │ + │ │ │ ╰────────────────────────────────────────────────────────────── definiens: 14 + 16 │ │ │ │ bytes4 v5 = type(ISample).interfaceId; + │ │ │ │ ───────────────────────┬─────────────────────── + │ │ │ │ ╰───────────────────────── definiens: 15 + 17 │ │ │ ╭───────▶ + 18 │ │ │ ├───────▶ Direction v6 = type(Direction).min; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────────────────── definiens: 16 + 19 │ │ │ │ Direction v7 = type(Direction).max; + │ │ │ │ ──────────────────────┬───────────────────── + │ │ │ │ ╰─────────────────────── definiens: 17 + 20 │ │ │ ╭─────▶ + 21 │ │ │ ├─────▶ uint v8 = type(uint).min; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────── definiens: 18 + 22 │ │ │ │ uint v9 = type(uint).max; + │ │ │ │ ─────────────────┬──────────────── + │ │ │ │ ╰────────────────── definiens: 19 + 23 │ │ │ ╭─────────▶ + 24 │ │ │ ├─────────▶ string memory v10 = type(Utils).name; + │ │ │ │ + │ │ │ ╰─────────────────────────────────────────────────────────── definiens: 20 + 25 │ │ │ bytes memory v11 = type(Utils).creationCode; + │ │ │ ──────────────────────────┬────────────────────────── + │ │ │ ╰──────────────────────────── definiens: 21 + 26 │ │ │ bytes memory v12 = type(Utils).runtimeCode; + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 22 + 27 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 10 + 28 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 4 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_call_parent/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_call_parent/generated/0.4.11-failure.txt index fa35b69352..bf50126567 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_call_parent/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_call_parent/generated/0.4.11-failure.txt @@ -14,14 +14,26 @@ References and definitions: │ 1 │ contract Base {} │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 │ 3 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 2 + │ ╰─────────── name: 2 │ │ │ ╰─── ref: 1 4 │ constructor() Base() { │ ─────┬───── │ ╰─────── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ contract Base {} + │ │ ────────┬──────── + │ │ ╰────────── definiens: 1 + 2 │ ╭─▶ + ┆ ┆ + 6 │ ├─▶ } + │ │ + │ ╰─────── definiens: 2 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_call_parent/generated/0.4.22-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_call_parent/generated/0.4.22-success.txt index 84795b192d..b6d9b3df31 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_call_parent/generated/0.4.22-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_call_parent/generated/0.4.22-success.txt @@ -5,14 +5,26 @@ References and definitions: │ 1 │ contract Base {} │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 │ 3 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 2 + │ ╰─────────── name: 2 │ │ │ ╰─── ref: 1 4 │ constructor() Base() { │ ──┬─ │ ╰─── ref: 1 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ contract Base {} + │ │ ────────┬──────── + │ │ ╰────────── definiens: 1 + 2 │ ╭─▶ + ┆ ┆ + 6 │ ├─▶ } + │ │ + │ ╰─────── definiens: 2 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.4.11-failure.txt index 95972f8518..099a065236 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.4.11-failure.txt @@ -13,12 +13,12 @@ References and definitions: │ 1 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 2 │ function A(int _x) {} │ ┬ ─┬ - │ ╰───────── def: 2 + │ ╰───────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ constructor(int _x) {} │ ─────┬───── @@ -26,13 +26,37 @@ References and definitions: │ 7 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 8 │ function foo() public { │ ─┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 9 │ new A({_x: 2}); │ ┬ ─┬ │ ╰────── ref: 1 │ │ │ ╰── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract A { + 2 │ │ function A(int _x) {} + │ │ ─────────────┬────┬─────── + │ │ ╰────────────── definiens: 2 + │ │ │ + │ │ ╰───────── definiens: 3 + ┆ ┆ + 5 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 1 + 6 │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ ╭─▶ function foo() public { + ┆ ┆ ┆ + 10 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 5 + 11 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.4.22-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.4.22-success.txt index 391e65d776..3d2a6e3105 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.4.22-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.4.22-success.txt @@ -5,26 +5,53 @@ References and definitions: │ 1 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 2 │ function A(int _x) {} │ ┬ ─┬ - │ ╰───────── def: 2 + │ ╰───────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ constructor(int _x) {} │ ─┬ - │ ╰── def: 4 + │ ╰── name: 4 │ 7 │ contract Test { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 8 │ function foo() public { │ ─┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 9 │ new A({_x: 2}); │ ┬ ─┬ │ ╰────── ref: 1 │ │ │ ╰── refs: 3, 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract A { + 2 │ │ function A(int _x) {} + │ │ ─────────────┬────┬─────── + │ │ ╰────────────── definiens: 2 + │ │ │ + │ │ ╰───────── definiens: 3 + ┆ ┆ + 4 │ │ constructor(int _x) {} + │ │ ───┬── + │ │ ╰──── definiens: 4 + 5 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 1 + 6 │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ ╭─▶ function foo() public { + ┆ ┆ ┆ + 10 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 6 + 11 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.5.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.5.0-success.txt index ca761ec711..dd081ba166 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.5.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_invocation/generated/0.5.0-success.txt @@ -5,26 +5,53 @@ References and definitions: │ 1 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 2 │ function A(int _x) {} │ ┬ ─┬ - │ ╰───────── def: 2 + │ ╰───────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ constructor(int _x) {} │ ─┬ - │ ╰── def: 4 + │ ╰── name: 4 │ 7 │ contract Test { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 8 │ function foo() public { │ ─┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 9 │ new A({_x: 2}); │ ┬ ─┬ │ ╰────── ref: 1 │ │ │ ╰── ref: 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract A { + 2 │ │ function A(int _x) {} + │ │ ─────────────┬────┬─────── + │ │ ╰────────────── definiens: 2 + │ │ │ + │ │ ╰───────── definiens: 3 + ┆ ┆ + 4 │ │ constructor(int _x) {} + │ │ ───┬── + │ │ ╰──── definiens: 4 + 5 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 1 + 6 │ ╭─────▶ + ┆ ┆ ┆ + 8 │ │ ╭─▶ function foo() public { + ┆ ┆ ┆ + 10 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 6 + 11 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_modifier/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_modifier/generated/0.4.11-failure.txt index aef867a3e0..76f4e54ac8 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_modifier/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_modifier/generated/0.4.11-failure.txt @@ -13,12 +13,12 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ modifier validAddress(address _addr) { │ ──────┬───── ──┬── - │ ╰───────────────────── def: 2 + │ ╰───────────────────── name: 2 │ │ - │ ╰──── def: 3 + │ ╰──── name: 3 3 │ assert(_addr != address(0)); │ ───┬── ──┬── │ ╰────────── ref: built-in @@ -32,3 +32,19 @@ References and definitions: │ ─────┬───── │ ╰─────── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ modifier validAddress(address _addr) { + │ │ │ ──────┬────── + │ │ │ ╰──────── definiens: 3 + ┆ ┆ ┆ + 5 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + ┆ ┆ + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_modifier/generated/0.4.22-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_modifier/generated/0.4.22-success.txt index f6eabec0c0..70da43dacc 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_modifier/generated/0.4.22-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/constructor_modifier/generated/0.4.22-success.txt @@ -5,12 +5,12 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ modifier validAddress(address _addr) { │ ──────┬───── ──┬── - │ ╰───────────────────── def: 2 + │ ╰───────────────────── name: 2 │ │ - │ ╰──── def: 3 + │ ╰──── name: 3 3 │ assert(_addr != address(0)); │ ───┬── ──┬── │ ╰────────── ref: built-in @@ -22,9 +22,28 @@ References and definitions: │ 7 │ constructor (address _addr) validAddress(_addr) {} │ ──┬── ──────┬───── ──┬── - │ ╰──────────────────────── def: 4 + │ ╰──────────────────────── name: 4 │ │ │ │ ╰───────────── ref: 2 │ │ │ ╰──── ref: 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ modifier validAddress(address _addr) { + │ │ │ ──────┬────── + │ │ │ ╰──────── definiens: 3 + ┆ ┆ ┆ + 5 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + ┆ ┆ + 7 │ │ constructor (address _addr) validAddress(_addr) {} + │ │ ──────┬────── + │ │ ╰──────── definiens: 4 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/constructors/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/constructors/generated/0.4.11-failure.txt index ed6cd15aa5..b8a250bc4a 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/constructors/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/constructors/generated/0.4.11-failure.txt @@ -15,12 +15,24 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ string public name; │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ constructor(string memory _name) { │ ─────┬───── │ ╰─────── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Test { + 2 │ │ string public name; + │ │ ────────────┬─────────── + │ │ ╰───────────── definiens: 2 + ┆ ┆ + 7 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/constructors/generated/0.4.22-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/constructors/generated/0.4.22-success.txt index d8394de511..0e82a49e59 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/constructors/generated/0.4.22-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/constructors/generated/0.4.22-success.txt @@ -5,17 +5,33 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ string public name; │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ constructor(string memory _name) { │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 5 │ name = _name; │ ──┬─ ──┬── │ ╰─────────── ref: 2 │ │ │ ╰──── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Test { + 2 │ │ string public name; + │ │ ────────────┬─────────── + │ │ ╰───────────── definiens: 2 + ┆ ┆ + 4 │ │ constructor(string memory _name) { + │ │ ─────────┬───────── + │ │ ╰─────────── definiens: 3 + ┆ ┆ + 7 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/fallback_receive/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/fallback_receive/generated/0.4.11-failure.txt index fe89573509..9260cf8208 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/fallback_receive/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/fallback_receive/generated/0.4.11-failure.txt @@ -15,19 +15,38 @@ References and definitions: │ 1 │ contract Fallback { │ ────┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ event Log(string func, uint256 gas); │ ─┬─ ──┬─ ─┬─ - │ ╰──────────────────────────── def: 2 + │ ╰──────────────────────────── name: 2 │ │ │ - │ ╰──────────────── def: 3 + │ ╰──────────────── name: 3 │ │ - │ ╰─── def: 4 + │ ╰─── name: 4 3 │ uint status; │ ───┬── - │ ╰──── def: 5 + │ ╰──── name: 5 │ 5 │ fallback(bytes calldata input) external payable returns (bytes memory output) { │ ────┬─── │ ╰───── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Fallback { + 2 │ │ event Log(string func, uint256 gas); + │ │ ───────────────────┬┬───────────┬──────── + │ │ ╰─────────────────────── definiens: 3 + │ │ │ │ + │ │ ╰────────────────────── definiens: 2 + │ │ │ + │ │ ╰────────── definiens: 4 + 3 │ │ uint status; + │ │ ────────┬──────── + │ │ ╰────────── definiens: 5 + ┆ ┆ + 13 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/fallback_receive/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/fallback_receive/generated/0.6.0-success.txt index f0f534b967..dbce6c78fe 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/fallback_receive/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/fallback_receive/generated/0.6.0-success.txt @@ -5,23 +5,23 @@ References and definitions: │ 1 │ contract Fallback { │ ────┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ event Log(string func, uint256 gas); │ ─┬─ ──┬─ ─┬─ - │ ╰──────────────────────────── def: 2 + │ ╰──────────────────────────── name: 2 │ │ │ - │ ╰──────────────── def: 3 + │ ╰──────────────── name: 3 │ │ - │ ╰─── def: 4 + │ ╰─── name: 4 3 │ uint status; │ ───┬── - │ ╰──── def: 5 + │ ╰──── name: 5 │ 5 │ fallback(bytes calldata input) external payable returns (bytes memory output) { │ ──┬── ───┬── - │ ╰─────────────────────────────────────────────────── def: 6 + │ ╰─────────────────────────────────────────────────── name: 6 │ │ - │ ╰──── def: 7 + │ ╰──── name: 7 6 │ emit Log("fallback", status); │ ─┬─ ───┬── │ ╰────────────────────── ref: 2 @@ -39,3 +39,28 @@ References and definitions: │ │ │ ╰──── ref: 5 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Fallback { + 2 │ │ event Log(string func, uint256 gas); + │ │ ───────────────────┬┬───────────┬──────── + │ │ ╰─────────────────────── definiens: 3 + │ │ │ │ + │ │ ╰────────────────────── definiens: 2 + │ │ │ + │ │ ╰────────── definiens: 4 + 3 │ │ uint status; + │ │ ────────┬──────── + │ │ ╰────────── definiens: 5 + ┆ ┆ + 5 │ │ fallback(bytes calldata input) external payable returns (bytes memory output) { + │ │ ──────────┬───────── ─────────┬───────── + │ │ ╰────────────────────────────────────────────────────────── definiens: 6 + │ │ │ + │ │ ╰─────────── definiens: 7 + ┆ ┆ + 13 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/inheritance/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/inheritance/generated/0.4.11-success.txt index fb5f578c1c..3abfc8eeb0 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/inheritance/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/inheritance/generated/0.4.11-success.txt @@ -5,20 +5,43 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function base_func() returns (int) { │ ────┬──── - │ ╰────── def: 2 + │ ╰────── name: 2 │ 7 │ contract Derived is Base { │ ───┬─── ──┬─ - │ ╰───────────── def: 3 + │ ╰───────────── name: 3 │ │ │ ╰─── ref: 1 8 │ function some_func() returns (int) { │ ────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 9 │ return 1 + base_func(); │ ────┬──── │ ╰────── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract Base { + 2 │ │ ╭─▶ function base_func() returns (int) { + ┆ ┆ ┆ + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 5 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────── definiens: 1 + 6 │ ╭───────▶ + ┆ ┆ ┆ + 8 │ │ ╭───▶ function some_func() returns (int) { + ┆ ┆ ┆ + 10 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 4 + 11 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 3 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/inherited_state_vars/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/inherited_state_vars/generated/0.4.11-success.txt index 64c83c5658..f4587f1121 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/inherited_state_vars/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/inherited_state_vars/generated/0.4.11-success.txt @@ -5,28 +5,28 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ int in_base; │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 │ 4 │ contract Middle is Base { │ ───┬── ──┬─ - │ ╰──────────── def: 3 + │ ╰──────────── name: 3 │ │ │ ╰─── ref: 1 5 │ int in_middle; │ ────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 │ 7 │ contract Test is Middle { │ ──┬─ ───┬── - │ ╰───────────── def: 5 + │ ╰───────────── name: 5 │ │ │ ╰──── ref: 3 8 │ function test() public { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 9 │ in_base; │ ───┬─── │ ╰───── ref: 2 @@ -34,3 +34,30 @@ References and definitions: │ ────┬──── │ ╰────── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base { + 2 │ │ int in_base; + │ │ ────────┬──────── + │ │ ╰────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ contract Middle is Base { + 5 │ │ int in_middle; + │ │ ─────────┬───────── + │ │ ╰─────────── definiens: 4 + 6 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 3 + 7 │ ╭─│ ────▶ contract Test is Middle { + 8 │ │ ╭─────▶ function test() public { + ┆ ┆ ┆ + 11 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 6 + 12 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/internal_visibility/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/internal_visibility/generated/0.4.11-failure.txt index 507119f26e..0051924669 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/internal_visibility/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/internal_visibility/generated/0.4.11-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/internal_visibility/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/internal_visibility/generated/0.6.0-success.txt index acd63c8cb7..5e905e1f50 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/internal_visibility/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/internal_visibility/generated/0.6.0-success.txt @@ -5,25 +5,25 @@ References and definitions: │ 1 │ abstract contract Ownable { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ address internal owner; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ address default_visibility; │ ─────────┬──────── - │ ╰────────── def: 3 + │ ╰────────── name: 3 4 │ function _internal_only() internal {} │ ───────┬────── - │ ╰──────── def: 4 + │ ╰──────── name: 4 │ 6 │ contract Test is Ownable { │ ──┬─ ───┬─── - │ ╰────────────── def: 5 + │ ╰────────────── name: 5 │ │ │ ╰───── ref: 1 7 │ function test() public { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 8 │ owner; │ ──┬── │ ╰──── ref: 2 @@ -39,3 +39,29 @@ References and definitions: │ │ │ ╰──────── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ abstract contract Ownable { + 2 │ │ address internal owner; + │ │ ──────────────┬───────────── + │ │ ╰─────────────── definiens: 2 + 3 │ │ address default_visibility; + │ │ ────────────────┬─────────────── + │ │ ╰───────────────── definiens: 3 + 4 │ │ function _internal_only() internal {} + │ │ ─────────────────────┬──────────────────── + │ │ ╰────────────────────── definiens: 4 + 5 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 6 │ ╭─│ ──▶ contract Test is Ownable { + 7 │ │ ╭───▶ function test() public { + ┆ ┆ ┆ + 12 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 6 + 13 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_constructors/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_constructors/generated/0.4.11-success.txt index 33d044032f..a669f45d5e 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_constructors/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_constructors/generated/0.4.11-success.txt @@ -5,16 +5,31 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 │ 3 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 2 + │ ╰─────────── name: 2 │ │ │ ╰─── ref: 1 4 │ function Test() public Base() {} │ ──┬─ ──┬─ - │ ╰───────────────── def: 3 + │ ╰───────────────── name: 3 │ │ │ ╰─── ref: 1 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base { + 2 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 3 │ ╭───▶ contract Test is Base { + 4 │ │ function Test() public Base() {} + │ │ ──────────────────┬────────────────── + │ │ ╰──────────────────── definiens: 3 + 5 │ ├───▶ } + │ │ + │ ╰───────── definiens: 2 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_constructors/generated/0.5.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_constructors/generated/0.5.0-failure.txt index 24988498b8..d402d5fe52 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_constructors/generated/0.5.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_constructors/generated/0.5.0-failure.txt @@ -5,16 +5,31 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 │ 3 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 2 + │ ╰─────────── name: 2 │ │ │ ╰─── ref: 1 4 │ function Test() public Base() {} │ ──┬─ ──┬─ - │ ╰───────────────── def: 3 + │ ╰───────────────── name: 3 │ │ │ ╰─── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base { + 2 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 3 │ ╭───▶ contract Test is Base { + 4 │ │ function Test() public Base() {} + │ │ ──────────────────┬────────────────── + │ │ ╰──────────────────── definiens: 3 + 5 │ ├───▶ } + │ │ + │ ╰───────── definiens: 2 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_function_options/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_function_options/generated/0.4.11-success.txt index e7f54749fd..93d691797e 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_function_options/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_function_options/generated/0.4.11-success.txt @@ -5,22 +5,22 @@ References and definitions: │ 1 │ contract RefundVault { │ ─────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ function deposit() public payable {} │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ RefundVault public vault; │ ─────┬───── ──┬── │ ╰──────────────────── ref: 1 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 6 │ function test() internal { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 7 │ vault.deposit.value(msg.value)(); │ ──┬── ───┬─── ──┬── ─┬─ ──┬── │ ╰──────────────────────────── ref: 4 @@ -33,3 +33,26 @@ References and definitions: │ │ │ ╰──── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract RefundVault { + 2 │ │ function deposit() public payable {} + │ │ ────────────────────┬──────────────────── + │ │ ╰────────────────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ contract Test { + 5 │ │ │ RefundVault public vault; + │ │ │ ───────────────┬────────────── + │ │ │ ╰──────────────── definiens: 4 + 6 │ │ ╭───▶ function test() internal { + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 3 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_function_options/generated/0.7.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_function_options/generated/0.7.0-failure.txt index 065ccbdfad..e27febba3e 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_function_options/generated/0.7.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/legacy_function_options/generated/0.7.0-failure.txt @@ -5,22 +5,22 @@ References and definitions: │ 1 │ contract RefundVault { │ ─────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ function deposit() public payable {} │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ RefundVault public vault; │ ─────┬───── ──┬── │ ╰──────────────────── ref: 1 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 6 │ function test() internal { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 7 │ vault.deposit.value(msg.value)(); │ ──┬── ───┬─── ──┬── ─┬─ ──┬── │ ╰──────────────────────────── ref: 4 @@ -33,3 +33,26 @@ References and definitions: │ │ │ ╰──── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract RefundVault { + 2 │ │ function deposit() public payable {} + │ │ ────────────────────┬──────────────────── + │ │ ╰────────────────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ contract Test { + 5 │ │ │ RefundVault public vault; + │ │ │ ───────────────┬────────────── + │ │ │ ╰──────────────── definiens: 4 + 6 │ │ ╭───▶ function test() internal { + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 3 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/multi_inheritance/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/multi_inheritance/generated/0.4.11-success.txt index 280b52987b..e2532da7ea 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/multi_inheritance/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/multi_inheritance/generated/0.4.11-success.txt @@ -5,21 +5,21 @@ References and definitions: │ 1 │ contract Base1 { │ ──┬── - │ ╰──── def: 1 + │ ╰──── name: 1 2 │ function base1() returns (int) { return 1; } │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ contract Base2 { │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 6 │ function base2() returns (int) { return 2; } │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 │ 9 │ contract Derived is │ ───┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 10 │ Base1, │ ──┬── │ ╰──── ref: 1 @@ -29,10 +29,39 @@ References and definitions: │ 13 │ function test() returns (int) { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 14 │ return base1() + base2(); │ ──┬── ──┬── │ ╰────────────── ref: 2 │ │ │ ╰──── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base1 { + 2 │ │ function base1() returns (int) { return 1; } + │ │ ────────────────────────┬──────────────────────── + │ │ ╰────────────────────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + ┆ ┆ + 6 │ │ function base2() returns (int) { return 2; } + │ │ ────────────────────────┬──────────────────────── + │ │ ╰────────────────────────── definiens: 4 + 7 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 3 + 8 │ ╭───────▶ + ┆ ┆ + 13 │ │ ╭─────▶ function test() returns (int) { + ┆ ┆ ┆ + 15 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 6 + 16 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/public_array_getters/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/public_array_getters/generated/0.4.11-success.txt index 3c4e526ae4..7adeb75f72 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/public_array_getters/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/public_array_getters/generated/0.4.11-success.txt @@ -5,14 +5,14 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test(TokenState tokenState) public { │ ──┬─ ─────┬──── ─────┬──── - │ ╰───────────────────────── def: 2 + │ ╰───────────────────────── name: 2 │ │ │ │ ╰───────────────── ref: 4 │ │ - │ ╰────── def: 3 + │ ╰────── name: 3 3 │ tokenState.owners(1).balance; │ ─────┬──── ───┬── ───┬─── │ ╰──────────────────────── ref: 3 @@ -23,8 +23,30 @@ References and definitions: │ 6 │ contract TokenState { │ ─────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 7 │ address[] public owners; │ ───┬── - │ ╰──── def: 5 + │ ╰──── name: 5 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ──▶ contract Test { + 2 │ │ ╭───▶ function test(TokenState tokenState) public { + │ │ │ ──────────┬────────── + │ │ │ ╰──────────── definiens: 3 + ┆ ┆ ┆ + 4 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 5 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 6 │ ╭─▶ contract TokenState { + 7 │ │ address[] public owners; + │ │ ──────────────┬────────────── + │ │ ╰──────────────── definiens: 5 + 8 │ ├─▶ } + │ │ + │ ╰─────── definiens: 4 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/public_getter_members/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/public_getter_members/generated/0.4.11-success.txt index 503776d84b..6703d2ad77 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/public_getter_members/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/public_getter_members/generated/0.4.11-success.txt @@ -5,21 +5,21 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ address public owner; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ function test(Base base) public { │ ──┬─ ──┬─ ──┬─ - │ ╰───────────── def: 4 + │ ╰───────────── name: 4 │ │ │ │ ╰──────── ref: 1 │ │ - │ ╰─── def: 5 + │ ╰─── name: 5 6 │ base.owner().balance; │ ──┬─ ──┬── ───┬─── │ ╰─────────────────── ref: 5 @@ -28,3 +28,25 @@ References and definitions: │ │ │ ╰───── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base { + 2 │ │ address public owner; + │ │ ─────────────┬──────────── + │ │ ╰────────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─│ ──▶ contract Test { + 5 │ │ ╭───▶ function test(Base base) public { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 5 + ┆ ┆ ┆ + 7 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 4 + 8 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 3 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/public_getters/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/public_getters/generated/0.4.11-success.txt index 7afdf26c48..1c2f786f80 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/public_getters/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/public_getters/generated/0.4.11-success.txt @@ -5,26 +5,26 @@ References and definitions: │ 1 │ contract Foo { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ int public x; │ ┬ - │ ╰── def: 2 + │ ╰── name: 2 │ 5 │ contract Bar { │ ─┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 6 │ int public y; │ ┬ - │ ╰── def: 4 + │ ╰── name: 4 7 │ Foo f; │ ─┬─ ┬ │ ╰───── ref: 1 │ │ - │ ╰── def: 5 + │ ╰── name: 5 │ 9 │ function test() public returns (int) { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 10 │ return y + this.y() + f.x(); │ ┬ ┬ ┬ ┬ │ ╰─────────────────── ref: 4 @@ -35,3 +35,30 @@ References and definitions: │ │ │ ╰── ref: 2 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Foo { + 2 │ │ int public x; + │ │ ─────────┬──────── + │ │ ╰────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ + ┆ ┆ + 6 │ │ int public y; + │ │ ─────────┬──────── + │ │ ╰────────── definiens: 4 + 7 │ │ │ Foo f; + │ │ │ ─────┬───── + │ │ │ ╰─────── definiens: 5 + 8 │ │ ╭───▶ + ┆ ┆ ┆ + 11 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 6 + 12 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 3 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/public_inherited_getter/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/public_inherited_getter/generated/0.4.11-success.txt index fab1b7434b..e3f26766cd 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/public_inherited_getter/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/public_inherited_getter/generated/0.4.11-success.txt @@ -5,15 +5,15 @@ References and definitions: │ 1 │ contract RegistrarAccess { │ ───────┬─────── - │ ╰───────── def: 1 + │ ╰───────── name: 1 2 │ Root root; │ ──┬─ ──┬─ │ ╰──────── ref: 4 │ │ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 4 │ root.controllers; │ ──┬─ ─────┬───── │ ╰─────────────── ref: 2 @@ -22,14 +22,42 @@ References and definitions: │ 8 │ contract Root is Controllable {} │ ──┬─ ──────┬───── - │ ╰─────────────────── def: 4 + │ ╰─────────────────── name: 4 │ │ │ ╰─────── ref: 5 │ 10 │ contract Controllable { │ ──────┬───── - │ ╰─────── def: 5 + │ ╰─────── name: 5 11 │ mapping (address => bool) public controllers; │ ─────┬───── - │ ╰─────── def: 6 + │ ╰─────── name: 6 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───────▶ contract RegistrarAccess { + 2 │ │ │ Root root; + │ │ │ ───────┬─────── + │ │ │ ╰───────── definiens: 2 + 3 │ │ ╭───▶ function test() public { + ┆ ┆ ┆ + 5 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 3 + 6 │ ├─────│ ▶ } + │ │ │ + │ ╰───────────── definiens: 1 + 7 │ ╭─▶ + 8 │ │ ├─▶ contract Root is Controllable {} + │ │ │ + │ │ ╰────────────────────────────────────── definiens: 4 + 9 │ ╭─────▶ + ┆ ┆ + 11 │ │ mapping (address => bool) public controllers; + │ │ ─────────────────────────┬──────────────────────── + │ │ ╰────────────────────────── definiens: 6 + 12 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 5 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/public_mapping_getters/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/public_mapping_getters/generated/0.4.11-success.txt index 84dff71c3f..344d927917 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/public_mapping_getters/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/public_mapping_getters/generated/0.4.11-success.txt @@ -5,14 +5,14 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test(TokenState tokenState) public { │ ──┬─ ─────┬──── ─────┬──── - │ ╰───────────────────────── def: 2 + │ ╰───────────────────────── name: 2 │ │ │ │ ╰───────────────── ref: 4 │ │ - │ ╰────── def: 3 + │ ╰────── name: 3 3 │ tokenState.owners(1).balance; │ ─────┬──── ───┬── ───┬─── │ ╰──────────────────────── ref: 3 @@ -23,8 +23,30 @@ References and definitions: │ 6 │ contract TokenState { │ ─────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 7 │ mapping(uint => address) public owners; │ ───┬── - │ ╰──── def: 5 + │ ╰──── name: 5 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ──▶ contract Test { + 2 │ │ ╭───▶ function test(TokenState tokenState) public { + │ │ │ ──────────┬────────── + │ │ │ ╰──────────── definiens: 3 + ┆ ┆ ┆ + 4 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 5 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 6 │ ╭─▶ contract TokenState { + 7 │ │ mapping(uint => address) public owners; + │ │ ──────────────────────┬───────────────────── + │ │ ╰─────────────────────── definiens: 5 + 8 │ ├─▶ } + │ │ + │ ╰─────── definiens: 4 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/public_struct_getter/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/public_struct_getter/generated/0.4.11-success.txt index 28722902e6..4d40e43b0d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/public_struct_getter/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/public_struct_getter/generated/0.4.11-success.txt @@ -5,28 +5,28 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Owner { address owner; } │ ──┬── ──┬── - │ ╰──────────────────── def: 2 + │ ╰──────────────────── name: 2 │ │ - │ ╰──── def: 3 + │ ╰──── name: 3 3 │ Owner public owner; │ ──┬── ──┬── │ ╰───────────────── ref: 2 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 │ 5 │ contract Test { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 6 │ function test(Base base) public { │ ──┬─ ──┬─ ──┬─ - │ ╰───────────── def: 6 + │ ╰───────────── name: 6 │ │ │ │ ╰──────── ref: 1 │ │ - │ ╰─── def: 7 + │ ╰─── name: 7 7 │ base.owner().balance; │ ──┬─ ──┬── ───┬─── │ ╰─────────────────── ref: 7 @@ -35,3 +35,30 @@ References and definitions: │ │ │ ╰───── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Base { + 2 │ │ struct Owner { address owner; } + │ │ ──────────────────┬──────┬────────── + │ │ ╰─────────────────── definiens: 2 + │ │ │ + │ │ ╰──────────── definiens: 3 + 3 │ │ Owner public owner; + │ │ ────────────┬─────────── + │ │ ╰───────────── definiens: 4 + 4 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 1 + 5 │ ╭───│ ▶ contract Test { + 6 │ │ ╭─▶ function test(Base base) public { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 7 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 6 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 5 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/qualified_inherited/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/qualified_inherited/generated/0.4.11-success.txt index da81507f48..cc7cc58e1e 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/qualified_inherited/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/qualified_inherited/generated/0.4.11-success.txt @@ -5,22 +5,42 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ bool renounced; │ ────┬──── - │ ╰────── def: 2 + │ ╰────── name: 2 │ 4 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 3 + │ ╰─────────── name: 3 │ │ │ ╰─── ref: 1 5 │ function test() public { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 6 │ Base.renounced = true; │ ──┬─ ────┬──── │ ╰───────────── ref: 1 │ │ │ ╰────── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base { + 2 │ │ bool renounced; + │ │ ──────────┬───────── + │ │ ╰─────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─│ ──▶ contract Test is Base { + 5 │ │ ╭───▶ function test() public { + ┆ ┆ ┆ + 7 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 4 + 8 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 3 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/qualified_parent_call/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/qualified_parent_call/generated/0.4.11-success.txt index e0763a81c8..74a7b898ca 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/qualified_parent_call/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/qualified_parent_call/generated/0.4.11-success.txt @@ -5,27 +5,50 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function in_base() internal {} │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 │ 4 │ contract Middle is Base {} │ ───┬── ──┬─ - │ ╰──────────── def: 3 + │ ╰──────────── name: 3 │ │ │ ╰─── ref: 1 5 │ contract Test is Middle { │ ──┬─ ───┬── - │ ╰───────────── def: 4 + │ ╰───────────── name: 4 │ │ │ ╰──── ref: 3 6 │ function test() public { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 7 │ Base.in_base(); │ ──┬─ ───┬─── │ ╰─────────── ref: 1 │ │ │ ╰───── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base { + 2 │ │ function in_base() internal {} + │ │ ─────────────────┬───────────────── + │ │ ╰─────────────────── definiens: 2 + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 + 4 │ │ contract Middle is Base {} + │ │ ─────────────┬───────────── + │ │ ╰─────────────── definiens: 3 + 5 │ ╭─│ ──▶ contract Test is Middle { + 6 │ │ ╭───▶ function test() public { + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/super_deep/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/super_deep/generated/0.4.11-success.txt index 66779a28d1..05e979038f 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/super_deep/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/super_deep/generated/0.4.11-success.txt @@ -5,25 +5,48 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function in_base() {} │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 │ 4 │ contract Middle is Base {} │ ───┬── ──┬─ - │ ╰──────────── def: 3 + │ ╰──────────── name: 3 │ │ │ ╰─── ref: 1 5 │ contract Test is Middle { │ ──┬─ ───┬── - │ ╰───────────── def: 4 + │ ╰───────────── name: 4 │ │ │ ╰──── ref: 3 6 │ function in_base() { │ ───┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 7 │ super.in_base(); │ ───┬─── │ ╰───── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base { + 2 │ │ function in_base() {} + │ │ ─────────────┬──────────── + │ │ ╰────────────── definiens: 2 + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 + 4 │ │ contract Middle is Base {} + │ │ ─────────────┬───────────── + │ │ ╰─────────────── definiens: 3 + 5 │ ╭─│ ──▶ contract Test is Middle { + 6 │ │ ╭───▶ function in_base() { + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/super_linearisation/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/super_linearisation/generated/0.4.11-success.txt index 5819b34073..03245cb508 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/super_linearisation/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/super_linearisation/generated/0.4.11-success.txt @@ -5,46 +5,84 @@ References and definitions: │ 1 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 2 │ function foo() public {} │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ contract B is A { │ ┬ ┬ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ │ ╰── ref: 1 5 │ function foo() public { │ ─┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 6 │ super.foo(); │ ─┬─ │ ╰─── ref: 2 │ 9 │ contract C is A { │ ┬ ┬ - │ ╰─────── def: 5 + │ ╰─────── name: 5 │ │ │ ╰── ref: 1 10 │ function foo() public { │ ─┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 11 │ super.foo(); │ ─┬─ │ ╰─── ref: 4 │ 14 │ contract D is B, C { │ ┬ ┬ ┬ - │ ╰────────── def: 7 + │ ╰────────── name: 7 │ │ │ │ ╰───── ref: 3 │ │ │ ╰── ref: 5 15 │ function foo() public { │ ─┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 16 │ super.foo(); │ ─┬─ │ ╰─── ref: 6 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract A { + 2 │ │ function foo() public {} + │ │ ──────────────┬────────────── + │ │ ╰──────────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───│ ──────▶ contract B is A { + 5 │ │ ╭───────▶ function foo() public { + ┆ ┆ ┆ + 7 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────────── definiens: 4 + 8 │ ├─│ ────────▶ } + │ │ │ + │ ╰───────────────── definiens: 3 + 9 │ ╭───│ ────▶ contract C is A { + 10 │ │ ╭─────▶ function foo() public { + ┆ ┆ ┆ + 12 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 6 + 13 │ │ ├─────────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 5 + 14 │ ╭─────────│ ──▶ contract D is B, C { + 15 │ │ ╭───▶ function foo() public { + ┆ ┆ ┆ + 17 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 8 + 18 │ ├─────────────▶ } + │ │ + │ ╰─────────────────── definiens: 7 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.4.11-failure.txt index 3502c5219f..b437431be5 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.4.11-failure.txt @@ -24,18 +24,41 @@ References and definitions: │ 4 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 5 │ function foo() public pure virtual returns (string memory) { │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 10 │ contract B is A { │ ┬ ┬ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ │ ╰── ref: 1 │ 12 │ function foo() public pure virtual override(A) returns (string memory) { │ ─┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭───▶ + ┆ ┆ + 5 │ │ function foo() public pure virtual returns (string memory) { + │ │ ────────────┬──────────── + │ │ ╰────────────── definiens: 2 + ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 1 + 9 │ ╭─────▶ + ┆ ┆ ┆ + 11 │ │ ╭─▶ // A super; + 12 │ │ ├─▶ function foo() public pure virtual override(A) returns (string memory) { + │ │ │ + │ │ ╰────────────────────────────────────────────────────────────────────────────────── definiens: 4 + ┆ ┆ + 15 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 3 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.4.16-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.4.16-failure.txt index 1e0d62fb2d..a449a224b6 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.4.16-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.4.16-failure.txt @@ -5,22 +5,22 @@ References and definitions: │ 4 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 5 │ function foo() public pure virtual returns (string memory) { │ ─┬─ ───┬─── - │ ╰───────────────────────── def: 2 + │ ╰───────────────────────── name: 2 │ │ │ ╰───── unresolved │ 10 │ contract B is A { │ ┬ ┬ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ │ ╰── ref: 1 │ 12 │ function foo() public pure virtual override(A) returns (string memory) { │ ─┬─ ───┬─── ────┬─── ┬ - │ ╰──────────────────────────────────── def: 4 + │ ╰──────────────────────────────────── name: 4 │ │ │ │ │ ╰──────────────── unresolved │ │ │ @@ -31,3 +31,27 @@ References and definitions: │ ─┬─ │ ╰─── ref: 2 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭───▶ + ┆ ┆ ┆ + 5 │ │ ╭─▶ function foo() public pure virtual returns (string memory) { + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 1 + 9 │ ╭───────▶ + ┆ ┆ ┆ + 11 │ │ ╭─────▶ // A super; + ┆ ┆ ┆ + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 4 + 15 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 3 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.5.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.5.0-failure.txt index c2732ac7c0..f83f699ebf 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.5.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.5.0-failure.txt @@ -15,22 +15,46 @@ References and definitions: │ 4 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 5 │ function foo() public pure virtual returns (string memory) { │ ─┬─ ───┬─── - │ ╰───────────────────────── def: 2 + │ ╰───────────────────────── name: 2 │ │ │ ╰───── unresolved │ 10 │ contract B is A { │ ┬ ┬ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ │ ╰── ref: 1 │ 12 │ function foo() public pure virtual override(A) returns (string memory) { │ ─┬─ ───┬─── - │ ╰───────────────────────── def: 4 + │ ╰───────────────────────── name: 4 │ │ │ ╰───── unresolved ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭─────▶ + ┆ ┆ ┆ + 5 │ │ ╭───▶ function foo() public pure virtual returns (string memory) { + ┆ ┆ ┆ + 7 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 8 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────── definiens: 1 + 9 │ ╭───────▶ + ┆ ┆ ┆ + 11 │ │ ╭─▶ // A super; + 12 │ │ ├─▶ function foo() public pure virtual override(A) returns (string memory) { + │ │ │ + │ │ ╰────────────────────────────────────────────────────────────────────────────────── definiens: 4 + ┆ ┆ + 15 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 3 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.6.0-success.txt index 7feb70120a..a54754ee8c 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/super_scope/generated/0.6.0-success.txt @@ -5,23 +5,47 @@ References and definitions: │ 4 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 5 │ function foo() public pure virtual returns (string memory) { │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 10 │ contract B is A { │ ┬ ┬ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ │ ╰── ref: 1 │ 12 │ function foo() public pure virtual override(A) returns (string memory) { │ ─┬─ ┬ - │ ╰──────────────────────────────────── def: 4 + │ ╰──────────────────────────────────── name: 4 │ │ │ ╰── ref: 1 13 │ return super.foo(); │ ─┬─ │ ╰─── ref: 2 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭───▶ + ┆ ┆ ┆ + 5 │ │ ╭─▶ function foo() public pure virtual returns (string memory) { + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 1 + 9 │ ╭───────▶ + ┆ ┆ ┆ + 11 │ │ ╭─────▶ // A super; + ┆ ┆ ┆ + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 4 + 15 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 3 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/this_scope/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/this_scope/generated/0.4.11-success.txt index ac355a829c..998b76d04a 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/this_scope/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/this_scope/generated/0.4.11-success.txt @@ -5,15 +5,31 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function foo() public {} │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ function bar() public returns (int) { │ ─┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ this.foo(); │ ─┬─ │ ╰─── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ function foo() public {} + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 2 + 3 │ │ ╭─▶ + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.4.11-success.txt index 24a80f6855..c0042a5eb6 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.4.11-success.txt @@ -5,9 +5,18 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 │ 3 │ revert(); │ ───┬── │ ╰──── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Test { + ┆ ┆ + 5 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.4.22-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.4.22-success.txt index 165fe5e41d..59bc4db032 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.4.22-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.4.22-success.txt @@ -5,9 +5,18 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 │ 3 │ revert(); │ ───┬── │ ╰──── refs: built-in, built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Test { + ┆ ┆ + 5 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.6.0-failure.txt index 17e5d6e85e..389182bee3 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.6.0-failure.txt @@ -15,5 +15,14 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Test { + ┆ ┆ + 5 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.6.5-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.6.5-failure.txt index 1dda92db7e..00735acb4f 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.6.5-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.6.5-failure.txt @@ -15,5 +15,14 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Test { + ┆ ┆ + 5 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.8.27-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.8.27-failure.txt index 61ee40e68c..209d18dc73 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.8.27-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/unnamed_function/generated/0.8.27-failure.txt @@ -15,5 +15,14 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Test { + ┆ ┆ + 5 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_lookup/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_lookup/generated/0.4.11-success.txt index 0af5023344..0b54100137 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_lookup/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_lookup/generated/0.4.11-success.txt @@ -5,23 +5,47 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function foo() public {} │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ function bar() public { │ ─┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 4 │ foo(); │ ─┬─ │ ╰─── ref: 5 │ 8 │ contract Derived is Base { │ ───┬─── ──┬─ - │ ╰───────────── def: 4 + │ ╰───────────── name: 4 │ │ │ ╰─── ref: 1 9 │ function foo() public {} │ ─┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract Base { + 2 │ │ │ function foo() public {} + │ │ │ ──────────────┬────────────── + │ │ │ ╰──────────────── definiens: 2 + 3 │ │ ╭─▶ function bar() public { + ┆ ┆ ┆ + 5 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 6 │ ├─│ ──▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 7 │ ╭───▶ + ┆ ┆ + 9 │ │ function foo() public {} + │ │ ──────────────┬────────────── + │ │ ╰──────────────── definiens: 5 + 10 │ ├───▶ } + │ │ + │ ╰───────── definiens: 4 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.4.11-failure.txt index 3c0c865a63..f52169df50 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.4.11-failure.txt @@ -42,32 +42,32 @@ References and definitions: │ 4 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 5 │ function foo() public pure virtual returns (string memory) { │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 10 │ contract B is A { │ ┬ ┬ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ │ ╰── ref: 1 11 │ function foo() public pure virtual override(A) returns (string memory) { │ ─┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 │ 16 │ contract C is A { │ ┬ ┬ - │ ╰─────── def: 5 + │ ╰─────── name: 5 │ │ │ ╰── ref: 1 17 │ function foo() public pure virtual override returns (string memory) { │ ─┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 │ 22 │ contract D is B, C { │ ┬ ┬ ┬ - │ ╰────────── def: 7 + │ ╰────────── name: 7 │ │ │ │ ╰───── ref: 3 │ │ @@ -75,5 +75,46 @@ References and definitions: │ 24 │ function foo() public pure override(B, C) returns (string memory) { │ ─┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭───▶ + ┆ ┆ + 5 │ │ function foo() public pure virtual returns (string memory) { + │ │ ────────────┬──────────── + │ │ ╰────────────── definiens: 2 + ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 1 + 9 │ ╭───────▶ + ┆ ┆ + 11 │ │ function foo() public pure virtual override(A) returns (string memory) { + │ │ ────────────┬──────────── + │ │ ╰────────────── definiens: 4 + ┆ ┆ + 14 │ ├─│ ────▶ } + │ │ │ + │ ╰───────────── definiens: 3 + 15 │ ╭─────▶ + ┆ ┆ + 17 │ │ function foo() public pure virtual override returns (string memory) { + │ │ ────────────┬──────────── + │ │ ╰────────────── definiens: 6 + ┆ ┆ + 20 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────── definiens: 5 + 21 │ ╭─────────▶ + ┆ ┆ ┆ + 23 │ │ ╭─▶ // D.foo() returns "C" + 24 │ │ ├─▶ function foo() public pure override(B, C) returns (string memory) { + │ │ │ + │ │ ╰───────────────────────────────────────────────────────────────────────────── definiens: 8 + ┆ ┆ + 27 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 7 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.4.16-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.4.16-failure.txt index 1a4864098f..c3585c0adb 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.4.16-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.4.16-failure.txt @@ -5,21 +5,21 @@ References and definitions: │ 4 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 5 │ function foo() public pure virtual returns (string memory) { │ ─┬─ ───┬─── - │ ╰───────────────────────── def: 2 + │ ╰───────────────────────── name: 2 │ │ │ ╰───── unresolved │ 10 │ contract B is A { │ ┬ ┬ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ │ ╰── ref: 1 11 │ function foo() public pure virtual override(A) returns (string memory) { │ ─┬─ ───┬─── ────┬─── ┬ - │ ╰──────────────────────────────────── def: 4 + │ ╰──────────────────────────────────── name: 4 │ │ │ │ │ ╰──────────────── unresolved │ │ │ @@ -29,12 +29,12 @@ References and definitions: │ 16 │ contract C is A { │ ┬ ┬ - │ ╰─────── def: 5 + │ ╰─────── name: 5 │ │ │ ╰── ref: 1 17 │ function foo() public pure virtual override returns (string memory) { │ ─┬─ ───┬─── ────┬─── - │ ╰────────────────────────────────── def: 6 + │ ╰────────────────────────────────── name: 6 │ │ │ │ ╰────────────── unresolved │ │ @@ -42,7 +42,7 @@ References and definitions: │ 22 │ contract D is B, C { │ ┬ ┬ ┬ - │ ╰────────── def: 7 + │ ╰────────── name: 7 │ │ │ │ ╰───── ref: 3 │ │ @@ -50,7 +50,7 @@ References and definitions: │ 24 │ function foo() public pure override(B, C) returns (string memory) { │ ─┬─ ────┬─── ┬ ┬ - │ ╰─────────────────────────────── def: 8 + │ ╰─────────────────────────────── name: 8 │ │ │ │ │ ╰────────── unresolved │ │ │ @@ -61,3 +61,47 @@ References and definitions: │ ─┬─ │ ╰─── ref: 6 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭───────▶ + ┆ ┆ ┆ + 5 │ │ ╭─▶ function foo() public pure virtual returns (string memory) { + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────── definiens: 1 + 9 │ ╭───────────▶ + ┆ ┆ ┆ + 11 │ │ ╭─────▶ function foo() public pure virtual override(A) returns (string memory) { + ┆ ┆ ┆ + 13 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 4 + 14 │ ├─│ ────────▶ } + │ │ │ + │ ╰───────────────── definiens: 3 + 15 │ ╭─────────▶ + ┆ ┆ ┆ + 17 │ │ ╭───▶ function foo() public pure virtual override returns (string memory) { + ┆ ┆ ┆ + 19 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 6 + 20 │ │ ├─────────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 5 + 21 │ ╭───────────────▶ + ┆ ┆ ┆ + 23 │ │ ╭─────────────▶ // D.foo() returns "C" + ┆ ┆ ┆ + 26 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 8 + 27 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 7 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.5.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.5.0-failure.txt index e3235a738e..f306f7247a 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.5.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.5.0-failure.txt @@ -33,38 +33,38 @@ References and definitions: │ 4 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 5 │ function foo() public pure virtual returns (string memory) { │ ─┬─ ───┬─── - │ ╰───────────────────────── def: 2 + │ ╰───────────────────────── name: 2 │ │ │ ╰───── unresolved │ 10 │ contract B is A { │ ┬ ┬ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ │ ╰── ref: 1 11 │ function foo() public pure virtual override(A) returns (string memory) { │ ─┬─ ───┬─── - │ ╰───────────────────────── def: 4 + │ ╰───────────────────────── name: 4 │ │ │ ╰───── unresolved │ 16 │ contract C is A { │ ┬ ┬ - │ ╰─────── def: 5 + │ ╰─────── name: 5 │ │ │ ╰── ref: 1 17 │ function foo() public pure virtual override returns (string memory) { │ ─┬─ ───┬─── - │ ╰───────────────────────── def: 6 + │ ╰───────────────────────── name: 6 │ │ │ ╰───── unresolved │ 22 │ contract D is B, C { │ ┬ ┬ ┬ - │ ╰────────── def: 7 + │ ╰────────── name: 7 │ │ │ │ ╰───── ref: 3 │ │ @@ -72,5 +72,47 @@ References and definitions: │ 24 │ function foo() public pure override(B, C) returns (string memory) { │ ─┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭─────▶ + ┆ ┆ ┆ + 5 │ │ ╭───▶ function foo() public pure virtual returns (string memory) { + ┆ ┆ ┆ + 7 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 8 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────── definiens: 1 + 9 │ ╭─────────▶ + ┆ ┆ + 11 │ │ function foo() public pure virtual override(A) returns (string memory) { + │ │ ───────────────────┬────────────────── + │ │ ╰──────────────────── definiens: 4 + ┆ ┆ + 14 │ ├─│ ──────▶ } + │ │ │ + │ ╰─────────────── definiens: 3 + 15 │ ╭───────▶ + ┆ ┆ + 17 │ │ function foo() public pure virtual override returns (string memory) { + │ │ ───────────────────┬────────────────── + │ │ ╰──────────────────── definiens: 6 + ┆ ┆ + 20 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 21 │ ╭───────────▶ + ┆ ┆ ┆ + 23 │ │ ╭─▶ // D.foo() returns "C" + 24 │ │ ├─▶ function foo() public pure override(B, C) returns (string memory) { + │ │ │ + │ │ ╰───────────────────────────────────────────────────────────────────────────── definiens: 8 + ┆ ┆ + 27 │ ├───────────▶ } + │ │ + │ ╰───────────────── definiens: 7 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.6.0-success.txt index c5f1386460..0a4d7f0572 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/virtual_methods/generated/0.6.0-success.txt @@ -5,34 +5,34 @@ References and definitions: │ 4 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 5 │ function foo() public pure virtual returns (string memory) { │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 10 │ contract B is A { │ ┬ ┬ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ │ ╰── ref: 1 11 │ function foo() public pure virtual override(A) returns (string memory) { │ ─┬─ ┬ - │ ╰──────────────────────────────────── def: 4 + │ ╰──────────────────────────────────── name: 4 │ │ │ ╰── ref: 1 │ 16 │ contract C is A { │ ┬ ┬ - │ ╰─────── def: 5 + │ ╰─────── name: 5 │ │ │ ╰── ref: 1 17 │ function foo() public pure virtual override returns (string memory) { │ ─┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 │ 22 │ contract D is B, C { │ ┬ ┬ ┬ - │ ╰────────── def: 7 + │ ╰────────── name: 7 │ │ │ │ ╰───── ref: 3 │ │ @@ -40,7 +40,7 @@ References and definitions: │ 24 │ function foo() public pure override(B, C) returns (string memory) { │ ─┬─ ┬ ┬ - │ ╰─────────────────────────────── def: 8 + │ ╰─────────────────────────────── name: 8 │ │ │ │ ╰───── ref: 3 │ │ @@ -49,3 +49,47 @@ References and definitions: │ ─┬─ │ ╰─── ref: 6 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭───────▶ + ┆ ┆ ┆ + 5 │ │ ╭─▶ function foo() public pure virtual returns (string memory) { + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────── definiens: 1 + 9 │ ╭───────────▶ + ┆ ┆ ┆ + 11 │ │ ╭─────▶ function foo() public pure virtual override(A) returns (string memory) { + ┆ ┆ ┆ + 13 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 4 + 14 │ ├─│ ────────▶ } + │ │ │ + │ ╰───────────────── definiens: 3 + 15 │ ╭─────────▶ + ┆ ┆ ┆ + 17 │ │ ╭───▶ function foo() public pure virtual override returns (string memory) { + ┆ ┆ ┆ + 19 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 6 + 20 │ │ ├─────────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 5 + 21 │ ╭───────────────▶ + ┆ ┆ ┆ + 23 │ │ ╭─────────────▶ // D.foo() returns "C" + ┆ ┆ ┆ + 26 │ │ ├─────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 8 + 27 │ ├───────────────▶ } + │ │ + │ ╰───────────────────── definiens: 7 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/contracts/visibility/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/contracts/visibility/generated/0.4.11-success.txt index 38cf26499b..3ef328cc0a 100644 --- a/crates/solidity/testing/snapshots/bindings_output/contracts/visibility/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/contracts/visibility/generated/0.4.11-success.txt @@ -5,34 +5,34 @@ References and definitions: │ 1 │ contract First { │ ──┬── - │ ╰──── def: 1 + │ ╰──── name: 1 2 │ enum Choice { One, Two } │ ───┬── ─┬─ ─┬─ - │ ╰─────────────── def: 2 + │ ╰─────────────── name: 2 │ │ │ - │ ╰──────── def: 3 + │ ╰──────── name: 3 │ │ - │ ╰─── def: 4 + │ ╰─── name: 4 │ 4 │ int x; │ ┬ - │ ╰── def: 5 + │ ╰── name: 5 5 │ Choice choice; │ ───┬── ───┬── │ ╰─────────── ref: 2 │ │ - │ ╰──── def: 6 + │ ╰──── name: 6 │ 7 │ function get_x() public returns (int) { │ ──┬── - │ ╰──── def: 7 + │ ╰──── name: 7 8 │ return x; │ ┬ │ ╰── ref: 5 │ 11 │ function get_choice() public returns (Choice) { │ ─────┬──── ───┬── - │ ╰─────────────────────────────── def: 8 + │ ╰─────────────────────────────── name: 8 │ │ │ ╰──── ref: 2 12 │ return choice; @@ -41,18 +41,18 @@ References and definitions: │ 16 │ contract Second { │ ───┬── - │ ╰──── def: 9 + │ ╰──── name: 9 17 │ First.Choice choice; │ ──┬── ───┬── ───┬── │ ╰────────────────── ref: 1 │ │ │ │ ╰─────────── ref: 2 │ │ - │ ╰──── def: 10 + │ ╰──── name: 10 │ 19 │ function get_choice() public returns (First.Choice) { │ ─────┬──── ──┬── ───┬── - │ ╰───────────────────────────────────── def: 11 + │ ╰───────────────────────────────────── name: 11 │ │ │ │ ╰─────────── ref: 1 │ │ @@ -61,3 +61,48 @@ References and definitions: │ ───┬── │ ╰──── ref: 10 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───────────▶ contract First { + 2 │ │ │ enum Choice { One, Two } + │ │ │ ──────────────┬────┬────┬──── + │ │ │ ╰──────────────── definiens: 2 + │ │ │ │ │ + │ │ │ ╰─────────── definiens: 3 + │ │ │ │ + │ │ │ ╰────── definiens: 4 + 3 │ │ ╭─▶ + 4 │ │ ├─▶ int x; + │ │ │ + │ │ ╰──────────────── definiens: 5 + 5 │ │ │ Choice choice; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 6 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 9 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 7 + 10 │ │ ╭─────▶ + ┆ ┆ ┆ + 13 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 8 + 14 │ ├─│ ────────▶ } + │ │ │ + │ ╰───────────────── definiens: 1 + 15 │ ╭─────────▶ + ┆ ┆ + 17 │ │ │ First.Choice choice; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 10 + 18 │ │ ╭───────▶ + ┆ ┆ ┆ + 21 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────────── definiens: 11 + 22 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 9 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/emit_event/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/control/emit_event/generated/0.4.11-failure.txt index 953a9212d2..0c9995680f 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/emit_event/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/emit_event/generated/0.4.11-failure.txt @@ -13,23 +13,48 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ event TestEvent(int id); │ ────┬──── ─┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ function test_emit() public { │ ────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 5 │ int x = 1; │ ┬ - │ ╰── def: 5 + │ ╰── name: 5 │ 7 │ emit TestEvent(x); │ ──┬─ ────┬──── │ ╰───────────── unresolved │ │ - │ ╰────── def: 6 + │ ╰────── name: 6 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract Test { + 2 │ │ │ event TestEvent(int id); + │ │ │ ──────────────┬────────┬───── + │ │ │ ╰──────────────── definiens: 2 + │ │ │ │ + │ │ │ ╰─────── definiens: 3 + 3 │ │ ╭───▶ + ┆ ┆ ┆ + 5 │ │ │ │ int x = 1; + │ │ │ │ ─────────┬───────── + │ │ │ │ ╰─────────── definiens: 5 + 6 │ │ │ ╭─▶ + 7 │ │ │ ├─▶ emit TestEvent(x); + │ │ │ │ + │ │ │ ╰──────────────────────────────── definiens: 6 + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 4 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/emit_event/generated/0.4.21-success.txt b/crates/solidity/testing/snapshots/bindings_output/control/emit_event/generated/0.4.21-success.txt index 68ef83be3c..a159a48289 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/emit_event/generated/0.4.21-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/emit_event/generated/0.4.21-success.txt @@ -5,19 +5,19 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ event TestEvent(int id); │ ────┬──── ─┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ function test_emit() public { │ ────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 5 │ int x = 1; │ ┬ - │ ╰── def: 5 + │ ╰── name: 5 │ 7 │ emit TestEvent(x); │ ────┬──── ┬ @@ -25,3 +25,25 @@ References and definitions: │ │ │ ╰── ref: 5 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ event TestEvent(int id); + │ │ │ ──────────────┬────────┬───── + │ │ │ ╰──────────────── definiens: 2 + │ │ │ │ + │ │ │ ╰─────── definiens: 3 + 3 │ │ ╭─▶ + ┆ ┆ ┆ + 5 │ │ │ int x = 1; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 5 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 4 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/for_empty_clauses/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/control/for_empty_clauses/generated/0.4.11-success.txt index 62fbe94bad..b97f74ac68 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/for_empty_clauses/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/for_empty_clauses/generated/0.4.11-success.txt @@ -5,13 +5,13 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ int i = 1; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 │ 5 │ if (i > 10) break; │ ┬ @@ -20,3 +20,19 @@ References and definitions: │ ┬ │ ╰── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + 3 │ │ │ int i = 1; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 3 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/for_empty_cond/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/control/for_empty_cond/generated/0.4.11-success.txt index a308055695..7b75a4d17f 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/for_empty_cond/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/for_empty_cond/generated/0.4.11-success.txt @@ -5,16 +5,16 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ int x = 1; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ for (int i = 0;; i++) { │ ┬ ┬ - │ ╰────────── def: 4 + │ ╰────────── name: 4 │ │ │ ╰── ref: 4 5 │ x = x * 2; @@ -26,3 +26,22 @@ References and definitions: │ ┬ │ ╰── ref: 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + 3 │ │ │ int x = 1; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ │ for (int i = 0;; i++) { + │ │ │ ─────┬──── + │ │ │ ╰────── definiens: 4 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/for_empty_init/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/control/for_empty_init/generated/0.4.11-success.txt index a79a82928b..9d56df668c 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/for_empty_init/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/for_empty_init/generated/0.4.11-success.txt @@ -5,16 +5,16 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test_for_empty_init() public { │ ─────────┬───────── - │ ╰─────────── def: 2 + │ ╰─────────── name: 2 3 │ int i = 1; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ int x = 0; │ ┬ - │ ╰── def: 4 + │ ╰── name: 4 5 │ for (; i < 10; i++) { │ ┬ ┬ │ ╰────────── ref: 3 @@ -26,3 +26,22 @@ References and definitions: │ │ │ ╰── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test_for_empty_init() public { + 3 │ │ │ int i = 1; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ │ int x = 0; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 4 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/for_expr_init/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/control/for_expr_init/generated/0.4.11-success.txt index a1fcde8240..9d9c1d6d90 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/for_expr_init/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/for_expr_init/generated/0.4.11-success.txt @@ -5,16 +5,16 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test_non_decl_init() public { │ ─────────┬──────── - │ ╰────────── def: 2 + │ ╰────────── name: 2 3 │ int z; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ int w = 0; │ ┬ - │ ╰── def: 4 + │ ╰── name: 4 5 │ for (z = 10; z > 0; w += z) { │ ┬ ┬ ┬ ┬ │ ╰────────────────────── ref: 3 @@ -28,3 +28,22 @@ References and definitions: │ ┬ │ ╰── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test_non_decl_init() public { + 3 │ │ │ int z; + │ │ │ ───────┬─────── + │ │ │ ╰───────── definiens: 3 + 4 │ │ │ int w = 0; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 4 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/for_stmt/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/control/for_stmt/generated/0.4.11-success.txt index 6377c326d8..85830f2fd9 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/for_stmt/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/for_stmt/generated/0.4.11-success.txt @@ -5,19 +5,19 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ int x = 1; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ int y = 0; │ ┬ - │ ╰── def: 4 + │ ╰── name: 4 5 │ for (int i = x - 1; i < 10 && x < 500; i++) { │ ┬ ┬ ┬ ┬ ┬ - │ ╰──────────────────────────────── def: 5 + │ ╰──────────────────────────────── name: 5 │ │ │ │ │ │ ╰──────────────────────────── ref: 3 │ │ │ │ @@ -39,3 +39,25 @@ References and definitions: │ │ │ ╰── ref: 5 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + 3 │ │ │ int x = 1; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ │ int y = 0; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 4 + 5 │ │ │ for (int i = x - 1; i < 10 && x < 500; i++) { + │ │ │ ───────┬────── + │ │ │ ╰──────── definiens: 5 + ┆ ┆ ┆ + 9 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 10 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/for_tuple_init/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/control/for_tuple_init/generated/0.4.11-success.txt index fcf9c61bbe..5037d852ad 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/for_tuple_init/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/for_tuple_init/generated/0.4.11-success.txt @@ -5,18 +5,18 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ int b = 1; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ for ((int i, int a) = (0, b); i < 10; i++) { │ ┬ ┬ ┬ ┬ ┬ - │ ╰────────────────────────────── def: 4 + │ ╰────────────────────────────── name: 4 │ │ │ │ │ - │ ╰─────────────────────── def: 5 + │ ╰─────────────────────── name: 5 │ │ │ │ │ ╰────────────── ref: 3 │ │ │ @@ -36,3 +36,24 @@ References and definitions: │ │ │ ╰── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + 3 │ │ │ int b = 1; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ │ for ((int i, int a) = (0, b); i < 10; i++) { + │ │ │ ──┬── ───┬── + │ │ │ ╰─────────── definiens: 4 + │ │ │ │ + │ │ │ ╰──── definiens: 5 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/if_else/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/control/if_else/generated/0.4.11-success.txt index b096844b53..e2e906332c 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/if_else/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/if_else/generated/0.4.11-success.txt @@ -5,22 +5,22 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public returns (int) { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ int x = 1; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ int y = 2; │ ┬ - │ ╰── def: 4 + │ ╰── name: 4 5 │ if (x > 1) { │ ┬ │ ╰── ref: 3 6 │ int z = 3; │ ┬ - │ ╰── def: 5 + │ ╰── name: 5 7 │ y = x + 10; │ ┬ ┬ │ ╰────── ref: 4 @@ -29,7 +29,7 @@ References and definitions: │ 9 │ int w = 4; │ ┬ - │ ╰── def: 6 + │ ╰── name: 6 10 │ y = x + 20; │ ┬ ┬ │ ╰────── ref: 4 @@ -38,7 +38,7 @@ References and definitions: │ 12 │ int r = x + y; │ ┬ ┬ ┬ - │ ╰────────── def: 7 + │ ╰────────── name: 7 │ │ │ │ ╰────── ref: 3 │ │ @@ -47,3 +47,34 @@ References and definitions: │ ┬ │ ╰── ref: 7 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public returns (int) { + 3 │ │ │ int x = 1; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ │ int y = 2; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 4 + ┆ ┆ ┆ + 6 │ │ │ int z = 3; + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────── definiens: 5 + ┆ ┆ ┆ + 9 │ │ │ int w = 4; + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────── definiens: 6 + ┆ ┆ ┆ + 12 │ │ │ int r = x + y; + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────── definiens: 7 + ┆ ┆ ┆ + 14 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 15 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.4.11-failure.txt new file mode 100644 index 0000000000..dc7392544f --- /dev/null +++ b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.4.11-failure.txt @@ -0,0 +1,43 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Parse errors: +Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or SuperKeyword or ThisKeyword or ThrowKeyword or TrueKeyword or UfixedKeyword or UintKeyword or VarKeyword or WhileKeyword. + ╭─[input.sol:5:9] + │ + 5 │ ╭─▶ try new Foo() { + ┆ ┆ + 11 │ ├─▶ } + │ │ + │ ╰─────────── Error occurred here. +────╯ +References and definitions: + ╭─[input.sol:1:1] + │ + 1 │ contract Foo {} + │ ─┬─ + │ ╰─── name: 1 + │ + 3 │ contract Test { + │ ──┬─ + │ ╰─── name: 2 + 4 │ function test() public { + │ ──┬─ + │ ╰─── name: 3 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ contract Foo {} + │ │ ────────┬─────── + │ │ ╰───────── definiens: 1 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 11 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 12 │ ├───▶ } + │ │ + │ ╰───────── definiens: 2 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.4.21-failure.txt b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.4.21-failure.txt new file mode 100644 index 0000000000..feddd39a59 --- /dev/null +++ b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.4.21-failure.txt @@ -0,0 +1,43 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Parse errors: +Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or SuperKeyword or ThisKeyword or ThrowKeyword or TrueKeyword or UfixedKeyword or UintKeyword or VarKeyword or WhileKeyword. + ╭─[input.sol:5:9] + │ + 5 │ ╭─▶ try new Foo() { + ┆ ┆ + 11 │ ├─▶ } + │ │ + │ ╰─────────── Error occurred here. +────╯ +References and definitions: + ╭─[input.sol:1:1] + │ + 1 │ contract Foo {} + │ ─┬─ + │ ╰─── name: 1 + │ + 3 │ contract Test { + │ ──┬─ + │ ╰─── name: 2 + 4 │ function test() public { + │ ──┬─ + │ ╰─── name: 3 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ contract Foo {} + │ │ ────────┬─────── + │ │ ╰───────── definiens: 1 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 11 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 12 │ ├───▶ } + │ │ + │ ╰───────── definiens: 2 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.5.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.5.0-failure.txt new file mode 100644 index 0000000000..40fb5cb9dd --- /dev/null +++ b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.5.0-failure.txt @@ -0,0 +1,43 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Parse errors: +Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or SuperKeyword or ThisKeyword or TrueKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + ╭─[input.sol:5:9] + │ + 5 │ ╭─▶ try new Foo() { + ┆ ┆ + 11 │ ├─▶ } + │ │ + │ ╰─────────── Error occurred here. +────╯ +References and definitions: + ╭─[input.sol:1:1] + │ + 1 │ contract Foo {} + │ ─┬─ + │ ╰─── name: 1 + │ + 3 │ contract Test { + │ ──┬─ + │ ╰─── name: 2 + 4 │ function test() public { + │ ──┬─ + │ ╰─── name: 3 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ contract Foo {} + │ │ ────────┬─────── + │ │ ╰───────── definiens: 1 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 11 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 12 │ ├───▶ } + │ │ + │ ╰───────── definiens: 2 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.5.3-failure.txt b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.5.3-failure.txt new file mode 100644 index 0000000000..baeb49df53 --- /dev/null +++ b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.5.3-failure.txt @@ -0,0 +1,43 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +Parse errors: +Error: Expected AddressKeyword or AssemblyKeyword or BoolKeyword or BreakKeyword or ByteKeyword or BytesKeyword or CloseBrace or ContinueKeyword or DecimalLiteral or DoKeyword or DoubleQuotedHexStringLiteral or DoubleQuotedStringLiteral or EmitKeyword or FalseKeyword or FixedKeyword or ForKeyword or FunctionKeyword or HexLiteral or Identifier or IfKeyword or IntKeyword or MappingKeyword or NewKeyword or OpenBrace or OpenBracket or OpenParen or ReturnKeyword or SingleQuotedHexStringLiteral or SingleQuotedStringLiteral or StringKeyword or SuperKeyword or ThisKeyword or TrueKeyword or TypeKeyword or UfixedKeyword or UintKeyword or WhileKeyword. + ╭─[input.sol:5:9] + │ + 5 │ ╭─▶ try new Foo() { + ┆ ┆ + 11 │ ├─▶ } + │ │ + │ ╰─────────── Error occurred here. +────╯ +References and definitions: + ╭─[input.sol:1:1] + │ + 1 │ contract Foo {} + │ ─┬─ + │ ╰─── name: 1 + │ + 3 │ contract Test { + │ ──┬─ + │ ╰─── name: 2 + 4 │ function test() public { + │ ──┬─ + │ ╰─── name: 3 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ contract Foo {} + │ │ ────────┬─────── + │ │ ╰───────── definiens: 1 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 11 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 12 │ ├───▶ } + │ │ + │ ╰───────── definiens: 2 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.6.0-success.txt new file mode 100644 index 0000000000..92f295ee1d --- /dev/null +++ b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/generated/0.6.0-success.txt @@ -0,0 +1,60 @@ +# This file is generated automatically by infrastructure scripts. Please don't edit by hand. + +References and definitions: + ╭─[input.sol:1:1] + │ + 1 │ contract Foo {} + │ ─┬─ + │ ╰─── name: 1 + │ + 3 │ contract Test { + │ ──┬─ + │ ╰─── name: 2 + 4 │ function test() public { + │ ──┬─ + │ ╰─── name: 3 + 5 │ try new Foo() { + │ ─┬─ + │ ╰─── ref: 1 + 6 │ } catch Panic(uint code) { + │ ──┬── ──┬─ + │ ╰────────────── ref: built-in + │ │ + │ ╰─── name: 4 + 7 │ code; + │ ──┬─ + │ ╰─── ref: 4 + 8 │ } catch Error(string memory message) { + │ ──┬── ───┬─── + │ ╰────────────────────────── ref: built-in + │ │ + │ ╰───── name: 5 + 9 │ message; + │ ───┬─── + │ ╰───── ref: 5 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ contract Foo {} + │ │ ────────┬─────── + │ │ ╰───────── definiens: 1 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 6 │ │ │ } catch Panic(uint code) { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 4 + ┆ ┆ ┆ + 8 │ │ │ } catch Error(string memory message) { + │ │ │ ──────────┬────────── + │ │ │ ╰──────────── definiens: 5 + ┆ ┆ ┆ + 11 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 12 │ ├───▶ } + │ │ + │ ╰───────── definiens: 2 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/try_catch/input.sol b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/input.sol new file mode 100644 index 0000000000..8ec6ee2c41 --- /dev/null +++ b/crates/solidity/testing/snapshots/bindings_output/control/try_catch/input.sol @@ -0,0 +1,12 @@ +contract Foo {} + +contract Test { + function test() public { + try new Foo() { + } catch Panic(uint code) { + code; + } catch Error(string memory message) { + message; + } + } +} diff --git a/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.4.11-failure.txt index 43b18bbf76..528d57a856 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.4.11-failure.txt @@ -15,38 +15,79 @@ References and definitions: │ 1 │ interface DataFeed { function getData(address token) external returns (uint value); } │ ────┬─── ───┬─── ──┬── ──┬── - │ ╰──────────────────────────────────────────────────────────────────── def: 1 + │ ╰──────────────────────────────────────────────────────────────────── name: 1 │ │ │ │ - │ ╰───────────────────────────────────────────────── def: 2 + │ ╰───────────────────────────────────────────────── name: 2 │ │ │ - │ ╰────────────────────────────────── def: 3 + │ ╰────────────────────────────────── name: 3 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 │ 3 │ contract FeedConsumer { │ ──────┬───── - │ ╰─────── def: 5 + │ ╰─────── name: 5 4 │ DataFeed feed; │ ────┬─── ──┬─ │ ╰────────── ref: 1 │ │ - │ ╰─── def: 6 + │ ╰─── name: 6 5 │ uint errorCount; │ ─────┬──── - │ ╰────── def: 7 + │ ╰────── name: 7 6 │ uint lastValue; │ ────┬──── - │ ╰────── def: 8 + │ ╰────── name: 8 7 │ function rate(address token) public returns (uint value, bool success) { │ ──┬─ ──┬── ──┬── ───┬─── - │ ╰─────────────────────────────────────────────────────────── def: 9 + │ ╰─────────────────────────────────────────────────────────── name: 9 │ │ │ │ - │ ╰────────────────────────────────────────────── def: 10 + │ ╰────────────────────────────────────────────── name: 10 │ │ │ - │ ╰────────────────── def: 11 + │ ╰────────────────── name: 11 │ │ - │ ╰───── def: 12 + │ ╰───── name: 12 8 │ string memory last_reason; │ ─────┬───── - │ ╰─────── def: 13 + │ ╰─────── name: 13 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ interface DataFeed { function getData(address token) external returns (uint value); } + │ │ ───────────────────────────────────────────┬┬──────┬────────────────────────┬───────── + │ │ ╰──────────────────────────────────────────── definiens: 1 + │ │ │ │ │ + │ │ ╰─────────────────────────────────────────── definiens: 3 + │ │ │ │ + │ │ ╰──────────────────────────────────── definiens: 2 + │ │ │ + │ │ ╰─────────── definiens: 4 + 2 │ ╭───▶ + ┆ ┆ + 4 │ │ DataFeed feed; + │ │ ─────────┬───────── + │ │ ╰─────────── definiens: 6 + 5 │ │ uint errorCount; + │ │ ──────────┬────────── + │ │ ╰──────────── definiens: 7 + 6 │ │ │ uint lastValue; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 8 + 7 │ │ ╭─▶ function rate(address token) public returns (uint value, bool success) { + │ │ │ ──────┬────── ─────┬──── ──────┬────── + │ │ │ ╰────────────────────────────────────────────────── definiens: 10 + │ │ │ │ │ + │ │ │ ╰──────────────────── definiens: 11 + │ │ │ │ + │ │ │ ╰──────── definiens: 12 + 8 │ │ │ string memory last_reason; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + ┆ ┆ ┆ + 20 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 9 + 21 │ ├───▶ } + │ │ + │ ╰───────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.4.21-failure.txt b/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.4.21-failure.txt index 664909f10d..e3b7ed29a4 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.4.21-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.4.21-failure.txt @@ -15,38 +15,79 @@ References and definitions: │ 1 │ interface DataFeed { function getData(address token) external returns (uint value); } │ ────┬─── ───┬─── ──┬── ──┬── - │ ╰──────────────────────────────────────────────────────────────────── def: 1 + │ ╰──────────────────────────────────────────────────────────────────── name: 1 │ │ │ │ - │ ╰───────────────────────────────────────────────── def: 2 + │ ╰───────────────────────────────────────────────── name: 2 │ │ │ - │ ╰────────────────────────────────── def: 3 + │ ╰────────────────────────────────── name: 3 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 │ 3 │ contract FeedConsumer { │ ──────┬───── - │ ╰─────── def: 5 + │ ╰─────── name: 5 4 │ DataFeed feed; │ ────┬─── ──┬─ │ ╰────────── ref: 1 │ │ - │ ╰─── def: 6 + │ ╰─── name: 6 5 │ uint errorCount; │ ─────┬──── - │ ╰────── def: 7 + │ ╰────── name: 7 6 │ uint lastValue; │ ────┬──── - │ ╰────── def: 8 + │ ╰────── name: 8 7 │ function rate(address token) public returns (uint value, bool success) { │ ──┬─ ──┬── ──┬── ───┬─── - │ ╰─────────────────────────────────────────────────────────── def: 9 + │ ╰─────────────────────────────────────────────────────────── name: 9 │ │ │ │ - │ ╰────────────────────────────────────────────── def: 10 + │ ╰────────────────────────────────────────────── name: 10 │ │ │ - │ ╰────────────────── def: 11 + │ ╰────────────────── name: 11 │ │ - │ ╰───── def: 12 + │ ╰───── name: 12 8 │ string memory last_reason; │ ─────┬───── - │ ╰─────── def: 13 + │ ╰─────── name: 13 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ interface DataFeed { function getData(address token) external returns (uint value); } + │ │ ───────────────────────────────────────────┬┬──────┬────────────────────────┬───────── + │ │ ╰──────────────────────────────────────────── definiens: 1 + │ │ │ │ │ + │ │ ╰─────────────────────────────────────────── definiens: 3 + │ │ │ │ + │ │ ╰──────────────────────────────────── definiens: 2 + │ │ │ + │ │ ╰─────────── definiens: 4 + 2 │ ╭───▶ + ┆ ┆ + 4 │ │ DataFeed feed; + │ │ ─────────┬───────── + │ │ ╰─────────── definiens: 6 + 5 │ │ uint errorCount; + │ │ ──────────┬────────── + │ │ ╰──────────── definiens: 7 + 6 │ │ │ uint lastValue; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 8 + 7 │ │ ╭─▶ function rate(address token) public returns (uint value, bool success) { + │ │ │ ──────┬────── ─────┬──── ──────┬────── + │ │ │ ╰────────────────────────────────────────────────── definiens: 10 + │ │ │ │ │ + │ │ │ ╰──────────────────── definiens: 11 + │ │ │ │ + │ │ │ ╰──────── definiens: 12 + 8 │ │ │ string memory last_reason; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + ┆ ┆ ┆ + 20 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 9 + 21 │ ├───▶ } + │ │ + │ ╰───────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.5.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.5.0-failure.txt index a3a84d1866..693a0d898f 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.5.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.5.0-failure.txt @@ -15,38 +15,79 @@ References and definitions: │ 1 │ interface DataFeed { function getData(address token) external returns (uint value); } │ ────┬─── ───┬─── ──┬── ──┬── - │ ╰──────────────────────────────────────────────────────────────────── def: 1 + │ ╰──────────────────────────────────────────────────────────────────── name: 1 │ │ │ │ - │ ╰───────────────────────────────────────────────── def: 2 + │ ╰───────────────────────────────────────────────── name: 2 │ │ │ - │ ╰────────────────────────────────── def: 3 + │ ╰────────────────────────────────── name: 3 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 │ 3 │ contract FeedConsumer { │ ──────┬───── - │ ╰─────── def: 5 + │ ╰─────── name: 5 4 │ DataFeed feed; │ ────┬─── ──┬─ │ ╰────────── ref: 1 │ │ - │ ╰─── def: 6 + │ ╰─── name: 6 5 │ uint errorCount; │ ─────┬──── - │ ╰────── def: 7 + │ ╰────── name: 7 6 │ uint lastValue; │ ────┬──── - │ ╰────── def: 8 + │ ╰────── name: 8 7 │ function rate(address token) public returns (uint value, bool success) { │ ──┬─ ──┬── ──┬── ───┬─── - │ ╰─────────────────────────────────────────────────────────── def: 9 + │ ╰─────────────────────────────────────────────────────────── name: 9 │ │ │ │ - │ ╰────────────────────────────────────────────── def: 10 + │ ╰────────────────────────────────────────────── name: 10 │ │ │ - │ ╰────────────────── def: 11 + │ ╰────────────────── name: 11 │ │ - │ ╰───── def: 12 + │ ╰───── name: 12 8 │ string memory last_reason; │ ─────┬───── - │ ╰─────── def: 13 + │ ╰─────── name: 13 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ interface DataFeed { function getData(address token) external returns (uint value); } + │ │ ───────────────────────────────────────────┬┬──────┬────────────────────────┬───────── + │ │ ╰──────────────────────────────────────────── definiens: 1 + │ │ │ │ │ + │ │ ╰─────────────────────────────────────────── definiens: 3 + │ │ │ │ + │ │ ╰──────────────────────────────────── definiens: 2 + │ │ │ + │ │ ╰─────────── definiens: 4 + 2 │ ╭───▶ + ┆ ┆ + 4 │ │ DataFeed feed; + │ │ ─────────┬───────── + │ │ ╰─────────── definiens: 6 + 5 │ │ uint errorCount; + │ │ ──────────┬────────── + │ │ ╰──────────── definiens: 7 + 6 │ │ │ uint lastValue; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 8 + 7 │ │ ╭─▶ function rate(address token) public returns (uint value, bool success) { + │ │ │ ──────┬────── ─────┬──── ──────┬────── + │ │ │ ╰────────────────────────────────────────────────── definiens: 10 + │ │ │ │ │ + │ │ │ ╰──────────────────── definiens: 11 + │ │ │ │ + │ │ │ ╰──────── definiens: 12 + 8 │ │ │ string memory last_reason; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + ┆ ┆ ┆ + 20 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 9 + 21 │ ├───▶ } + │ │ + │ ╰───────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.5.3-failure.txt b/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.5.3-failure.txt index e29b997e49..3183268410 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.5.3-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.5.3-failure.txt @@ -15,38 +15,79 @@ References and definitions: │ 1 │ interface DataFeed { function getData(address token) external returns (uint value); } │ ────┬─── ───┬─── ──┬── ──┬── - │ ╰──────────────────────────────────────────────────────────────────── def: 1 + │ ╰──────────────────────────────────────────────────────────────────── name: 1 │ │ │ │ - │ ╰───────────────────────────────────────────────── def: 2 + │ ╰───────────────────────────────────────────────── name: 2 │ │ │ - │ ╰────────────────────────────────── def: 3 + │ ╰────────────────────────────────── name: 3 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 │ 3 │ contract FeedConsumer { │ ──────┬───── - │ ╰─────── def: 5 + │ ╰─────── name: 5 4 │ DataFeed feed; │ ────┬─── ──┬─ │ ╰────────── ref: 1 │ │ - │ ╰─── def: 6 + │ ╰─── name: 6 5 │ uint errorCount; │ ─────┬──── - │ ╰────── def: 7 + │ ╰────── name: 7 6 │ uint lastValue; │ ────┬──── - │ ╰────── def: 8 + │ ╰────── name: 8 7 │ function rate(address token) public returns (uint value, bool success) { │ ──┬─ ──┬── ──┬── ───┬─── - │ ╰─────────────────────────────────────────────────────────── def: 9 + │ ╰─────────────────────────────────────────────────────────── name: 9 │ │ │ │ - │ ╰────────────────────────────────────────────── def: 10 + │ ╰────────────────────────────────────────────── name: 10 │ │ │ - │ ╰────────────────── def: 11 + │ ╰────────────────── name: 11 │ │ - │ ╰───── def: 12 + │ ╰───── name: 12 8 │ string memory last_reason; │ ─────┬───── - │ ╰─────── def: 13 + │ ╰─────── name: 13 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ interface DataFeed { function getData(address token) external returns (uint value); } + │ │ ───────────────────────────────────────────┬┬──────┬────────────────────────┬───────── + │ │ ╰──────────────────────────────────────────── definiens: 1 + │ │ │ │ │ + │ │ ╰─────────────────────────────────────────── definiens: 3 + │ │ │ │ + │ │ ╰──────────────────────────────────── definiens: 2 + │ │ │ + │ │ ╰─────────── definiens: 4 + 2 │ ╭───▶ + ┆ ┆ + 4 │ │ DataFeed feed; + │ │ ─────────┬───────── + │ │ ╰─────────── definiens: 6 + 5 │ │ uint errorCount; + │ │ ──────────┬────────── + │ │ ╰──────────── definiens: 7 + 6 │ │ │ uint lastValue; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 8 + 7 │ │ ╭─▶ function rate(address token) public returns (uint value, bool success) { + │ │ │ ──────┬────── ─────┬──── ──────┬────── + │ │ │ ╰────────────────────────────────────────────────── definiens: 10 + │ │ │ │ │ + │ │ │ ╰──────────────────── definiens: 11 + │ │ │ │ + │ │ │ ╰──────── definiens: 12 + 8 │ │ │ string memory last_reason; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + ┆ ┆ ┆ + 20 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 9 + 21 │ ├───▶ } + │ │ + │ ╰───────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.6.0-success.txt index 3f79f5ad31..23db9c0af2 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/try_stmt/generated/0.6.0-success.txt @@ -5,40 +5,40 @@ References and definitions: │ 1 │ interface DataFeed { function getData(address token) external returns (uint value); } │ ────┬─── ───┬─── ──┬── ──┬── - │ ╰──────────────────────────────────────────────────────────────────── def: 1 + │ ╰──────────────────────────────────────────────────────────────────── name: 1 │ │ │ │ - │ ╰───────────────────────────────────────────────── def: 2 + │ ╰───────────────────────────────────────────────── name: 2 │ │ │ - │ ╰────────────────────────────────── def: 3 + │ ╰────────────────────────────────── name: 3 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 │ 3 │ contract FeedConsumer { │ ──────┬───── - │ ╰─────── def: 5 + │ ╰─────── name: 5 4 │ DataFeed feed; │ ────┬─── ──┬─ │ ╰────────── ref: 1 │ │ - │ ╰─── def: 6 + │ ╰─── name: 6 5 │ uint errorCount; │ ─────┬──── - │ ╰────── def: 7 + │ ╰────── name: 7 6 │ uint lastValue; │ ────┬──── - │ ╰────── def: 8 + │ ╰────── name: 8 7 │ function rate(address token) public returns (uint value, bool success) { │ ──┬─ ──┬── ──┬── ───┬─── - │ ╰─────────────────────────────────────────────────────────── def: 9 + │ ╰─────────────────────────────────────────────────────────── name: 9 │ │ │ │ - │ ╰────────────────────────────────────────────── def: 10 + │ ╰────────────────────────────────────────────── name: 10 │ │ │ - │ ╰────────────────── def: 11 + │ ╰────────────────── name: 11 │ │ - │ ╰───── def: 12 + │ ╰───── name: 12 8 │ string memory last_reason; │ ─────┬───── - │ ╰─────── def: 13 + │ ╰─────── name: 13 9 │ try feed.getData(token) returns (uint v) { │ ──┬─ ───┬─── ──┬── ┬ │ ╰────────────────────────────────── ref: 6 @@ -47,7 +47,7 @@ References and definitions: │ │ │ │ ╰───────────────────── ref: 10 │ │ - │ ╰── def: 14 + │ ╰── name: 14 10 │ lastValue = v; │ ────┬──── ┬ │ ╰────────── ref: 8 @@ -57,8 +57,10 @@ References and definitions: │ ┬ │ ╰── ref: 14 12 │ } catch Error(string memory reason) { - │ ───┬── - │ ╰──── def: 15 + │ ──┬── ───┬── + │ ╰───────────────────────── ref: built-in + │ │ + │ ╰──── name: 15 13 │ last_reason = reason; │ ─────┬───── ───┬── │ ╰──────────────── ref: 13 @@ -72,3 +74,51 @@ References and definitions: │ ─────┬──── │ ╰────── ref: 7 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ interface DataFeed { function getData(address token) external returns (uint value); } + │ │ ───────────────────────────────────────────┬┬──────┬────────────────────────┬───────── + │ │ ╰──────────────────────────────────────────── definiens: 1 + │ │ │ │ │ + │ │ ╰─────────────────────────────────────────── definiens: 3 + │ │ │ │ + │ │ ╰──────────────────────────────────── definiens: 2 + │ │ │ + │ │ ╰─────────── definiens: 4 + 2 │ ╭───▶ + ┆ ┆ + 4 │ │ DataFeed feed; + │ │ ─────────┬───────── + │ │ ╰─────────── definiens: 6 + 5 │ │ uint errorCount; + │ │ ──────────┬────────── + │ │ ╰──────────── definiens: 7 + 6 │ │ │ uint lastValue; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 8 + 7 │ │ ╭─▶ function rate(address token) public returns (uint value, bool success) { + │ │ │ ──────┬────── ─────┬──── ──────┬────── + │ │ │ ╰────────────────────────────────────────────────── definiens: 10 + │ │ │ │ │ + │ │ │ ╰──────────────────── definiens: 11 + │ │ │ │ + │ │ │ ╰──────── definiens: 12 + 8 │ │ │ string memory last_reason; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 13 + 9 │ │ │ try feed.getData(token) returns (uint v) { + │ │ │ ───┬── + │ │ │ ╰──── definiens: 14 + ┆ ┆ ┆ + 12 │ │ │ } catch Error(string memory reason) { + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 15 + ┆ ┆ ┆ + 20 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 9 + 21 │ ├───▶ } + │ │ + │ ╰───────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/control/while_stmt/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/control/while_stmt/generated/0.4.11-success.txt index 562fdd0396..8bf21480ae 100644 --- a/crates/solidity/testing/snapshots/bindings_output/control/while_stmt/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/control/while_stmt/generated/0.4.11-success.txt @@ -5,13 +5,13 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ int i = 1; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ while (i < 100) { │ ┬ │ ╰── ref: 3 @@ -19,3 +19,19 @@ References and definitions: │ ┬ │ ╰── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + 3 │ │ │ int i = 1; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 3 + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/enums/decls/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/enums/decls/generated/0.4.11-failure.txt index 9ac68b698b..96903613de 100644 --- a/crates/solidity/testing/snapshots/bindings_output/enums/decls/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/enums/decls/generated/0.4.11-failure.txt @@ -13,34 +13,73 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Answer { Yes, No } │ ───┬── ─┬─ ─┬ - │ ╰────────────── def: 2 + │ ╰────────────── name: 2 │ │ │ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 │ 5 │ library LibTest { │ ───┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 6 │ enum Respuesta { Si, No } │ ────┬──── ─┬ ─┬ - │ ╰─────────────── def: 6 + │ ╰─────────────── name: 6 │ │ │ - │ ╰────── def: 7 + │ ╰────── name: 7 │ │ - │ ╰── def: 8 + │ ╰── name: 8 │ 9 │ interface Iface { │ ──┬── - │ ╰──── def: 9 + │ ╰──── name: 9 10 │ enum Repondre { Oui, Non } │ ────┬─── ─┬─ ─┬─ - │ ╰──────────────── def: 10 + │ ╰──────────────── name: 10 │ │ │ - │ ╰──────── def: 11 + │ ╰──────── name: 11 │ │ - │ ╰─── def: 12 + │ ╰─── name: 12 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Test { + 2 │ │ enum Answer { Yes, No } + │ │ ──────────────┬────┬────┬─── + │ │ ╰─────────────── definiens: 2 + │ │ │ │ + │ │ ╰────────── definiens: 3 + │ │ │ + │ │ ╰───── definiens: 4 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + ┆ ┆ + 6 │ │ enum Respuesta { Si, No } + │ │ ───────────────┬──────┬───┬─── + │ │ ╰──────────────── definiens: 6 + │ │ │ │ + │ │ ╰───────── definiens: 7 + │ │ │ + │ │ ╰───── definiens: 8 + 7 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 5 + 8 │ ╭─────▶ + ┆ ┆ + 10 │ │ enum Repondre { Oui, Non } + │ │ ───────────────┬─────┬────┬──── + │ │ ╰───────────────── definiens: 10 + │ │ │ │ + │ │ ╰─────────── definiens: 11 + │ │ │ + │ │ ╰────── definiens: 12 + 11 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 9 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/enums/decls/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/enums/decls/generated/0.6.0-success.txt index fd1df85c16..f45a145416 100644 --- a/crates/solidity/testing/snapshots/bindings_output/enums/decls/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/enums/decls/generated/0.6.0-success.txt @@ -5,46 +5,97 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Answer { Yes, No } │ ───┬── ─┬─ ─┬ - │ ╰────────────── def: 2 + │ ╰────────────── name: 2 │ │ │ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 │ 5 │ library LibTest { │ ───┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 6 │ enum Respuesta { Si, No } │ ────┬──── ─┬ ─┬ - │ ╰─────────────── def: 6 + │ ╰─────────────── name: 6 │ │ │ - │ ╰────── def: 7 + │ ╰────── name: 7 │ │ - │ ╰── def: 8 + │ ╰── name: 8 │ 9 │ interface Iface { │ ──┬── - │ ╰──── def: 9 + │ ╰──── name: 9 10 │ enum Repondre { Oui, Non } │ ────┬─── ─┬─ ─┬─ - │ ╰──────────────── def: 10 + │ ╰──────────────── name: 10 │ │ │ - │ ╰──────── def: 11 + │ ╰──────── name: 11 │ │ - │ ╰─── def: 12 + │ ╰─── name: 12 │ 13 │ enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } │ ──────┬────── ───┬── ───┬─── ─────┬──── ────┬─── - │ ╰──────────────────────────────────────────────── def: 13 + │ ╰──────────────────────────────────────────────── name: 13 │ │ │ │ │ - │ ╰─────────────────────────────────── def: 14 + │ ╰─────────────────────────────────── name: 14 │ │ │ │ - │ ╰─────────────────────────── def: 15 + │ ╰─────────────────────────── name: 15 │ │ │ - │ ╰──────────────── def: 16 + │ ╰──────────────── name: 16 │ │ - │ ╰───── def: 17 + │ ╰───── name: 17 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Test { + 2 │ │ enum Answer { Yes, No } + │ │ ──────────────┬────┬────┬─── + │ │ ╰─────────────── definiens: 2 + │ │ │ │ + │ │ ╰────────── definiens: 3 + │ │ │ + │ │ ╰───── definiens: 4 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + ┆ ┆ + 6 │ │ enum Respuesta { Si, No } + │ │ ───────────────┬──────┬───┬─── + │ │ ╰──────────────── definiens: 6 + │ │ │ │ + │ │ ╰───────── definiens: 7 + │ │ │ + │ │ ╰───── definiens: 8 + 7 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 5 + 8 │ ╭─────▶ + ┆ ┆ + 10 │ │ enum Repondre { Oui, Non } + │ │ ───────────────┬─────┬────┬──── + │ │ ╰───────────────── definiens: 10 + │ │ │ │ + │ │ ╰─────────── definiens: 11 + │ │ │ + │ │ ╰────── definiens: 12 + 11 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────── definiens: 9 + 12 │ ╭───────▶ + 13 │ ├───────▶ enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } + │ │ ───┬── ───┬─── ─────┬──── ────┬─── + │ │ ╰────────────────────────────────────── definiens: 14 + │ │ │ │ │ + │ │ ╰────────────────────────────── definiens: 15 + │ │ │ │ + │ │ ╰─────────────────── definiens: 16 + │ │ │ + │ │ ╰──────── definiens: 17 + │ │ + │ ╰──────────────────────────────────────────────────────────────────────── definiens: 13 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/enums/in_params/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/enums/in_params/generated/0.4.11-success.txt index 4d9252085f..d8f8582010 100644 --- a/crates/solidity/testing/snapshots/bindings_output/enums/in_params/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/enums/in_params/generated/0.4.11-success.txt @@ -5,30 +5,30 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Answer { Yes, No } │ ───┬── ─┬─ ─┬ - │ ╰────────────── def: 2 + │ ╰────────────── name: 2 │ │ │ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 │ 4 │ function setAnswer(Answer ans) { │ ────┬──── ───┬── ─┬─ - │ ╰───────────────── def: 5 + │ ╰───────────────── name: 5 │ │ │ │ ╰──────── ref: 2 │ │ - │ ╰─── def: 6 + │ ╰─── name: 6 │ 7 │ function getAnswer() returns (Answer ans) { │ ────┬──── ───┬── ─┬─ - │ ╰──────────────────────────── def: 7 + │ ╰──────────────────────────── name: 7 │ │ │ │ ╰──────── ref: 2 │ │ - │ ╰─── def: 8 + │ ╰─── name: 8 8 │ ans = Answer.Yes; │ ─┬─ ───┬── ─┬─ │ ╰──────────────── ref: 8 @@ -39,7 +39,7 @@ References and definitions: │ 11 │ function getOtherAnswer() returns (Answer) { │ ───────┬────── ───┬── - │ ╰────────────────────────── def: 9 + │ ╰────────────────────────── name: 9 │ │ │ ╰──── ref: 2 12 │ return Answer.No; @@ -48,3 +48,38 @@ References and definitions: │ │ │ ╰── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───────▶ contract Test { + 2 │ │ │ enum Answer { Yes, No } + │ │ │ ──────────────┬────┬────┬─── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ │ + │ │ │ ╰────────── definiens: 3 + │ │ │ │ + │ │ │ ╰───── definiens: 4 + 3 │ │ ╭─▶ + 4 │ │ │ function setAnswer(Answer ans) { + │ │ │ ─────┬──── + │ │ │ ╰────── definiens: 6 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 5 + 6 │ │ ╭───▶ + 7 │ │ │ function getAnswer() returns (Answer ans) { + │ │ │ ─────┬──── + │ │ │ ╰────── definiens: 8 + ┆ ┆ ┆ + 9 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 7 + 10 │ │ ╭─────▶ + ┆ ┆ ┆ + 13 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 9 + 14 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/enums/in_state_vars/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/enums/in_state_vars/generated/0.4.11-success.txt index eb84988a32..b29b686150 100644 --- a/crates/solidity/testing/snapshots/bindings_output/enums/in_state_vars/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/enums/in_state_vars/generated/0.4.11-success.txt @@ -5,22 +5,41 @@ References and definitions: │ 1 │ contract Foo { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Answer { Yes, No } │ ───┬── ─┬─ ─┬ - │ ╰────────────── def: 2 + │ ╰────────────── name: 2 │ │ │ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 │ 4 │ Answer choice = Answer.Yes; │ ───┬── ───┬── ───┬── ─┬─ │ ╰──────────────────────── ref: 2 │ │ │ │ - │ ╰───────────────── def: 5 + │ ╰───────────────── name: 5 │ │ │ │ ╰──────── ref: 2 │ │ │ ╰─── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Foo { + 2 │ │ │ enum Answer { Yes, No } + │ │ │ ──────────────┬────┬────┬─── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ │ + │ │ │ ╰────────── definiens: 3 + │ │ │ │ + │ │ │ ╰───── definiens: 4 + 3 │ │ ╭─▶ + 4 │ │ ├─▶ Answer choice = Answer.Yes; + │ │ │ + │ │ ╰───────────────────────────────────── definiens: 5 + 5 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.4.11-failure.txt index 6bd279e9fd..cbb40459e0 100644 --- a/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.4.11-failure.txt @@ -15,29 +15,29 @@ References and definitions: │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 5 │ enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } │ ──────┬────── ───┬── ───┬─── ─────┬──── ────┬─── - │ ╰──────────────────────────────────────────────── def: 2 + │ ╰──────────────────────────────────────────────── name: 2 │ │ │ │ │ - │ ╰─────────────────────────────────── def: 3 + │ ╰─────────────────────────────────── name: 3 │ │ │ │ - │ ╰─────────────────────────── def: 4 + │ ╰─────────────────────────── name: 4 │ │ │ - │ ╰──────────────── def: 5 + │ ╰──────────────── name: 5 │ │ - │ ╰───── def: 6 + │ ╰───── name: 6 │ 7 │ ActionChoices choice; │ ──────┬────── ───┬── │ ╰─────────────── ref: 2 │ │ - │ ╰──── def: 7 + │ ╰──── name: 7 8 │ ActionChoices constant defaultChoice = ActionChoices.GoStraight; │ ──────┬────── ──────┬────── ──────┬────── ─────┬──── │ ╰────────────────────────────────────────────────────────── ref: 2 │ │ │ │ - │ ╰─────────────────────────────────── def: 8 + │ ╰─────────────────────────────────── name: 8 │ │ │ │ ╰─────────────────── ref: 2 │ │ @@ -45,7 +45,7 @@ References and definitions: │ 10 │ function setGoStraight() public { │ ──────┬────── - │ ╰──────── def: 9 + │ ╰──────── name: 9 11 │ choice = ActionChoices.GoStraight; │ ───┬── ──────┬────── ─────┬──── │ ╰─────────────────────────────── ref: 7 @@ -54,3 +54,36 @@ References and definitions: │ │ │ ╰────── ref: 5 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭─────▶ + ┆ ┆ + 5 │ │ │ enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } + │ │ │ ────────────────────────────┬───┬───┬──────────┬──────────┬────── + │ │ │ ╰────────────────────────────────────── definiens: 3 + │ │ │ │ │ │ │ + │ │ │ ╰────────────────────────────────── definiens: 2 + │ │ │ │ │ │ + │ │ │ ╰────────────────────────────── definiens: 4 + │ │ │ │ │ + │ │ │ ╰─────────────────── definiens: 5 + │ │ │ │ + │ │ │ ╰──────── definiens: 6 + 6 │ │ ╭─▶ + 7 │ │ ├─▶ ActionChoices choice; + │ │ │ + │ │ ╰─────────────────────────────── definiens: 7 + 8 │ │ │ ActionChoices constant defaultChoice = ActionChoices.GoStraight; + │ │ │ ──────────────────────────────────┬────────────────────────────────── + │ │ │ ╰──────────────────────────────────── definiens: 8 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 9 + ┆ ┆ + 32 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.4.16-failure.txt b/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.4.16-failure.txt index 3155a9f878..ff93343d7b 100644 --- a/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.4.16-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.4.16-failure.txt @@ -20,29 +20,29 @@ References and definitions: │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 5 │ enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } │ ──────┬────── ───┬── ───┬─── ─────┬──── ────┬─── - │ ╰──────────────────────────────────────────────── def: 2 + │ ╰──────────────────────────────────────────────── name: 2 │ │ │ │ │ - │ ╰─────────────────────────────────── def: 3 + │ ╰─────────────────────────────────── name: 3 │ │ │ │ - │ ╰─────────────────────────── def: 4 + │ ╰─────────────────────────── name: 4 │ │ │ - │ ╰──────────────── def: 5 + │ ╰──────────────── name: 5 │ │ - │ ╰───── def: 6 + │ ╰───── name: 6 │ 7 │ ActionChoices choice; │ ──────┬────── ───┬── │ ╰─────────────── ref: 2 │ │ - │ ╰──── def: 7 + │ ╰──── name: 7 8 │ ActionChoices constant defaultChoice = ActionChoices.GoStraight; │ ──────┬────── ──────┬────── ──────┬────── ─────┬──── │ ╰────────────────────────────────────────────────────────── ref: 2 │ │ │ │ - │ ╰─────────────────────────────────── def: 8 + │ ╰─────────────────────────────────── name: 8 │ │ │ │ ╰─────────────────── ref: 2 │ │ @@ -50,7 +50,7 @@ References and definitions: │ 10 │ function setGoStraight() public { │ ──────┬────── - │ ╰──────── def: 9 + │ ╰──────── name: 9 11 │ choice = ActionChoices.GoStraight; │ ───┬── ──────┬────── ─────┬──── │ ╰─────────────────────────────── ref: 7 @@ -61,7 +61,7 @@ References and definitions: │ 17 │ function getChoice() public view returns (ActionChoices) { │ ────┬──── ──────┬────── - │ ╰─────────────────────────────────────────── def: 10 + │ ╰─────────────────────────────────────────── name: 10 │ │ │ ╰──────── ref: 2 18 │ return choice; @@ -70,20 +70,72 @@ References and definitions: │ 21 │ function getDefaultChoice() public pure returns (uint) { │ ────────┬─────── - │ ╰───────── def: 11 + │ ╰───────── name: 11 22 │ return uint(defaultChoice); │ ──────┬────── │ ╰──────── ref: 8 │ 25 │ function getLargestValue() public pure returns (ActionChoices) { │ ───────┬─────── ──────┬────── - │ ╰────────────────────────────────────────────── def: 12 + │ ╰────────────────────────────────────────────── name: 12 │ │ │ ╰──────── ref: 2 │ 29 │ function getSmallestValue() public pure returns (ActionChoices) { │ ────────┬─────── ──────┬────── - │ ╰────────────────────────────────────────────── def: 13 + │ ╰────────────────────────────────────────────── name: 13 │ │ │ ╰──────── ref: 2 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭─────────────▶ + ┆ ┆ + 5 │ │ │ enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } + │ │ │ ────────────────────────────┬───┬───┬──────────┬──────────┬────── + │ │ │ ╰────────────────────────────────────── definiens: 3 + │ │ │ │ │ │ │ + │ │ │ ╰────────────────────────────────── definiens: 2 + │ │ │ │ │ │ + │ │ │ ╰────────────────────────────── definiens: 4 + │ │ │ │ │ + │ │ │ ╰─────────────────── definiens: 5 + │ │ │ │ + │ │ │ ╰──────── definiens: 6 + 6 │ │ ╭─▶ + 7 │ │ ├─▶ ActionChoices choice; + │ │ │ + │ │ ╰─────────────────────────────── definiens: 7 + 8 │ │ │ ActionChoices constant defaultChoice = ActionChoices.GoStraight; + │ │ │ ──────────────────────────────────┬────────────────────────────────── + │ │ │ ╰──────────────────────────────────── definiens: 8 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 9 + 13 │ │ ╭───────────▶ + ┆ ┆ ┆ + 19 │ │ ├─────│ ────▶ } + │ │ │ │ + │ │ ╰───────────────────── definiens: 10 + 20 │ │ ╭─────▶ + ┆ ┆ ┆ + 23 │ │ │ ├─────▶ } + │ │ │ │ + │ │ │ ╰─────────────── definiens: 11 + 24 │ │ ╭───────▶ + ┆ ┆ ┆ + 27 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 12 + 28 │ │ ╭─────────▶ + ┆ ┆ ┆ + 31 │ │ ├─────────▶ } + │ │ │ + │ │ ╰─────────────────── definiens: 13 + 32 │ ├─────────────▶ } + │ │ + │ ╰─────────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.5.3-failure.txt b/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.5.3-failure.txt index 459b6a9b60..217a924455 100644 --- a/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.5.3-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.5.3-failure.txt @@ -5,29 +5,29 @@ References and definitions: │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 5 │ enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } │ ──────┬────── ───┬── ───┬─── ─────┬──── ────┬─── - │ ╰──────────────────────────────────────────────── def: 2 + │ ╰──────────────────────────────────────────────── name: 2 │ │ │ │ │ - │ ╰─────────────────────────────────── def: 3 + │ ╰─────────────────────────────────── name: 3 │ │ │ │ - │ ╰─────────────────────────── def: 4 + │ ╰─────────────────────────── name: 4 │ │ │ - │ ╰──────────────── def: 5 + │ ╰──────────────── name: 5 │ │ - │ ╰───── def: 6 + │ ╰───── name: 6 │ 7 │ ActionChoices choice; │ ──────┬────── ───┬── │ ╰─────────────── ref: 2 │ │ - │ ╰──── def: 7 + │ ╰──── name: 7 8 │ ActionChoices constant defaultChoice = ActionChoices.GoStraight; │ ──────┬────── ──────┬────── ──────┬────── ─────┬──── │ ╰────────────────────────────────────────────────────────── ref: 2 │ │ │ │ - │ ╰─────────────────────────────────── def: 8 + │ ╰─────────────────────────────────── name: 8 │ │ │ │ ╰─────────────────── ref: 2 │ │ @@ -35,7 +35,7 @@ References and definitions: │ 10 │ function setGoStraight() public { │ ──────┬────── - │ ╰──────── def: 9 + │ ╰──────── name: 9 11 │ choice = ActionChoices.GoStraight; │ ───┬── ──────┬────── ─────┬──── │ ╰─────────────────────────────── ref: 7 @@ -46,7 +46,7 @@ References and definitions: │ 17 │ function getChoice() public view returns (ActionChoices) { │ ────┬──── ──────┬────── - │ ╰─────────────────────────────────────────── def: 10 + │ ╰─────────────────────────────────────────── name: 10 │ │ │ ╰──────── ref: 2 18 │ return choice; @@ -55,14 +55,14 @@ References and definitions: │ 21 │ function getDefaultChoice() public pure returns (uint) { │ ────────┬─────── - │ ╰───────── def: 11 + │ ╰───────── name: 11 22 │ return uint(defaultChoice); │ ──────┬────── │ ╰──────── ref: 8 │ 25 │ function getLargestValue() public pure returns (ActionChoices) { │ ───────┬─────── ──────┬────── - │ ╰────────────────────────────────────────────── def: 12 + │ ╰────────────────────────────────────────────── name: 12 │ │ │ ╰──────── ref: 2 26 │ return type(ActionChoices).max; @@ -73,7 +73,7 @@ References and definitions: │ 29 │ function getSmallestValue() public pure returns (ActionChoices) { │ ────────┬─────── ──────┬────── - │ ╰────────────────────────────────────────────── def: 13 + │ ╰────────────────────────────────────────────── name: 13 │ │ │ ╰──────── ref: 2 30 │ return type(ActionChoices).min; @@ -82,3 +82,55 @@ References and definitions: │ │ │ ╰─── unresolved ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭─────────────▶ + ┆ ┆ + 5 │ │ │ enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } + │ │ │ ────────────────────────────┬───┬───┬──────────┬──────────┬────── + │ │ │ ╰────────────────────────────────────── definiens: 3 + │ │ │ │ │ │ │ + │ │ │ ╰────────────────────────────────── definiens: 2 + │ │ │ │ │ │ + │ │ │ ╰────────────────────────────── definiens: 4 + │ │ │ │ │ + │ │ │ ╰─────────────────── definiens: 5 + │ │ │ │ + │ │ │ ╰──────── definiens: 6 + 6 │ │ ╭─▶ + 7 │ │ ├─▶ ActionChoices choice; + │ │ │ + │ │ ╰─────────────────────────────── definiens: 7 + 8 │ │ │ ActionChoices constant defaultChoice = ActionChoices.GoStraight; + │ │ │ ──────────────────────────────────┬────────────────────────────────── + │ │ │ ╰──────────────────────────────────── definiens: 8 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 9 + 13 │ │ ╭───────────▶ + ┆ ┆ ┆ + 19 │ │ ├─────│ ────▶ } + │ │ │ │ + │ │ ╰───────────────────── definiens: 10 + 20 │ │ ╭─────▶ + ┆ ┆ ┆ + 23 │ │ │ ├─────▶ } + │ │ │ │ + │ │ │ ╰─────────────── definiens: 11 + 24 │ │ ╭───────▶ + ┆ ┆ ┆ + 27 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 12 + 28 │ │ ╭─────────▶ + ┆ ┆ ┆ + 31 │ │ ├─────────▶ } + │ │ │ + │ │ ╰─────────────────── definiens: 13 + 32 │ ├─────────────▶ } + │ │ + │ ╰─────────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.6.8-success.txt b/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.6.8-success.txt index 329ad750cb..e31e0e1cf4 100644 --- a/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.6.8-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/enums/sample/generated/0.6.8-success.txt @@ -5,29 +5,29 @@ References and definitions: │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 5 │ enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } │ ──────┬────── ───┬── ───┬─── ─────┬──── ────┬─── - │ ╰──────────────────────────────────────────────── def: 2 + │ ╰──────────────────────────────────────────────── name: 2 │ │ │ │ │ - │ ╰─────────────────────────────────── def: 3 + │ ╰─────────────────────────────────── name: 3 │ │ │ │ - │ ╰─────────────────────────── def: 4 + │ ╰─────────────────────────── name: 4 │ │ │ - │ ╰──────────────── def: 5 + │ ╰──────────────── name: 5 │ │ - │ ╰───── def: 6 + │ ╰───── name: 6 │ 7 │ ActionChoices choice; │ ──────┬────── ───┬── │ ╰─────────────── ref: 2 │ │ - │ ╰──── def: 7 + │ ╰──── name: 7 8 │ ActionChoices constant defaultChoice = ActionChoices.GoStraight; │ ──────┬────── ──────┬────── ──────┬────── ─────┬──── │ ╰────────────────────────────────────────────────────────── ref: 2 │ │ │ │ - │ ╰─────────────────────────────────── def: 8 + │ ╰─────────────────────────────────── name: 8 │ │ │ │ ╰─────────────────── ref: 2 │ │ @@ -35,7 +35,7 @@ References and definitions: │ 10 │ function setGoStraight() public { │ ──────┬────── - │ ╰──────── def: 9 + │ ╰──────── name: 9 11 │ choice = ActionChoices.GoStraight; │ ───┬── ──────┬────── ─────┬──── │ ╰─────────────────────────────── ref: 7 @@ -46,7 +46,7 @@ References and definitions: │ 17 │ function getChoice() public view returns (ActionChoices) { │ ────┬──── ──────┬────── - │ ╰─────────────────────────────────────────── def: 10 + │ ╰─────────────────────────────────────────── name: 10 │ │ │ ╰──────── ref: 2 18 │ return choice; @@ -55,14 +55,14 @@ References and definitions: │ 21 │ function getDefaultChoice() public pure returns (uint) { │ ────────┬─────── - │ ╰───────── def: 11 + │ ╰───────── name: 11 22 │ return uint(defaultChoice); │ ──────┬────── │ ╰──────── ref: 8 │ 25 │ function getLargestValue() public pure returns (ActionChoices) { │ ───────┬─────── ──────┬────── - │ ╰────────────────────────────────────────────── def: 12 + │ ╰────────────────────────────────────────────── name: 12 │ │ │ ╰──────── ref: 2 26 │ return type(ActionChoices).max; @@ -73,7 +73,7 @@ References and definitions: │ 29 │ function getSmallestValue() public pure returns (ActionChoices) { │ ────────┬─────── ──────┬────── - │ ╰────────────────────────────────────────────── def: 13 + │ ╰────────────────────────────────────────────── name: 13 │ │ │ ╰──────── ref: 2 30 │ return type(ActionChoices).min; @@ -82,3 +82,55 @@ References and definitions: │ │ │ ╰─── ref: built-in ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 3 │ ╭─────────────▶ + ┆ ┆ + 5 │ │ │ enum ActionChoices { GoLeft, GoRight, GoStraight, SitStill } + │ │ │ ────────────────────────────┬───┬───┬──────────┬──────────┬────── + │ │ │ ╰────────────────────────────────────── definiens: 3 + │ │ │ │ │ │ │ + │ │ │ ╰────────────────────────────────── definiens: 2 + │ │ │ │ │ │ + │ │ │ ╰────────────────────────────── definiens: 4 + │ │ │ │ │ + │ │ │ ╰─────────────────── definiens: 5 + │ │ │ │ + │ │ │ ╰──────── definiens: 6 + 6 │ │ ╭─▶ + 7 │ │ ├─▶ ActionChoices choice; + │ │ │ + │ │ ╰─────────────────────────────── definiens: 7 + 8 │ │ │ ActionChoices constant defaultChoice = ActionChoices.GoStraight; + │ │ │ ──────────────────────────────────┬────────────────────────────────── + │ │ │ ╰──────────────────────────────────── definiens: 8 + 9 │ │ ╭───▶ + ┆ ┆ ┆ + 12 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────── definiens: 9 + 13 │ │ ╭───────────▶ + ┆ ┆ ┆ + 19 │ │ ├─────│ ────▶ } + │ │ │ │ + │ │ ╰───────────────────── definiens: 10 + 20 │ │ ╭─────▶ + ┆ ┆ ┆ + 23 │ │ │ ├─────▶ } + │ │ │ │ + │ │ │ ╰─────────────── definiens: 11 + 24 │ │ ╭───────▶ + ┆ ┆ ┆ + 27 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 12 + 28 │ │ ╭─────────▶ + ┆ ┆ ┆ + 31 │ │ ├─────────▶ } + │ │ │ + │ │ ╰─────────────────── definiens: 13 + 32 │ ├─────────────▶ } + │ │ + │ ╰─────────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.4.11-failure.txt index d81fb618e4..33b4efac7b 100644 --- a/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.4.11-failure.txt @@ -22,29 +22,60 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Severity { │ ────┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ INFO, │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 4 │ ERROR │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 │ 7 │ error Failure( │ ──┬── ───┬─── │ ╰──────────── unresolved │ │ - │ ╰───── def: 5 + │ ╰───── name: 5 │ 12 │ function test() public { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 13 │ revert Failure(Severity.ERROR, "Testing"); │ ───┬── ───┬─── │ ╰──────────── ref: built-in │ │ - │ ╰───── def: 7 + │ ╰───── name: 7 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ contract Test { + 2 │ │ ╭─▶ enum Severity { + 3 │ │ │ INFO, + │ │ │ ──┬─ + │ │ │ ╰─── definiens: 3 + 4 │ │ │ ERROR + │ │ │ ──┬── + │ │ │ ╰──── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 10 │ │ │ ├───▶ ); + │ │ │ │ + │ │ │ ╰────────────── definiens: 5 + 11 │ │ ╭─────▶ + ┆ ┆ ┆ + 13 │ │ │ revert Failure(Severity.ERROR, "Testing"); + │ │ │ ─────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 7 + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 6 + 15 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.4.22-failure.txt b/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.4.22-failure.txt index 0e6583dc7e..226aa94790 100644 --- a/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.4.22-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.4.22-failure.txt @@ -22,29 +22,60 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Severity { │ ────┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ INFO, │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 4 │ ERROR │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 │ 7 │ error Failure( │ ──┬── ───┬─── │ ╰──────────── unresolved │ │ - │ ╰───── def: 5 + │ ╰───── name: 5 │ 12 │ function test() public { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 13 │ revert Failure(Severity.ERROR, "Testing"); │ ───┬── ───┬─── │ ╰──────────── refs: built-in, built-in │ │ - │ ╰───── def: 7 + │ ╰───── name: 7 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ contract Test { + 2 │ │ ╭─▶ enum Severity { + 3 │ │ │ INFO, + │ │ │ ──┬─ + │ │ │ ╰─── definiens: 3 + 4 │ │ │ ERROR + │ │ │ ──┬── + │ │ │ ╰──── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 10 │ │ │ ├───▶ ); + │ │ │ │ + │ │ │ ╰────────────── definiens: 5 + 11 │ │ ╭─────▶ + ┆ ┆ ┆ + 13 │ │ │ revert Failure(Severity.ERROR, "Testing"); + │ │ │ ─────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 7 + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 6 + 15 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.8.4-success.txt b/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.8.4-success.txt index 6e9ba9c5d7..c482722cf6 100644 --- a/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.8.4-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/errors/custom_types/generated/0.8.4-success.txt @@ -5,32 +5,32 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Severity { │ ────┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ INFO, │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 4 │ ERROR │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 │ 7 │ error Failure( │ ───┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 8 │ Severity severity, │ ────┬─── ────┬─── │ ╰────────────── ref: 2 │ │ - │ ╰───── def: 6 + │ ╰───── name: 6 9 │ string cause │ ──┬── - │ ╰──── def: 7 + │ ╰──── name: 7 │ 12 │ function test() public { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 13 │ revert Failure(Severity.ERROR, "Testing"); │ ───┬─── ────┬─── ──┬── │ ╰──────────────────── ref: 5 @@ -39,3 +39,37 @@ References and definitions: │ │ │ ╰──── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ contract Test { + 2 │ │ ╭─▶ enum Severity { + 3 │ │ │ INFO, + │ │ │ ──┬─ + │ │ │ ╰─── definiens: 3 + 4 │ │ │ ERROR + │ │ │ ──┬── + │ │ │ ╰──── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 8 │ │ │ Severity severity, + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 6 + 9 │ │ │ string cause + │ │ │ ──────────┬────────── + │ │ │ ╰──────────── definiens: 7 + 10 │ │ │ ├───▶ ); + │ │ │ │ + │ │ │ ╰────────────── definiens: 5 + 11 │ │ ╭─────▶ + ┆ ┆ ┆ + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 8 + 15 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/errors/selector/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/errors/selector/generated/0.4.11-failure.txt index 5bc593e595..2a0348e347 100644 --- a/crates/solidity/testing/snapshots/bindings_output/errors/selector/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/errors/selector/generated/0.4.11-failure.txt @@ -13,19 +13,35 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ error TestError(); │ ──┬── ────┬──── │ ╰────────────── unresolved │ │ - │ ╰────── def: 2 + │ ╰────── name: 2 │ 4 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ TestError.selector; │ ────┬──── ────┬─── │ ╰─────────────── ref: 2 │ │ │ ╰───── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ error TestError(); + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────── definiens: 2 + 3 │ │ ╭─▶ + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/errors/selector/generated/0.8.4-success.txt b/crates/solidity/testing/snapshots/bindings_output/errors/selector/generated/0.8.4-success.txt index 41e568485d..6ee7c5b109 100644 --- a/crates/solidity/testing/snapshots/bindings_output/errors/selector/generated/0.8.4-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/errors/selector/generated/0.8.4-success.txt @@ -5,17 +5,33 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ error TestError(); │ ────┬──── - │ ╰────── def: 2 + │ ╰────── name: 2 │ 4 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ TestError.selector; │ ────┬──── ────┬─── │ ╰─────────────── ref: 2 │ │ │ ╰───── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ error TestError(); + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────── definiens: 2 + 3 │ │ ╭─▶ + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/events/custom_types/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/events/custom_types/generated/0.4.11-failure.txt index 4ccebb12de..b3da27d7f9 100644 --- a/crates/solidity/testing/snapshots/bindings_output/events/custom_types/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/events/custom_types/generated/0.4.11-failure.txt @@ -13,35 +13,72 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Severity { │ ────┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ INFO, │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 4 │ ERROR │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 │ 7 │ event Log( │ ─┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 8 │ Severity level, │ ────┬─── ──┬── │ ╰─────────── ref: 2 │ │ - │ ╰──── def: 6 + │ ╰──── name: 6 9 │ string name │ ──┬─ - │ ╰─── def: 7 + │ ╰─── name: 7 │ 12 │ function test() public { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 13 │ emit Log(Severity.INFO, "Testing"); │ ──┬─ ─┬─ │ ╰─────── unresolved │ │ - │ ╰─── def: 9 + │ ╰─── name: 9 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ contract Test { + 2 │ │ ╭─▶ enum Severity { + 3 │ │ │ INFO, + │ │ │ ──┬─ + │ │ │ ╰─── definiens: 3 + 4 │ │ │ ERROR + │ │ │ ──┬── + │ │ │ ╰──── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 8 │ │ │ Severity level, + │ │ │ ───────────┬────────── + │ │ │ ╰──────────── definiens: 6 + 9 │ │ │ string name + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 7 + 10 │ │ │ ├───▶ ); + │ │ │ │ + │ │ │ ╰────────────── definiens: 5 + 11 │ │ ╭─────▶ + ┆ ┆ ┆ + 13 │ │ │ emit Log(Severity.INFO, "Testing"); + │ │ │ ──────────────────────┬───────────────────── + │ │ │ ╰─────────────────────── definiens: 9 + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 8 + 15 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/events/custom_types/generated/0.4.21-success.txt b/crates/solidity/testing/snapshots/bindings_output/events/custom_types/generated/0.4.21-success.txt index 941335c856..9ce22c9cfa 100644 --- a/crates/solidity/testing/snapshots/bindings_output/events/custom_types/generated/0.4.21-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/events/custom_types/generated/0.4.21-success.txt @@ -5,32 +5,32 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Severity { │ ────┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ INFO, │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 4 │ ERROR │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 │ 7 │ event Log( │ ─┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 8 │ Severity level, │ ────┬─── ──┬── │ ╰─────────── ref: 2 │ │ - │ ╰──── def: 6 + │ ╰──── name: 6 9 │ string name │ ──┬─ - │ ╰─── def: 7 + │ ╰─── name: 7 │ 12 │ function test() public { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 13 │ emit Log(Severity.INFO, "Testing"); │ ─┬─ ────┬─── ──┬─ │ ╰───────────────── ref: 5 @@ -39,3 +39,37 @@ References and definitions: │ │ │ ╰─── ref: 3 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ contract Test { + 2 │ │ ╭─▶ enum Severity { + 3 │ │ │ INFO, + │ │ │ ──┬─ + │ │ │ ╰─── definiens: 3 + 4 │ │ │ ERROR + │ │ │ ──┬── + │ │ │ ╰──── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 8 │ │ │ Severity level, + │ │ │ ───────────┬────────── + │ │ │ ╰──────────── definiens: 6 + 9 │ │ │ string name + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 7 + 10 │ │ │ ├───▶ ); + │ │ │ │ + │ │ │ ╰────────────── definiens: 5 + 11 │ │ ╭─────▶ + ┆ ┆ ┆ + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 8 + 15 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/binary_operators/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/binary_operators/generated/0.4.11-success.txt index 69f5695dea..c3f7d66c2d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/binary_operators/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/binary_operators/generated/0.4.11-success.txt @@ -5,21 +5,21 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function nop_uint(uint x) public returns (uint) {} │ ────┬─── ┬ - │ ╰──────────── def: 2 + │ ╰──────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 3 │ function nop_bool(bool x) public returns (bool) {} │ ────┬─── ┬ - │ ╰──────────── def: 4 + │ ╰──────────── name: 4 │ │ - │ ╰── def: 5 + │ ╰── name: 5 │ 6 │ contract Test { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 7 │ using Lib for uint; │ ─┬─ │ ╰─── ref: 1 @@ -28,11 +28,11 @@ References and definitions: │ ╰─── ref: 1 9 │ function test(uint a, uint b) public { │ ──┬─ ┬ ┬ - │ ╰────────────────── def: 7 + │ ╰────────────────── name: 7 │ │ │ - │ ╰────────── def: 8 + │ ╰────────── name: 8 │ │ - │ ╰── def: 9 + │ ╰── name: 9 10 │ (a += b).nop_uint(); │ ┬ ┬ ────┬─── │ ╰───────────────── ref: 8 @@ -98,3 +98,35 @@ References and definitions: │ │ │ ╰───── ref: 2 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ library Lib { + 2 │ │ function nop_uint(uint x) public returns (uint) {} + │ │ ─────────────────────────┬─┬─────────────────────────── + │ │ ╰─────────────────────────────── definiens: 3 + │ │ │ + │ │ ╰───────────────────────────── definiens: 2 + 3 │ │ function nop_bool(bool x) public returns (bool) {} + │ │ ─────────────────────────┬─┬─────────────────────────── + │ │ ╰─────────────────────────────── definiens: 5 + │ │ │ + │ │ ╰───────────────────────────── definiens: 4 + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 5 │ ╭─────▶ + ┆ ┆ + 9 │ │ ╭───▶ function test(uint a, uint b) public { + │ │ │ ───┬── ───┬─── + │ │ │ ╰──────────── definiens: 8 + │ │ │ │ + │ │ │ ╰───── definiens: 9 + ┆ ┆ ┆ + 20 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 7 + 21 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 6 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/call_options/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/call_options/generated/0.4.11-failure.txt index f92f0caeb5..a63c6a636a 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/call_options/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/call_options/generated/0.4.11-failure.txt @@ -13,31 +13,59 @@ References and definitions: │ 1 │ interface External { │ ────┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ struct Data { uint value; } │ ──┬─ ──┬── - │ ╰──────────────── def: 2 + │ ╰──────────────── name: 2 │ │ - │ ╰──── def: 3 + │ ╰──── name: 3 3 │ function sample() external payable returns (Data memory); │ ───┬── ──┬─ - │ ╰───────────────────────────────────── def: 4 + │ ╰───────────────────────────────────── name: 4 │ │ │ ╰─── ref: 2 │ 6 │ contract Test { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 7 │ function test(External ext) public returns (uint) { │ ──┬─ ────┬─── ─┬─ - │ ╰──────────────── def: 6 + │ ╰──────────────── name: 6 │ │ │ │ ╰───────── ref: 1 │ │ - │ ╰─── def: 7 + │ ╰─── name: 7 8 │ return ext.sample{ value: 10, gas: 20 }().value; │ ─┬─ ───┬── │ ╰────────── ref: 7 │ │ │ ╰──── ref: 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ interface External { + 2 │ │ struct Data { uint value; } + │ │ ────────────────┬──────┬──────── + │ │ ╰───────────────── definiens: 2 + │ │ │ + │ │ ╰────────── definiens: 3 + 3 │ │ function sample() external payable returns (Data memory); + │ │ ───────────────────────────────┬────────────────────────────── + │ │ ╰──────────────────────────────── definiens: 4 + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 5 │ ╭─────▶ + ┆ ┆ ┆ + 7 │ │ ╭───▶ function test(External ext) public returns (uint) { + │ │ │ ──────┬───── + │ │ │ ╰─────── definiens: 7 + ┆ ┆ ┆ + 9 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 6 + 10 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/call_options/generated/0.6.2-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/call_options/generated/0.6.2-success.txt index a62d6d802b..1331af90fc 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/call_options/generated/0.6.2-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/call_options/generated/0.6.2-success.txt @@ -5,28 +5,28 @@ References and definitions: │ 1 │ interface External { │ ────┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ struct Data { uint value; } │ ──┬─ ──┬── - │ ╰──────────────── def: 2 + │ ╰──────────────── name: 2 │ │ - │ ╰──── def: 3 + │ ╰──── name: 3 3 │ function sample() external payable returns (Data memory); │ ───┬── ──┬─ - │ ╰───────────────────────────────────── def: 4 + │ ╰───────────────────────────────────── name: 4 │ │ │ ╰─── ref: 2 │ 6 │ contract Test { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 7 │ function test(External ext) public returns (uint) { │ ──┬─ ────┬─── ─┬─ - │ ╰──────────────── def: 6 + │ ╰──────────────── name: 6 │ │ │ │ ╰───────── ref: 1 │ │ - │ ╰─── def: 7 + │ ╰─── name: 7 8 │ return ext.sample{ value: 10, gas: 20 }().value; │ ─┬─ ───┬── ──┬── ─┬─ ──┬── │ ╰──────────────────────────────────────── ref: 7 @@ -39,3 +39,31 @@ References and definitions: │ │ │ ╰──── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ interface External { + 2 │ │ struct Data { uint value; } + │ │ ────────────────┬──────┬──────── + │ │ ╰───────────────── definiens: 2 + │ │ │ + │ │ ╰────────── definiens: 3 + 3 │ │ function sample() external payable returns (Data memory); + │ │ ───────────────────────────────┬────────────────────────────── + │ │ ╰──────────────────────────────── definiens: 4 + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 5 │ ╭─────▶ + ┆ ┆ ┆ + 7 │ │ ╭───▶ function test(External ext) public returns (uint) { + │ │ │ ──────┬───── + │ │ │ ╰─────── definiens: 7 + ┆ ┆ ┆ + 9 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 6 + 10 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.4.11-failure.txt index f25c1ffe3c..c0fc605346 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.4.11-failure.txt @@ -15,26 +15,53 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ using Lib for uint; │ ─┬─ │ ╰─── ref: 4 │ 4 │ function test(address a) public { │ ──┬─ ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 5 │ address(this).balance; │ ───┬─── │ ╰───── ref: built-in │ 11 │ library Lib { │ ─┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 12 │ function noop(uint x) public returns (uint) {} │ ──┬─ ┬ - │ ╰────────── def: 5 + │ ╰────────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 3 │ │ ╭───▶ + 4 │ │ │ function test(address a) public { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 3 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 9 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 10 │ ╭─▶ + ┆ ┆ + 12 │ │ function noop(uint x) public returns (uint) {} + │ │ ─────────────────────┬───┬───────────────────────── + │ │ ╰─────────────────────────────── definiens: 6 + │ │ │ + │ │ ╰─────────────────────────── definiens: 5 + 13 │ ├─▶ } + │ │ + │ ╰─────── definiens: 4 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.4.21-failure.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.4.21-failure.txt index bdf6d7ee03..dc45a019c9 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.4.21-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.4.21-failure.txt @@ -15,26 +15,53 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ using Lib for uint; │ ─┬─ │ ╰─── ref: 4 │ 4 │ function test(address a) public { │ ──┬─ ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 5 │ address(this).balance; │ ───┬─── │ ╰───── ref: built-in │ 11 │ library Lib { │ ─┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 12 │ function noop(uint x) public returns (uint) {} │ ──┬─ ┬ - │ ╰────────── def: 5 + │ ╰────────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 3 │ │ ╭───▶ + 4 │ │ │ function test(address a) public { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 3 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 9 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 10 │ ╭─▶ + ┆ ┆ + 12 │ │ function noop(uint x) public returns (uint) {} + │ │ ─────────────────────┬───┬───────────────────────── + │ │ ╰─────────────────────────────── definiens: 6 + │ │ │ + │ │ ╰─────────────────────────── definiens: 5 + 13 │ ├─▶ } + │ │ + │ ╰─────── definiens: 4 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.5.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.5.0-failure.txt index 8ee42cb4f3..65c18d9531 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.5.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.5.0-failure.txt @@ -15,26 +15,53 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ using Lib for uint; │ ─┬─ │ ╰─── ref: 4 │ 4 │ function test(address a) public { │ ──┬─ ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 5 │ address(this).balance; │ ───┬─── │ ╰───── ref: built-in │ 11 │ library Lib { │ ─┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 12 │ function noop(uint x) public returns (uint) {} │ ──┬─ ┬ - │ ╰────────── def: 5 + │ ╰────────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 3 │ │ ╭───▶ + 4 │ │ │ function test(address a) public { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 3 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 9 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 10 │ ╭─▶ + ┆ ┆ + 12 │ │ function noop(uint x) public returns (uint) {} + │ │ ─────────────────────┬───┬───────────────────────── + │ │ ╰─────────────────────────────── definiens: 6 + │ │ │ + │ │ ╰─────────────────────────── definiens: 5 + 13 │ ├─▶ } + │ │ + │ ╰─────── definiens: 4 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.5.3-failure.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.5.3-failure.txt index 0563005915..eab8851b66 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.5.3-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.5.3-failure.txt @@ -15,26 +15,53 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ using Lib for uint; │ ─┬─ │ ╰─── ref: 4 │ 4 │ function test(address a) public { │ ──┬─ ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 5 │ address(this).balance; │ ───┬─── │ ╰───── ref: built-in │ 11 │ library Lib { │ ─┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 12 │ function noop(uint x) public returns (uint) {} │ ──┬─ ┬ - │ ╰────────── def: 5 + │ ╰────────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 3 │ │ ╭───▶ + 4 │ │ │ function test(address a) public { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 3 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 9 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 10 │ ╭─▶ + ┆ ┆ + 12 │ │ function noop(uint x) public returns (uint) {} + │ │ ─────────────────────┬───┬───────────────────────── + │ │ ╰─────────────────────────────── definiens: 6 + │ │ │ + │ │ ╰─────────────────────────── definiens: 5 + 13 │ ├─▶ } + │ │ + │ ╰─────── definiens: 4 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.6.0-success.txt index 55ec33f7cd..e2e2cbd874 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/elementary_casting/generated/0.6.0-success.txt @@ -5,16 +5,16 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ using Lib for uint; │ ─┬─ │ ╰─── ref: 4 │ 4 │ function test(address a) public { │ ──┬─ ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 5 │ address(this).balance; │ ───┬─── │ ╰───── ref: built-in @@ -29,10 +29,37 @@ References and definitions: │ 11 │ library Lib { │ ─┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 12 │ function noop(uint x) public returns (uint) {} │ ──┬─ ┬ - │ ╰────────── def: 5 + │ ╰────────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 3 │ │ ╭───▶ + 4 │ │ │ function test(address a) public { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 3 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 9 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 10 │ ╭─▶ + ┆ ┆ + 12 │ │ function noop(uint x) public returns (uint) {} + │ │ ─────────────────────┬───┬───────────────────────── + │ │ ╰─────────────────────────────── definiens: 6 + │ │ │ + │ │ ╰─────────────────────────── definiens: 5 + 13 │ ├─▶ } + │ │ + │ ╰─────── definiens: 4 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/emit_named_args/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/emit_named_args/generated/0.4.11-failure.txt index 2b8c8f6984..1bd114bac2 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/emit_named_args/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/emit_named_args/generated/0.4.11-failure.txt @@ -13,23 +13,49 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ event Log( │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ string name, │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 4 │ uint level │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 │ 7 │ function test() public { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 8 │ emit Log({level: 1, name: "Testing"}); │ ──┬─ ─┬─ │ ╰─────── unresolved │ │ - │ ╰─── def: 6 + │ ╰─── name: 6 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract Test { + 2 │ │ ╭─▶ event Log( + 3 │ │ │ string name, + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ │ uint level + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 4 + 5 │ │ │ ├─▶ ); + │ │ │ │ + │ │ │ ╰──────────── definiens: 2 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 8 │ │ │ emit Log({level: 1, name: "Testing"}); + │ │ │ ───────────────────────┬─────────────────────── + │ │ │ ╰───────────────────────── definiens: 6 + 9 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 10 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/emit_named_args/generated/0.4.21-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/emit_named_args/generated/0.4.21-success.txt index 95980e7b10..115dc77527 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/emit_named_args/generated/0.4.21-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/emit_named_args/generated/0.4.21-success.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ event Log( │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ string name, │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 4 │ uint level │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 │ 7 │ function test() public { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 8 │ emit Log({level: 1, name: "Testing"}); │ ─┬─ ──┬── ──┬─ │ ╰─────────────────── ref: 2 @@ -27,3 +27,26 @@ References and definitions: │ │ │ ╰─── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract Test { + 2 │ │ ╭─▶ event Log( + 3 │ │ │ string name, + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ │ uint level + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 4 + 5 │ │ │ ├─▶ ); + │ │ │ │ + │ │ │ ╰──────────── definiens: 2 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 9 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 10 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls/generated/0.4.11-success.txt index b75108e7b4..11e1e83620 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls/generated/0.4.11-success.txt @@ -5,15 +5,15 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ int y; │ ┬ - │ ╰── def: 2 + │ ╰── name: 2 3 │ function someFunc(int x) returns (int) { │ ────┬─── ┬ - │ ╰─────────── def: 3 + │ ╰─────────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 4 │ return add(x, y); │ ─┬─ ┬ ┬ │ ╰──────── ref: 5 @@ -24,5 +24,26 @@ References and definitions: │ 6 │ function add(int, int) returns (int); │ ─┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ int y; + │ │ │ ─────┬───── + │ │ │ ╰─────── definiens: 2 + 3 │ │ ╭─▶ function someFunc(int x) returns (int) { + │ │ │ ──┬── + │ │ │ ╰──── definiens: 4 + ┆ ┆ ┆ + 5 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 6 │ │ function add(int, int) returns (int); + │ │ ─────────────────────┬──────────────────── + │ │ ╰────────────────────── definiens: 5 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls_named_args/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls_named_args/generated/0.4.11-success.txt index 40c643b280..b64164755d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls_named_args/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls_named_args/generated/0.4.11-success.txt @@ -5,12 +5,12 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function someFunc(int x) returns (int) { │ ────┬─── ┬ - │ ╰─────────── def: 2 + │ ╰─────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 3 │ return divide({ dividend: x, divisor: 3 }); │ ───┬── ────┬─── ┬ ───┬─── │ ╰─────────────────────────── ref: 4 @@ -23,9 +23,31 @@ References and definitions: │ 5 │ function divide(int dividend, int divisor) returns (int); │ ───┬── ────┬─── ───┬─── - │ ╰────────────────────────────── def: 4 + │ ╰────────────────────────────── name: 4 │ │ │ - │ ╰────────────────── def: 5 + │ ╰────────────────── name: 5 │ │ - │ ╰───── def: 6 + │ ╰───── name: 6 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function someFunc(int x) returns (int) { + │ │ │ ──┬── + │ │ │ ╰──── definiens: 3 + ┆ ┆ ┆ + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 5 │ │ function divide(int dividend, int divisor) returns (int); + │ │ ──────────────────────────┬────┬───────┬────────────────────── + │ │ ╰───────────────────────────────────── definiens: 5 + │ │ │ │ + │ │ ╰──────────────────────────────── definiens: 4 + │ │ │ + │ │ ╰──────────────────────── definiens: 6 + 6 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls_output/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls_output/generated/0.4.11-success.txt index ca70e365b9..4a8249791a 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls_output/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/funcalls_output/generated/0.4.11-success.txt @@ -5,10 +5,10 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test_call() public returns (uint) { │ ────┬──── - │ ╰────── def: 2 + │ ╰────── name: 2 3 │ return Utils.create().value; │ ──┬── ───┬── ──┬── │ ╰─────────────────── ref: 3 @@ -19,20 +19,50 @@ References and definitions: │ 7 │ library Utils { │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 8 │ struct Resource { │ ────┬─── - │ ╰───── def: 4 + │ ╰───── name: 4 9 │ uint value; │ ──┬── - │ ╰──── def: 5 + │ ╰──── name: 5 │ 12 │ function create() public returns (Resource memory) { │ ───┬── ────┬─── - │ ╰─────────────────────────────── def: 6 + │ ╰─────────────────────────────── name: 6 │ │ │ ╰───── ref: 4 13 │ return Resource(1); │ ────┬─── │ ╰───── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ────▶ contract Test { + 2 │ │ ╭─────▶ function test_call() public returns (uint) { + ┆ ┆ ┆ + 4 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 2 + 5 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────── definiens: 1 + 6 │ ╭─────────▶ + ┆ ┆ ┆ + 8 │ │ ╭─▶ struct Resource { + 9 │ │ │ uint value; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 5 + 10 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 4 + 11 │ │ ╭───▶ + ┆ ┆ ┆ + 14 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 6 + 15 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 3 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/legacy_call_options/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/legacy_call_options/generated/0.4.11-success.txt index 4f39167043..6762b8843f 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/legacy_call_options/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/legacy_call_options/generated/0.4.11-success.txt @@ -5,14 +5,14 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test(address rcpt, bytes memory data) public { │ ──┬─ ──┬─ ──┬─ - │ ╰─────────────────────────────────── def: 2 + │ ╰─────────────────────────────────── name: 2 │ │ │ - │ ╰────────────────────── def: 3 + │ ╰────────────────────── name: 3 │ │ - │ ╰─── def: 4 + │ ╰─── name: 4 │ 4 │ rcpt.call.value(1)(data); │ ──┬─ ──┬─ ──┬── ──┬─ @@ -33,3 +33,20 @@ References and definitions: │ │ │ ╰─── ref: 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test(address rcpt, bytes memory data) public { + │ │ │ ──────┬───── ─────────┬──────── + │ │ │ ╰────────────────────────── definiens: 3 + │ │ │ │ + │ │ │ ╰────────── definiens: 4 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/legacy_call_options/generated/0.7.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/legacy_call_options/generated/0.7.0-failure.txt index b15ce9308a..912b3a99dc 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/legacy_call_options/generated/0.7.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/legacy_call_options/generated/0.7.0-failure.txt @@ -5,14 +5,14 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test(address rcpt, bytes memory data) public { │ ──┬─ ──┬─ ──┬─ - │ ╰─────────────────────────────────── def: 2 + │ ╰─────────────────────────────────── name: 2 │ │ │ - │ ╰────────────────────── def: 3 + │ ╰────────────────────── name: 3 │ │ - │ ╰─── def: 4 + │ ╰─── name: 4 │ 4 │ rcpt.call.value(1)(data); │ ──┬─ ──┬─ ──┬── ──┬─ @@ -33,3 +33,20 @@ References and definitions: │ │ │ ╰─── ref: 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test(address rcpt, bytes memory data) public { + │ │ │ ──────┬───── ─────────┬──────── + │ │ │ ╰────────────────────────── definiens: 3 + │ │ │ │ + │ │ │ ╰────────── definiens: 4 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/literal_address/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/literal_address/generated/0.4.11-success.txt index 31773815f8..e2a056209c 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/literal_address/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/literal_address/generated/0.4.11-success.txt @@ -5,15 +5,30 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test(bytes memory data) public { │ ──┬─ ──┬─ - │ ╰───────────────────── def: 2 + │ ╰───────────────────── name: 2 │ │ - │ ╰─── def: 3 + │ ╰─── name: 3 3 │ 0x2d3fC875de7Fe7Da43AD0afa0E7023c9B91D06b1.delegatecall(data); │ ──────┬───── ──┬─ │ ╰──────────── ref: built-in │ │ │ ╰─── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test(bytes memory data) public { + │ │ │ ────────┬──────── + │ │ │ ╰────────── definiens: 3 + ┆ ┆ ┆ + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 5 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/literal_integers/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/literal_integers/generated/0.4.11-success.txt index e00ce09b33..85bb139759 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/literal_integers/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/literal_integers/generated/0.4.11-success.txt @@ -5,23 +5,46 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function nop(uint256 x) internal {} │ ─┬─ ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 5 │ using Lib for uint256; │ ─┬─ │ ╰─── ref: 1 6 │ function test() public { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 7 │ (50 * 10**uint(4)).nop(); │ ─┬─ │ ╰─── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ library Lib { + 2 │ │ function nop(uint256 x) internal {} + │ │ ────────────────────┬┬────────────────── + │ │ ╰───────────────────── definiens: 2 + │ │ │ + │ │ ╰──────────────────── definiens: 3 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 6 │ │ ╭───▶ function test() public { + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/new_output/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/new_output/generated/0.4.11-success.txt index 3131836a34..12d65a079d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/new_output/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/new_output/generated/0.4.11-success.txt @@ -5,10 +5,10 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test_new() public returns (uint) { │ ────┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ return new Container().cell().value; │ ────┬──── ──┬─ ──┬── │ ╰───────────────────── ref: 3 @@ -19,20 +19,50 @@ References and definitions: │ 7 │ contract Container { │ ────┬──── - │ ╰────── def: 3 + │ ╰────── name: 3 8 │ struct Resource { │ ────┬─── - │ ╰───── def: 4 + │ ╰───── name: 4 9 │ uint value; │ ──┬── - │ ╰──── def: 5 + │ ╰──── name: 5 │ 12 │ function cell() public returns (Resource memory) { │ ──┬─ ────┬─── - │ ╰────────────────────────────── def: 6 + │ ╰────────────────────────────── name: 6 │ │ │ ╰───── ref: 4 13 │ return Resource(1); │ ────┬─── │ ╰───── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ────▶ contract Test { + 2 │ │ ╭─────▶ function test_new() public returns (uint) { + ┆ ┆ ┆ + 4 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 2 + 5 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────── definiens: 1 + 6 │ ╭─────────▶ + ┆ ┆ ┆ + 8 │ │ ╭─▶ struct Resource { + 9 │ │ │ uint value; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 5 + 10 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 4 + 11 │ │ ╭───▶ + ┆ ┆ ┆ + 14 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 6 + 15 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 3 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.4.11-failure.txt index 5bc1e6badb..ffc3024007 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.4.11-failure.txt @@ -22,19 +22,40 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ error Failure( │ ──┬── ───┬─── │ ╰──────────── unresolved │ │ - │ ╰───── def: 2 + │ ╰───── name: 2 │ 7 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 8 │ revert Failure({severity: 100, cause: "Testing"}); │ ───┬── ───┬─── │ ╰──────────── ref: built-in │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract Test { + 2 │ │ ╭─▶ error Failure( + ┆ ┆ ┆ + 5 │ │ │ ├─▶ ); + │ │ │ │ + │ │ │ ╰──────────── definiens: 2 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 8 │ │ │ revert Failure({severity: 100, cause: "Testing"}); + │ │ │ ─────────────────────────────┬───────────────────────────── + │ │ │ ╰─────────────────────────────── definiens: 4 + 9 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 3 + 10 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.4.22-failure.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.4.22-failure.txt index 63b66f6878..5186404bc8 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.4.22-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.4.22-failure.txt @@ -22,19 +22,40 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ error Failure( │ ──┬── ───┬─── │ ╰──────────── unresolved │ │ - │ ╰───── def: 2 + │ ╰───── name: 2 │ 7 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 8 │ revert Failure({severity: 100, cause: "Testing"}); │ ───┬── ───┬─── │ ╰──────────── refs: built-in, built-in │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract Test { + 2 │ │ ╭─▶ error Failure( + ┆ ┆ ┆ + 5 │ │ │ ├─▶ ); + │ │ │ │ + │ │ │ ╰──────────── definiens: 2 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 8 │ │ │ revert Failure({severity: 100, cause: "Testing"}); + │ │ │ ─────────────────────────────┬───────────────────────────── + │ │ │ ╰─────────────────────────────── definiens: 4 + 9 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 3 + 10 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.8.4-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.8.4-success.txt index 38585417c4..13762d0bba 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.8.4-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/revert_named_args/generated/0.8.4-success.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ error Failure( │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ uint severity, │ ────┬─── - │ ╰───── def: 3 + │ ╰───── name: 3 4 │ string cause │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 │ 7 │ function test() public { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 8 │ revert Failure({severity: 100, cause: "Testing"}); │ ───┬─── ────┬─── ──┬── │ ╰─────────────────────────── ref: 2 @@ -27,3 +27,26 @@ References and definitions: │ │ │ ╰──── ref: 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract Test { + 2 │ │ ╭─▶ error Failure( + 3 │ │ │ uint severity, + │ │ │ ──────────┬────────── + │ │ │ ╰──────────── definiens: 3 + 4 │ │ │ string cause + │ │ │ ──────────┬────────── + │ │ │ ╰──────────── definiens: 4 + 5 │ │ │ ├─▶ ); + │ │ │ │ + │ │ │ ╰──────────── definiens: 2 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 9 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 10 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.4.11-failure.txt index fd76e5e73b..1644fa3e62 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.4.11-failure.txt @@ -20,23 +20,48 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Answer { Yes, No } │ ───┬── ─┬─ ─┬ - │ ╰────────────── def: 2 + │ ╰────────────── name: 2 │ │ │ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 3 │ function testFunc() { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 4 │ string name = type(Test).name; │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 5 │ Answer first = type(Answer).min; │ ───┬── ──┬── │ ╰────────── ref: 2 │ │ - │ ╰──── def: 7 + │ ╰──── name: 7 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ enum Answer { Yes, No } + │ │ │ ──────────────┬────┬────┬─── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ │ + │ │ │ ╰────────── definiens: 3 + │ │ │ │ + │ │ │ ╰───── definiens: 4 + 3 │ │ ╭─▶ function testFunc() { + 4 │ │ │ string name = type(Test).name; + │ │ │ ───────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 6 + 5 │ │ │ Answer first = type(Answer).min; + │ │ │ ────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 7 + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 5 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.5.3-failure.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.5.3-failure.txt index dcc5b68286..1ac4f65ba5 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.5.3-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.5.3-failure.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Answer { Yes, No } │ ───┬── ─┬─ ─┬ - │ ╰────────────── def: 2 + │ ╰────────────── name: 2 │ │ │ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 3 │ function testFunc() { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 4 │ string name = type(Test).name; │ ──┬─ ──┬─ ──┬─ - │ ╰───────────────────── def: 6 + │ ╰───────────────────── name: 6 │ │ │ │ ╰───────── ref: 1 │ │ @@ -27,9 +27,34 @@ References and definitions: │ ───┬── ──┬── ───┬── ─┬─ │ ╰───────────────────────────── ref: 2 │ │ │ │ - │ ╰─────────────────────── def: 7 + │ ╰─────────────────────── name: 7 │ │ │ │ ╰───────── ref: 2 │ │ │ ╰─── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ enum Answer { Yes, No } + │ │ │ ──────────────┬────┬────┬─── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ │ + │ │ │ ╰────────── definiens: 3 + │ │ │ │ + │ │ │ ╰───── definiens: 4 + 3 │ │ ╭─▶ function testFunc() { + 4 │ │ │ string name = type(Test).name; + │ │ │ ───────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 6 + 5 │ │ │ Answer first = type(Answer).min; + │ │ │ ────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 7 + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 5 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.6.8-success.txt b/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.6.8-success.txt index 295aa83251..f34a36c4f8 100644 --- a/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.6.8-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/expressions/type_expr/generated/0.6.8-success.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ enum Answer { Yes, No } │ ───┬── ─┬─ ─┬ - │ ╰────────────── def: 2 + │ ╰────────────── name: 2 │ │ │ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 3 │ function testFunc() { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 4 │ string name = type(Test).name; │ ──┬─ ──┬─ ──┬─ - │ ╰───────────────────── def: 6 + │ ╰───────────────────── name: 6 │ │ │ │ ╰───────── ref: 1 │ │ @@ -27,9 +27,34 @@ References and definitions: │ ───┬── ──┬── ───┬── ─┬─ │ ╰───────────────────────────── ref: 2 │ │ │ │ - │ ╰─────────────────────── def: 7 + │ ╰─────────────────────── name: 7 │ │ │ │ ╰───────── ref: 2 │ │ │ ╰─── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ enum Answer { Yes, No } + │ │ │ ──────────────┬────┬────┬─── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ │ + │ │ │ ╰────────── definiens: 3 + │ │ │ │ + │ │ │ ╰───── definiens: 4 + 3 │ │ ╭─▶ function testFunc() { + 4 │ │ │ string name = type(Test).name; + │ │ │ ───────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 6 + 5 │ │ │ Answer first = type(Answer).min; + │ │ │ ────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 7 + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 5 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/function_types/call/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/function_types/call/generated/0.4.11-success.txt index f0a6bd09a5..53892dc979 100644 --- a/crates/solidity/testing/snapshots/bindings_output/function_types/call/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/function_types/call/generated/0.4.11-success.txt @@ -5,24 +5,46 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Value { │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ int x; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 │ 5 │ function test(function() returns (Value) f) public { │ ──┬─ ──┬── ┬ - │ ╰──────────────────────────────── def: 4 + │ ╰──────────────────────────────── name: 4 │ │ │ │ ╰─────── ref: 2 │ │ - │ ╰── def: 5 + │ ╰── name: 5 6 │ f().x; │ ┬ ┬ │ ╰────── ref: 5 │ │ │ ╰── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract Test { + 2 │ │ ╭─▶ struct Value { + 3 │ │ │ int x; + │ │ │ ───────┬─────── + │ │ │ ╰───────── definiens: 3 + 4 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 5 │ │ ╭───▶ function test(function() returns (Value) f) public { + │ │ │ ──────────────┬───────────── + │ │ │ ╰─────────────── definiens: 5 + ┆ ┆ ┆ + 7 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 4 + 8 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.4.11-failure.txt index 602dbbe87b..545d724b84 100644 --- a/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.4.11-failure.txt @@ -5,13 +5,13 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ function() external v1; │ ─┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ v1.selector; │ ─┬ ────┬─── │ ╰─────────── ref: 3 @@ -23,3 +23,19 @@ References and definitions: │ │ │ ╰───── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + 3 │ │ │ function() external v1; + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 3 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.4.21-failure.txt b/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.4.21-failure.txt index 635cff9d57..a63f6255a6 100644 --- a/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.4.21-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.4.21-failure.txt @@ -5,13 +5,13 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ function() external v1; │ ─┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ v1.selector; │ ─┬ ────┬─── │ ╰─────────── ref: 3 @@ -23,3 +23,19 @@ References and definitions: │ │ │ ╰───── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + 3 │ │ │ function() external v1; + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 3 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.8.4-success.txt b/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.8.4-success.txt index d3e93e6064..939e87832d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.8.4-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/function_types/externals/generated/0.8.4-success.txt @@ -5,13 +5,13 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ function() external v1; │ ─┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ v1.selector; │ ─┬ ────┬─── │ ╰─────────── ref: 3 @@ -23,3 +23,19 @@ References and definitions: │ │ │ ╰───── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + 3 │ │ │ function() external v1; + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 3 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/function_types/reference/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/function_types/reference/generated/0.4.11-success.txt index c5846153e1..3d152a627e 100644 --- a/crates/solidity/testing/snapshots/bindings_output/function_types/reference/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/function_types/reference/generated/0.4.11-success.txt @@ -5,25 +5,25 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ function() v1 = Test.test; │ ─┬ ──┬─ ──┬─ - │ ╰────────────── def: 3 + │ ╰────────────── name: 3 │ │ │ │ ╰──────── ref: 1 │ │ │ ╰─── ref: 2 4 │ function() v2 = test; │ ─┬ ──┬─ - │ ╰───────── def: 4 + │ ╰───────── name: 4 │ │ │ ╰─── ref: 2 5 │ function() v3 = Foo.bar; │ ─┬ ─┬─ ─┬─ - │ ╰──────────── def: 5 + │ ╰──────────── name: 5 │ │ │ │ ╰─────── ref: 6 │ │ @@ -31,8 +31,37 @@ References and definitions: │ 9 │ library Foo { │ ─┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 10 │ function bar() internal {} │ ─┬─ - │ ╰─── def: 7 + │ ╰─── name: 7 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ──▶ contract Test { + 2 │ │ ╭───▶ function test() public { + 3 │ │ │ function() v1 = Test.test; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 3 + 4 │ │ │ function() v2 = test; + │ │ │ ───────────────┬────────────── + │ │ │ ╰──────────────── definiens: 4 + 5 │ │ │ function() v3 = Foo.bar; + │ │ │ ────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 5 + 6 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 7 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 8 │ ╭─▶ + ┆ ┆ + 10 │ │ function bar() internal {} + │ │ ───────────────┬─────────────── + │ │ ╰───────────────── definiens: 7 + 11 │ ├─▶ } + │ │ + │ ╰─────── definiens: 6 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.4.11-failure.txt index 52f1230ca7..5893648bad 100644 --- a/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.4.11-failure.txt @@ -15,7 +15,14 @@ References and definitions: │ 1 │ import "./other.sol" as other; │ ──┬── - │ ╰──── def: 1 + │ ╰──── name: 1 +───╯ +Definiens: + ╭─[main.sol:1:1] + │ + 1 │ import "./other.sol" as other; + │ ───────────┬─────────── + │ ╰───────────── definiens: 1 ───╯ Parse errors: Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryKeyword or PragmaKeyword. @@ -28,3 +35,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.6.0-failure.txt index fd3dd4b321..98dd996b07 100644 --- a/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.6.0-failure.txt @@ -15,7 +15,14 @@ References and definitions: │ 1 │ import "./other.sol" as other; │ ──┬── - │ ╰──── def: 1 + │ ╰──── name: 1 +───╯ +Definiens: + ╭─[main.sol:1:1] + │ + 1 │ import "./other.sol" as other; + │ ───────────┬─────────── + │ ╰───────────── definiens: 1 ───╯ Parse errors: Error: Expected ContractKeyword or EnumKeyword or ImportKeyword or InterfaceKeyword or LibraryKeyword or PragmaKeyword or StructKeyword. @@ -28,3 +35,4 @@ Error: Expected ContractKeyword or EnumKeyword or ImportKeyword or InterfaceKeyw │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.7.1-success.txt b/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.7.1-success.txt index 6054749263..d402c25912 100644 --- a/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.7.1-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/imports/alias_import/generated/0.7.1-success.txt @@ -5,21 +5,42 @@ References and definitions: │ 1 │ import "./other.sol" as other; │ ──┬── - │ ╰──── def: 1 + │ ╰──── name: 1 │ 3 │ function foo() returns (int) { │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 4 │ return other.bar(); │ ──┬── ─┬─ │ ╰──────── ref: 1 │ │ │ ╰─── ref: 3 ───╯ +Definiens: + ╭─[main.sol:1:1] + │ + 1 │ │ import "./other.sol" as other; + │ │ ───────────┬─────────── + │ │ ╰───────────── definiens: 1 + 2 │ ╭─▶ + ┆ ┆ + 5 │ ├─▶ } + │ │ + │ ╰─────── definiens: 2 +───╯ References and definitions: ╭─[other.sol:1:1] │ 1 │ function bar() pure returns (int) { │ ─┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 +───╯ +Definiens: + ╭─[other.sol:1:1] + │ + 1 │ ╭─▶ function bar() pure returns (int) { + ┆ ┆ + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 3 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.4.11-failure.txt index 785a805409..eb693de41a 100644 --- a/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.4.11-failure.txt @@ -11,6 +11,7 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰────── Error occurred here. ───╯ References and definitions: +Definiens: Parse errors: Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryKeyword or PragmaKeyword. ╭─[other.sol:1:1] @@ -22,3 +23,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.6.0-failure.txt index 44a0abfd5f..1ed04d8def 100644 --- a/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.6.0-failure.txt @@ -11,6 +11,7 @@ Error: Expected ContractKeyword or EnumKeyword or ImportKeyword or InterfaceKeyw │ ╰────── Error occurred here. ───╯ References and definitions: +Definiens: Parse errors: Error: Expected ContractKeyword or EnumKeyword or ImportKeyword or InterfaceKeyword or LibraryKeyword or PragmaKeyword or StructKeyword. ╭─[other.sol:1:1] @@ -22,3 +23,4 @@ Error: Expected ContractKeyword or EnumKeyword or ImportKeyword or InterfaceKeyw │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.7.1-success.txt b/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.7.1-success.txt index d759516cb7..95824994ce 100644 --- a/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.7.1-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/imports/default/generated/0.7.1-success.txt @@ -5,15 +5,33 @@ References and definitions: │ 3 │ function foo() returns (int) { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 4 │ return bar(); │ ─┬─ │ ╰─── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 2 │ ╭─▶ + ┆ ┆ + 5 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +───╯ References and definitions: ╭─[other.sol:1:1] │ 1 │ function bar() pure returns (int) { │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 +───╯ +Definiens: + ╭─[other.sol:1:1] + │ + 1 │ ╭─▶ function bar() pure returns (int) { + ┆ ┆ + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 2 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/interfaces/inheritance/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/interfaces/inheritance/generated/0.4.11-success.txt index 858e4d4fbb..698ef98ba2 100644 --- a/crates/solidity/testing/snapshots/bindings_output/interfaces/inheritance/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/interfaces/inheritance/generated/0.4.11-success.txt @@ -5,40 +5,40 @@ References and definitions: │ 1 │ interface Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ enum Type { up, down } │ ──┬─ ─┬ ──┬─ - │ ╰────────────── def: 2 + │ ╰────────────── name: 2 │ │ │ - │ ╰──────── def: 3 + │ ╰──────── name: 3 │ │ - │ ╰─── def: 4 + │ ╰─── name: 4 3 │ function count() external returns (uint); │ ──┬── - │ ╰──── def: 5 + │ ╰──── name: 5 │ 6 │ interface MutableCounter is Counter { │ ───────┬────── ───┬─── - │ ╰─────────────────── def: 6 + │ ╰─────────────────── name: 6 │ │ │ ╰───── ref: 1 7 │ function increment() external; │ ────┬──── - │ ╰────── def: 7 + │ ╰────── name: 7 │ 10 │ contract Test { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 11 │ function test(address _counter) public returns (uint) { │ ──┬─ ────┬─── - │ ╰──────────────────── def: 9 + │ ╰──────────────────── name: 9 │ │ - │ ╰───── def: 10 + │ ╰───── name: 10 12 │ MutableCounter m = MutableCounter(_counter); │ ───────┬────── ┬ ───────┬────── ────┬─── │ ╰──────────────────────────────────── ref: 6 │ │ │ │ - │ ╰──────────────────────────── def: 11 + │ ╰──────────────────────────── name: 11 │ │ │ │ ╰───────────────── ref: 6 │ │ @@ -49,7 +49,7 @@ References and definitions: │ │ │ │ ╰───── ref: 2 │ │ - │ ╰── def: 12 + │ ╰── name: 12 14 │ m.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 11 @@ -61,3 +61,47 @@ References and definitions: │ │ │ ╰──── ref: 5 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ interface Counter { + 2 │ │ enum Type { up, down } + │ │ ─────────────┬───┬────┬──── + │ │ ╰─────────────── definiens: 2 + │ │ │ │ + │ │ ╰─────────── definiens: 3 + │ │ │ + │ │ ╰────── definiens: 4 + 3 │ │ function count() external returns (uint); + │ │ ───────────────────────┬────────────────────── + │ │ ╰──────────────────────── definiens: 5 + 4 │ ├─│ ▶ } + │ │ │ + │ ╰───────── definiens: 1 + 5 │ ╭─▶ + ┆ ┆ + 7 │ │ function increment() external; + │ │ ─────────────────┬───────────────── + │ │ ╰─────────────────── definiens: 7 + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 6 + 9 │ ╭───────▶ + ┆ ┆ ┆ + 11 │ │ ╭─────▶ function test(address _counter) public returns (uint) { + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 10 + 12 │ │ │ MutableCounter m = MutableCounter(_counter); + │ │ │ ──────────────────────────┬────────────────────────── + │ │ │ ╰──────────────────────────── definiens: 11 + 13 │ │ │ MutableCounter.Type t; + │ │ │ ───────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 12 + ┆ ┆ ┆ + 16 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 9 + 17 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 8 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/interfaces/own_types_access/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/interfaces/own_types_access/generated/0.4.11-success.txt index bfc96cf8da..a45e79f764 100644 --- a/crates/solidity/testing/snapshots/bindings_output/interfaces/own_types_access/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/interfaces/own_types_access/generated/0.4.11-success.txt @@ -5,19 +5,39 @@ References and definitions: │ 1 │ interface IFoo { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Bar { │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ int value; │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 5 │ function test(Bar memory bar); │ ──┬─ ─┬─ ─┬─ - │ ╰────────────────── def: 4 + │ ╰────────────────── name: 4 │ │ │ │ ╰────────────── ref: 2 │ │ - │ ╰─── def: 5 + │ ╰─── name: 5 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ interface IFoo { + 2 │ │ ╭─▶ struct Bar { + 3 │ │ │ int value; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 5 │ │ function test(Bar memory bar); + │ │ ─────────────────┬───────┬───────── + │ │ ╰─────────────────── definiens: 4 + │ │ │ + │ │ ╰─────────── definiens: 5 + 6 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/interfaces/simple/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/interfaces/simple/generated/0.4.11-success.txt index f5808d6f7d..d43c9ae2f8 100644 --- a/crates/solidity/testing/snapshots/bindings_output/interfaces/simple/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/interfaces/simple/generated/0.4.11-success.txt @@ -5,19 +5,19 @@ References and definitions: │ 1 │ interface Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ function count() external returns (uint); │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ contract Test { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 6 │ function test(address _counter) public returns (uint) { │ ──┬─ ────┬─── - │ ╰──────────────────── def: 4 + │ ╰──────────────────── name: 4 │ │ - │ ╰───── def: 5 + │ ╰───── name: 5 7 │ return Counter(_counter).count(); │ ───┬─── ────┬─── ──┬── │ ╰───────────────────── ref: 1 @@ -26,3 +26,26 @@ References and definitions: │ │ │ ╰──── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ interface Counter { + 2 │ │ function count() external returns (uint); + │ │ ───────────────────────┬────────────────────── + │ │ ╰──────────────────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ + ┆ ┆ ┆ + 6 │ │ ╭───▶ function test(address _counter) public returns (uint) { + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 5 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 4 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 3 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/interfaces/visibility/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/interfaces/visibility/generated/0.4.11-success.txt index 7e688f770f..83b755a551 100644 --- a/crates/solidity/testing/snapshots/bindings_output/interfaces/visibility/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/interfaces/visibility/generated/0.4.11-success.txt @@ -5,40 +5,40 @@ References and definitions: │ 1 │ interface Example { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ enum Choice { One, Two } │ ───┬── ─┬─ ─┬─ - │ ╰─────────────── def: 2 + │ ╰─────────────── name: 2 │ │ │ - │ ╰──────── def: 3 + │ ╰──────── name: 3 │ │ - │ ╰─── def: 4 + │ ╰─── name: 4 3 │ struct Book { string author; } │ ──┬─ ───┬── - │ ╰─────────────────── def: 5 + │ ╰─────────────────── name: 5 │ │ - │ ╰──── def: 6 + │ ╰──── name: 6 4 │ function calculate() returns (Choice); │ ────┬──── ───┬── - │ ╰──────────────────────── def: 7 + │ ╰──────────────────────── name: 7 │ │ │ ╰──── ref: 2 5 │ function get_book() returns (Book); │ ────┬─── ──┬─ - │ ╰───────────────────── def: 8 + │ ╰───────────────────── name: 8 │ │ │ ╰─── ref: 5 │ 8 │ contract Test { │ ──┬─ - │ ╰─── def: 9 + │ ╰─── name: 9 9 │ Example.Choice choice = Example.Choice.One; │ ───┬─── ───┬── ───┬── ───┬─── ───┬── ─┬─ │ ╰──────────────────────────────────────── ref: 1 │ │ │ │ │ │ │ ╰──────────────────────────────── ref: 2 │ │ │ │ │ - │ ╰───────────────────────── def: 10 + │ ╰───────────────────────── name: 10 │ │ │ │ │ ╰──────────────── ref: 1 │ │ │ @@ -51,5 +51,42 @@ References and definitions: │ │ │ │ ╰──────── ref: 5 │ │ - │ ╰─── def: 11 + │ ╰─── name: 11 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ interface Example { + 2 │ │ enum Choice { One, Two } + │ │ ──────────────┬────┬────┬──── + │ │ ╰──────────────── definiens: 2 + │ │ │ │ + │ │ ╰─────────── definiens: 3 + │ │ │ + │ │ ╰────── definiens: 4 + 3 │ │ struct Book { string author; } + │ │ ─────────────────┬──────┬────────── + │ │ ╰─────────────────── definiens: 5 + │ │ │ + │ │ ╰──────────── definiens: 6 + 4 │ │ function calculate() returns (Choice); + │ │ ─────────────────────┬───────────────────── + │ │ ╰─────────────────────── definiens: 7 + 5 │ │ function get_book() returns (Book); + │ │ ────────────────────┬─────────────────── + │ │ ╰───────────────────── definiens: 8 + 6 │ ├─│ ▶ } + │ │ │ + │ ╰───────── definiens: 1 + 7 │ ╭─▶ + ┆ ┆ + 9 │ │ Example.Choice choice = Example.Choice.One; + │ │ ────────────────────────┬─────────────────────── + │ │ ╰───────────────────────── definiens: 10 + 10 │ │ Example.Book book; + │ │ ───────────┬─────────── + │ │ ╰───────────── definiens: 11 + 11 │ ├─▶ } + │ │ + │ ╰─────── definiens: 9 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/libraries/constants/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/libraries/constants/generated/0.4.11-success.txt index d83d224dfa..c29c7c6317 100644 --- a/crates/solidity/testing/snapshots/bindings_output/libraries/constants/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/libraries/constants/generated/0.4.11-success.txt @@ -5,30 +5,59 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ uint private constant X = 1; │ ┬ - │ ╰── def: 2 + │ ╰── name: 2 3 │ uint public constant Y = 2; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 │ 5 │ function test() public returns (uint) { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 6 │ return X; │ ┬ │ ╰── ref: 2 │ 10 │ contract Test { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 11 │ function test() public { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 12 │ Lib.Y; │ ─┬─ ┬ │ ╰───── ref: 1 │ │ │ ╰── ref: 3 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───────▶ library Lib { + 2 │ │ uint private constant X = 1; + │ │ ────────────────┬──────────────── + │ │ ╰────────────────── definiens: 2 + 3 │ │ │ uint public constant Y = 2; + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 3 + 4 │ │ ╭─────▶ + ┆ ┆ ┆ + 7 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 4 + 8 │ ├───│ ──▶ } + │ │ │ + │ ╰───────────── definiens: 1 + 9 │ ╭───▶ + ┆ ┆ ┆ + 11 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 13 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 6 + 14 │ ├───▶ } + │ │ + │ ╰───────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers/generated/0.4.11-success.txt index 3fa6594466..1daa30a25b 100644 --- a/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers/generated/0.4.11-success.txt @@ -5,17 +5,33 @@ References and definitions: │ 1 │ library Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ modifier withinRange() { │ ─────┬───── - │ ╰─────── def: 2 + │ ╰─────── name: 2 3 │ _; │ ┬ │ ╰── ref: built-in │ 5 │ function test() internal withinRange() {} │ ──┬─ ─────┬───── - │ ╰────────────────────────── def: 3 + │ ╰────────────────────────── name: 3 │ │ │ ╰─────── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ library Test { + 2 │ │ ╭─▶ modifier withinRange() { + ┆ ┆ ┆ + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 5 │ │ function test() internal withinRange() {} + │ │ ───────────────────────┬────────────────────── + │ │ ╰──────────────────────── definiens: 3 + 6 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.4.11-failure.txt index 6e61f4eb45..d5e32f5384 100644 --- a/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.4.11-failure.txt @@ -20,19 +20,38 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ error IndexOutOfBounds(); │ ──┬── ────────┬─────── │ ╰───────────────────── unresolved │ │ - │ ╰───────── def: 2 + │ ╰───────── name: 2 │ 4 │ modifier test() { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ revert IndexOutOfBounds(); │ ───┬── ────────┬─────── │ ╰───────────────────── ref: built-in │ │ - │ ╰───────── def: 4 + │ ╰───────── name: 4 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ library Lib { + 2 │ │ │ error IndexOutOfBounds(); + │ │ │ ──────────────┬───────────── + │ │ │ ╰─────────────── definiens: 2 + 3 │ │ ╭─▶ + ┆ ┆ ┆ + 5 │ │ │ revert IndexOutOfBounds(); + │ │ │ ───────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 4 + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰───────── definiens: 3 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.4.22-failure.txt b/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.4.22-failure.txt index 622f19db63..ba956188a3 100644 --- a/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.4.22-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.4.22-failure.txt @@ -20,19 +20,38 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ error IndexOutOfBounds(); │ ──┬── ────────┬─────── │ ╰───────────────────── unresolved │ │ - │ ╰───────── def: 2 + │ ╰───────── name: 2 │ 4 │ modifier test() { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ revert IndexOutOfBounds(); │ ───┬── ────────┬─────── │ ╰───────────────────── refs: built-in, built-in │ │ - │ ╰───────── def: 4 + │ ╰───────── name: 4 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ library Lib { + 2 │ │ │ error IndexOutOfBounds(); + │ │ │ ──────────────┬───────────── + │ │ │ ╰─────────────── definiens: 2 + 3 │ │ ╭─▶ + ┆ ┆ ┆ + 5 │ │ │ revert IndexOutOfBounds(); + │ │ │ ───────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 4 + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰───────── definiens: 3 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.8.4-success.txt b/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.8.4-success.txt index ef7dba6b93..8e3bbead87 100644 --- a/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.8.4-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/libraries/modifiers_scope/generated/0.8.4-success.txt @@ -5,15 +5,31 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ error IndexOutOfBounds(); │ ────────┬─────── - │ ╰───────── def: 2 + │ ╰───────── name: 2 │ 4 │ modifier test() { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ revert IndexOutOfBounds(); │ ────────┬─────── │ ╰───────── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ library Lib { + 2 │ │ │ error IndexOutOfBounds(); + │ │ │ ──────────────┬───────────── + │ │ │ ╰─────────────── definiens: 2 + 3 │ │ ╭─▶ + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰───────── definiens: 3 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/libraries/propagate_dynamic_scope/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/libraries/propagate_dynamic_scope/generated/0.4.11-success.txt index ce220baf55..51bfe7418a 100644 --- a/crates/solidity/testing/snapshots/bindings_output/libraries/propagate_dynamic_scope/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/libraries/propagate_dynamic_scope/generated/0.4.11-success.txt @@ -5,36 +5,36 @@ References and definitions: │ 1 │ interface IERC20Upgradable { │ ────────┬─────── - │ ╰───────── def: 1 + │ ╰───────── name: 1 2 │ function allowance(address owner) external returns (uint256); │ ────┬──── ──┬── - │ ╰──────────────────── def: 2 + │ ╰──────────────────── name: 2 │ │ - │ ╰──── def: 3 + │ ╰──── name: 3 │ 4 │ library Math { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 5 │ function nop(uint256 x) public {} │ ─┬─ ┬ - │ ╰───────────── def: 5 + │ ╰───────────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 │ 7 │ library Test { │ ──┬─ - │ ╰─── def: 7 + │ ╰─── name: 7 8 │ using Math for uint256; │ ──┬─ │ ╰─── ref: 4 │ 10 │ function test(IERC20Upgradable token) internal { │ ──┬─ ────────┬─────── ──┬── - │ ╰────────────────────────── def: 8 + │ ╰────────────────────────── name: 8 │ │ │ │ ╰─────────────── ref: 1 │ │ - │ ╰──── def: 9 + │ ╰──── name: 9 11 │ token.allowance(msg.sender).nop(); │ ──┬── ────┬──── ─┬─ ───┬── ─┬─ │ ╰────────────────────────────── ref: 9 @@ -47,3 +47,38 @@ References and definitions: │ │ │ ╰─── ref: 5 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ interface IERC20Upgradable { + 2 │ │ function allowance(address owner) external returns (uint256); + │ │ ─────────────────────────────┬───┬──────────────────────────────── + │ │ ╰────────────────────────────────────── definiens: 3 + │ │ │ + │ │ ╰────────────────────────────────── definiens: 2 + 3 │ ├─│ ▶ } + │ │ │ + │ ╰───────── definiens: 1 + 4 │ ╭─▶ library Math { + 5 │ │ function nop(uint256 x) public {} + │ │ ───────────────────┬─┬──────────────── + │ │ ╰──────────────────── definiens: 5 + │ │ │ + │ │ ╰────────────────── definiens: 6 + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 4 + 7 │ ╭───────▶ library Test { + ┆ ┆ ┆ + 9 │ │ ╭─────▶ + 10 │ │ │ function test(IERC20Upgradable token) internal { + │ │ │ ───────────┬────────── + │ │ │ ╰──────────── definiens: 9 + ┆ ┆ ┆ + 12 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 8 + 13 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 7 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/libraries/visibility/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/libraries/visibility/generated/0.4.11-success.txt index b63080cf96..ee69539b5e 100644 --- a/crates/solidity/testing/snapshots/bindings_output/libraries/visibility/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/libraries/visibility/generated/0.4.11-success.txt @@ -5,25 +5,25 @@ References and definitions: │ 1 │ library MyLib { │ ──┬── - │ ╰──── def: 1 + │ ╰──── name: 1 2 │ enum Choice { One, Two } │ ───┬── ─┬─ ─┬─ - │ ╰─────────────── def: 2 + │ ╰─────────────── name: 2 │ │ │ - │ ╰──────── def: 3 + │ ╰──────── name: 3 │ │ - │ ╰─── def: 4 + │ ╰─── name: 4 3 │ struct Book { string author; } │ ──┬─ ───┬── - │ ╰─────────────────── def: 5 + │ ╰─────────────────── name: 5 │ │ - │ ╰──── def: 6 + │ ╰──── name: 6 │ 5 │ function build_book(string memory author) public returns (Book memory) { │ ─────┬──── ───┬── ──┬─ - │ ╰───────────────────────────────────────────────── def: 7 + │ ╰───────────────────────────────────────────────── name: 7 │ │ │ - │ ╰────────────────────────── def: 8 + │ ╰────────────────────────── name: 8 │ │ │ ╰─── ref: 5 6 │ return Book(author); @@ -34,7 +34,7 @@ References and definitions: │ 9 │ function favorite_choice() public returns (Choice) { │ ───────┬─────── ───┬── - │ ╰────────────────────────────────── def: 9 + │ ╰────────────────────────────────── name: 9 │ │ │ ╰──── ref: 2 10 │ return Choice.One; @@ -45,25 +45,25 @@ References and definitions: │ 14 │ contract UsingLib { │ ────┬─── - │ ╰───── def: 10 + │ ╰───── name: 10 15 │ MyLib.Choice choice; │ ──┬── ───┬── ───┬── │ ╰────────────────── ref: 1 │ │ │ │ ╰─────────── ref: 2 │ │ - │ ╰──── def: 11 + │ ╰──── name: 11 16 │ MyLib.Book book; │ ──┬── ──┬─ ──┬─ │ ╰────────────── ref: 1 │ │ │ │ ╰──────── ref: 5 │ │ - │ ╰─── def: 12 + │ ╰─── name: 12 │ 18 │ function test() public { │ ──┬─ - │ ╰─── def: 13 + │ ╰─── name: 13 19 │ book = MyLib.build_book("John Doe"); │ ──┬─ ──┬── ─────┬──── │ ╰────────────────────── ref: 12 @@ -79,3 +79,52 @@ References and definitions: │ │ │ ╰───────── ref: 9 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────────▶ library MyLib { + 2 │ │ enum Choice { One, Two } + │ │ ──────────────┬────┬────┬──── + │ │ ╰──────────────── definiens: 2 + │ │ │ │ + │ │ ╰─────────── definiens: 3 + │ │ │ + │ │ ╰────── definiens: 4 + 3 │ │ │ struct Book { string author; } + │ │ │ ─────────────────┬──────┬────────── + │ │ │ ╰─────────────────── definiens: 5 + │ │ │ │ + │ │ │ ╰──────────── definiens: 6 + 4 │ │ ╭───▶ + 5 │ │ │ function build_book(string memory author) public returns (Book memory) { + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 8 + ┆ ┆ ┆ + 7 │ │ ├─│ ▶ } + │ │ │ │ + │ │ ╰───────────── definiens: 7 + 8 │ │ ╭─▶ + ┆ ┆ ┆ + 11 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 9 + 12 │ ├─│ ──────▶ } + │ │ │ + │ ╰─────────────── definiens: 1 + 13 │ ╭───────▶ + ┆ ┆ + 15 │ │ MyLib.Choice choice; + │ │ ────────────┬──────────── + │ │ ╰────────────── definiens: 11 + 16 │ │ │ MyLib.Book book; + │ │ │ ──────────┬────────── + │ │ │ ╰──────────── definiens: 12 + 17 │ │ ╭─────▶ + ┆ ┆ ┆ + 21 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 13 + 22 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 10 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/mappings/custom_types/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/mappings/custom_types/generated/0.4.11-success.txt index 46a3331820..e9176be507 100644 --- a/crates/solidity/testing/snapshots/bindings_output/mappings/custom_types/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/mappings/custom_types/generated/0.4.11-success.txt @@ -5,40 +5,40 @@ References and definitions: │ 1 │ contract Mappings { │ ────┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ enum Direction { North, East, South, West } │ ────┬──── ──┬── ──┬─ ──┬── ──┬─ - │ ╰───────────────────────────────── def: 2 + │ ╰───────────────────────────────── name: 2 │ │ │ │ │ - │ ╰─────────────────────── def: 3 + │ ╰─────────────────────── name: 3 │ │ │ │ - │ ╰──────────────── def: 4 + │ ╰──────────────── name: 4 │ │ │ - │ ╰────────── def: 5 + │ ╰────────── name: 5 │ │ - │ ╰─── def: 6 + │ ╰─── name: 6 3 │ enum Kind { Zombie, Bat, Skeleton, Dragon } │ ──┬─ ───┬── ─┬─ ────┬─── ───┬── - │ ╰─────────────────────────────────── def: 7 + │ ╰─────────────────────────────────── name: 7 │ │ │ │ │ - │ ╰─────────────────────────── def: 8 + │ ╰─────────────────────────── name: 8 │ │ │ │ - │ ╰───────────────────── def: 9 + │ ╰───────────────────── name: 9 │ │ │ - │ ╰───────────── def: 10 + │ ╰───────────── name: 10 │ │ - │ ╰──── def: 11 + │ ╰──── name: 11 4 │ struct Monster { │ ───┬─── - │ ╰───── def: 12 + │ ╰───── name: 12 5 │ Kind kind; │ ──┬─ ──┬─ │ ╰──────── ref: 7 │ │ - │ ╰─── def: 13 + │ ╰─── name: 13 6 │ uint life; │ ──┬─ - │ ╰─── def: 14 + │ ╰─── name: 14 │ 9 │ mapping(Direction => Monster) monsters; │ ────┬──── ───┬─── ────┬─── @@ -46,19 +46,19 @@ References and definitions: │ │ │ │ ╰─────────────── ref: 12 │ │ - │ ╰───── def: 15 + │ ╰───── name: 15 │ 11 │ function spawn(Direction _dir, Kind _kind) public { │ ──┬── ────┬──── ──┬─ ──┬─ ──┬── - │ ╰─────────────────────────────── def: 16 + │ ╰─────────────────────────────── name: 16 │ │ │ │ │ │ ╰─────────────────────── ref: 2 │ │ │ │ - │ ╰─────────────── def: 17 + │ ╰─────────────── name: 17 │ │ │ │ ╰───────── ref: 7 │ │ - │ ╰──── def: 18 + │ ╰──── name: 18 12 │ monsters[_dir] = Monster(_kind, 100); │ ────┬─── ──┬─ ───┬─── ──┬── │ ╰─────────────────────────── ref: 15 @@ -71,13 +71,13 @@ References and definitions: │ 15 │ function attack(Direction _dir, uint _power) public { │ ───┬── ────┬──── ──┬─ ───┬── - │ ╰──────────────────────────────── def: 19 + │ ╰──────────────────────────────── name: 19 │ │ │ │ │ ╰──────────────────────── ref: 2 │ │ │ - │ ╰──────────────── def: 20 + │ ╰──────────────── name: 20 │ │ - │ ╰──── def: 21 + │ ╰──── name: 21 16 │ if (monsters[_dir].life > _power) { │ ────┬─── ──┬─ ──┬─ ───┬── │ ╰───────────────────────── ref: 15 @@ -105,11 +105,11 @@ References and definitions: │ 23 │ function get_type(Direction _dir) public returns (Kind) { │ ────┬─── ────┬──── ──┬─ ──┬─ - │ ╰────────────────────────────────────────── def: 22 + │ ╰────────────────────────────────────────── name: 22 │ │ │ │ │ ╰───────────────────────────────── ref: 2 │ │ │ - │ ╰───────────────────────── def: 23 + │ ╰───────────────────────── name: 23 │ │ │ ╰─── ref: 7 24 │ return monsters[_dir].kind; @@ -120,3 +120,75 @@ References and definitions: │ │ │ ╰─── ref: 13 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───────────▶ contract Mappings { + 2 │ │ enum Direction { North, East, South, West } + │ │ ───────────────────────┬┬─────┬─────┬──────┬──── + │ │ ╰────────────────────────── definiens: 3 + │ │ │ │ │ │ + │ │ ╰───────────────────────── definiens: 2 + │ │ │ │ │ + │ │ ╰─────────────────── definiens: 4 + │ │ │ │ + │ │ ╰───────────── definiens: 5 + │ │ │ + │ │ ╰────── definiens: 6 + 3 │ │ │ enum Kind { Zombie, Bat, Skeleton, Dragon } + │ │ │ ───────────────────┬────┬┬───────┬────────┬───── + │ │ │ ╰────────────────────────────── definiens: 8 + │ │ │ ││ │ │ + │ │ │ ╰───────────────────────── definiens: 7 + │ │ │ │ │ │ + │ │ │ ╰──────────────────────── definiens: 9 + │ │ │ │ │ + │ │ │ ╰──────────────── definiens: 10 + │ │ │ │ + │ │ │ ╰─────── definiens: 11 + 4 │ │ ╭───▶ struct Monster { + 5 │ │ │ Kind kind; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 13 + 6 │ │ │ uint life; + │ │ │ ─────────┬───────── + │ │ │ ╰─────────── definiens: 14 + 7 │ │ ├─│ ▶ } + │ │ │ │ + │ │ ╰───────────── definiens: 12 + 8 │ │ ╭─▶ + 9 │ │ │ ├─▶ mapping(Direction => Monster) monsters; + │ │ │ │ + │ │ │ ╰───────────────────────────────────────────────── definiens: 15 + 10 │ │ ╭───────▶ + 11 │ │ │ function spawn(Direction _dir, Kind _kind) public { + │ │ │ ───────┬────── ─────┬───── + │ │ │ ╰──────────────────── definiens: 17 + │ │ │ │ + │ │ │ ╰─────── definiens: 18 + ┆ ┆ ┆ + 13 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 16 + 14 │ │ ╭─────────▶ + 15 │ │ │ function attack(Direction _dir, uint _power) public { + │ │ │ ───────┬────── ──────┬───── + │ │ │ ╰───────────────────── definiens: 20 + │ │ │ │ + │ │ │ ╰─────── definiens: 21 + ┆ ┆ ┆ + 21 │ │ ├───│ ────▶ } + │ │ │ │ + │ │ ╰─────────────────── definiens: 19 + 22 │ │ ╭─────▶ + 23 │ │ │ function get_type(Direction _dir) public returns (Kind) { + │ │ │ ───────┬────── + │ │ │ ╰──────── definiens: 23 + ┆ ┆ ┆ + 25 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 22 + 26 │ ├───────────▶ } + │ │ + │ ╰───────────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/mappings/indexing/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/mappings/indexing/generated/0.4.11-success.txt index f8f34b9209..48b73ee3c8 100644 --- a/crates/solidity/testing/snapshots/bindings_output/mappings/indexing/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/mappings/indexing/generated/0.4.11-success.txt @@ -5,25 +5,25 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Value { │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ uint value; │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 5 │ mapping(uint => Value) values; │ ──┬── ───┬── │ ╰──────────── ref: 2 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 │ 7 │ function test(uint _id) public returns (uint) { │ ──┬─ ─┬─ - │ ╰──────────── def: 5 + │ ╰──────────── name: 5 │ │ - │ ╰─── def: 6 + │ ╰─── name: 6 8 │ return values[_id].value; │ ───┬── ─┬─ ──┬── │ ╰─────────────── ref: 4 @@ -32,3 +32,29 @@ References and definitions: │ │ │ ╰──── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract Test { + 2 │ │ ╭─▶ struct Value { + 3 │ │ │ uint value; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 5 │ │ │ mapping(uint => Value) values; + │ │ │ ─────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 4 + 6 │ │ ╭───▶ + 7 │ │ │ function test(uint _id) public returns (uint) { + │ │ │ ────┬─── + │ │ │ ╰───── definiens: 6 + ┆ ┆ ┆ + 9 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 10 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/modifiers/diamond/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/modifiers/diamond/generated/0.4.11-failure.txt index 649459320a..fae8d1101a 100644 --- a/crates/solidity/testing/snapshots/bindings_output/modifiers/diamond/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/modifiers/diamond/generated/0.4.11-failure.txt @@ -27,30 +27,74 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 + 2 │ modifier foo virtual { _; } + │ ─┬─ + │ ╰─── name: 2 │ 5 │ contract A is Base { │ ┬ ──┬─ - │ ╰────────── def: 2 + │ ╰────────── name: 3 │ │ │ ╰─── ref: 1 + 6 │ modifier foo virtual override { _; } + │ ─┬─ + │ ╰─── name: 4 │ 9 │ contract B is Base { │ ┬ ──┬─ - │ ╰────────── def: 3 + │ ╰────────── name: 5 │ │ │ ╰─── ref: 1 + 10 │ modifier foo virtual override { _; } + │ ─┬─ + │ ╰─── name: 6 │ 13 │ contract Test is B, A { │ ──┬─ ┬ ┬ - │ ╰─────────── def: 4 + │ ╰─────────── name: 7 │ │ │ - │ ╰───── ref: 3 + │ ╰───── ref: 5 │ │ - │ ╰── ref: 2 + │ ╰── ref: 3 14 │ function test() public foo {} │ ──┬─ ─┬─ - │ ╰──────────────── def: 5 + │ ╰──────────────── name: 8 │ │ - │ ╰─── unresolved + │ ╰─── ref: 4 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base { + 2 │ │ modifier foo virtual { _; } + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───────▶ + ┆ ┆ + 6 │ │ modifier foo virtual override { _; } + │ │ ────────┬─────── + │ │ ╰───────── definiens: 4 + 7 │ ├─│ ────▶ } + │ │ │ + │ ╰───────────── definiens: 3 + 8 │ ╭─────▶ + ┆ ┆ + 10 │ │ modifier foo virtual override { _; } + │ │ ────────┬─────── + │ │ ╰───────── definiens: 6 + 11 │ ├─│ ──▶ } + │ │ │ + │ ╰─────────── definiens: 5 + 12 │ ╭───▶ + ┆ ┆ + 14 │ │ function test() public foo {} + │ │ ─────────────────┬──────────────── + │ │ ╰────────────────── definiens: 8 + 15 │ ├───▶ } + │ │ + │ ╰───────── definiens: 7 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/modifiers/diamond/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/modifiers/diamond/generated/0.6.0-success.txt index 5df0924d4d..360284a628 100644 --- a/crates/solidity/testing/snapshots/bindings_output/modifiers/diamond/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/modifiers/diamond/generated/0.6.0-success.txt @@ -5,45 +5,80 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ modifier foo virtual { _; } │ ─┬─ ┬ - │ ╰─────────────── def: 2 + │ ╰─────────────── name: 2 │ │ │ ╰── ref: built-in │ 5 │ contract A is Base { │ ┬ ──┬─ - │ ╰────────── def: 3 + │ ╰────────── name: 3 │ │ │ ╰─── ref: 1 6 │ modifier foo virtual override { _; } │ ─┬─ ┬ - │ ╰──────────────────────── def: 4 + │ ╰──────────────────────── name: 4 │ │ │ ╰── ref: built-in │ 9 │ contract B is Base { │ ┬ ──┬─ - │ ╰────────── def: 5 + │ ╰────────── name: 5 │ │ │ ╰─── ref: 1 10 │ modifier foo virtual override { _; } │ ─┬─ ┬ - │ ╰──────────────────────── def: 6 + │ ╰──────────────────────── name: 6 │ │ │ ╰── ref: built-in │ 13 │ contract Test is B, A { │ ──┬─ ┬ ┬ - │ ╰─────────── def: 7 + │ ╰─────────── name: 7 │ │ │ │ ╰───── ref: 5 │ │ │ ╰── ref: 3 14 │ function test() public foo {} │ ──┬─ ─┬─ - │ ╰──────────────── def: 8 + │ ╰──────────────── name: 8 │ │ │ ╰─── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base { + 2 │ │ modifier foo virtual { _; } + │ │ ────────────────┬─────────────── + │ │ ╰───────────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───────▶ + ┆ ┆ + 6 │ │ modifier foo virtual override { _; } + │ │ ────────────────────┬──────────────────── + │ │ ╰────────────────────── definiens: 4 + 7 │ ├─│ ────▶ } + │ │ │ + │ ╰───────────── definiens: 3 + 8 │ ╭─────▶ + ┆ ┆ + 10 │ │ modifier foo virtual override { _; } + │ │ ────────────────────┬──────────────────── + │ │ ╰────────────────────── definiens: 6 + 11 │ ├─│ ──▶ } + │ │ │ + │ ╰─────────── definiens: 5 + 12 │ ╭───▶ + ┆ ┆ + 14 │ │ function test() public foo {} + │ │ ─────────────────┬──────────────── + │ │ ╰────────────────── definiens: 8 + 15 │ ├───▶ } + │ │ + │ ╰───────── definiens: 7 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/modifiers/inherited/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/modifiers/inherited/generated/0.4.11-success.txt index 0d26cc0a10..8172861b0e 100644 --- a/crates/solidity/testing/snapshots/bindings_output/modifiers/inherited/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/modifiers/inherited/generated/0.4.11-success.txt @@ -5,21 +5,41 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ modifier foo { _; } │ ─┬─ ┬ - │ ╰─────── def: 2 + │ ╰─────── name: 2 │ │ │ ╰── ref: built-in │ 5 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 3 + │ ╰─────────── name: 3 │ │ │ ╰─── ref: 1 6 │ function test() public foo { │ ──┬─ ─┬─ - │ ╰──────────────── def: 4 + │ ╰──────────────── name: 4 │ │ │ ╰─── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Base { + 2 │ │ modifier foo { _; } + │ │ ────────────┬─────────── + │ │ ╰───────────── definiens: 2 + 3 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 1 + 4 │ ╭─────▶ + ┆ ┆ ┆ + 6 │ │ ╭─▶ function test() public foo { + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 4 + 8 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 3 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/modifiers/simple/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/modifiers/simple/generated/0.4.11-success.txt index c0b8861964..98590e45bf 100644 --- a/crates/solidity/testing/snapshots/bindings_output/modifiers/simple/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/modifiers/simple/generated/0.4.11-success.txt @@ -5,14 +5,14 @@ References and definitions: │ 1 │ contract FunctionModifier { │ ────────┬─────── - │ ╰───────── def: 1 + │ ╰───────── name: 1 2 │ bool public locked; │ ───┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 4 │ modifier noReentrancy() { │ ──────┬───── - │ ╰─────── def: 3 + │ ╰─────── name: 3 5 │ assert(!locked); │ ───┬── ───┬── │ ╰──────────── ref: built-in @@ -31,7 +31,28 @@ References and definitions: │ 12 │ function decrement() public noReentrancy { │ ────┬──── ──────┬───── - │ ╰──────────────────────────── def: 4 + │ ╰──────────────────────────── name: 4 │ │ │ ╰─────── ref: 3 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract FunctionModifier { + 2 │ │ │ bool public locked; + │ │ │ ────────────┬─────────── + │ │ │ ╰───────────── definiens: 2 + 3 │ │ ╭───▶ + ┆ ┆ ┆ + 10 │ │ ├─│ ▶ } + │ │ │ │ + │ │ ╰───────────── definiens: 3 + 11 │ │ ╭─▶ + ┆ ┆ ┆ + 14 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 4 + 15 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/modifiers/virtual_modifier/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/modifiers/virtual_modifier/generated/0.4.11-failure.txt index f372fc4309..7afe38ec97 100644 --- a/crates/solidity/testing/snapshots/bindings_output/modifiers/virtual_modifier/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/modifiers/virtual_modifier/generated/0.4.11-failure.txt @@ -21,11 +21,37 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 + 2 │ modifier foo virtual { _; } + │ ─┬─ + │ ╰─── name: 2 │ 5 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 2 + │ ╰─────────── name: 3 │ │ │ ╰─── ref: 1 + 6 │ modifier foo override(Base) { _; } + │ ─┬─ + │ ╰─── name: 4 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base { + 2 │ │ modifier foo virtual { _; } + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + ┆ ┆ + 6 │ │ modifier foo override(Base) { _; } + │ │ ────────┬─────── + │ │ ╰───────── definiens: 4 + ┆ ┆ + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 3 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/modifiers/virtual_modifier/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/modifiers/virtual_modifier/generated/0.6.0-success.txt index 9a2ec20102..dcf92c2c10 100644 --- a/crates/solidity/testing/snapshots/bindings_output/modifiers/virtual_modifier/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/modifiers/virtual_modifier/generated/0.6.0-success.txt @@ -5,28 +5,50 @@ References and definitions: │ 1 │ contract Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ modifier foo virtual { _; } │ ─┬─ ┬ - │ ╰─────────────── def: 2 + │ ╰─────────────── name: 2 │ │ │ ╰── ref: built-in │ 5 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 3 + │ ╰─────────── name: 3 │ │ │ ╰─── ref: 1 6 │ modifier foo override(Base) { _; } │ ─┬─ ──┬─ ┬ - │ ╰────────────────────── def: 4 + │ ╰────────────────────── name: 4 │ │ │ │ ╰──────── ref: 1 │ │ │ ╰── ref: built-in 7 │ function test() public foo {} │ ──┬─ ─┬─ - │ ╰──────────────── def: 5 + │ ╰──────────────── name: 5 │ │ │ ╰─── ref: 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract Base { + 2 │ │ modifier foo virtual { _; } + │ │ ────────────────┬─────────────── + │ │ ╰───────────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + ┆ ┆ + 6 │ │ modifier foo override(Base) { _; } + │ │ ───────────────────┬─────────────────── + │ │ ╰───────────────────── definiens: 4 + 7 │ │ function test() public foo {} + │ │ ─────────────────┬──────────────── + │ │ ╰────────────────── definiens: 5 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 3 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/modifiers/with_args/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/modifiers/with_args/generated/0.4.11-success.txt index c4a13532dc..f97156f7f9 100644 --- a/crates/solidity/testing/snapshots/bindings_output/modifiers/with_args/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/modifiers/with_args/generated/0.4.11-success.txt @@ -5,16 +5,16 @@ References and definitions: │ 1 │ contract FunctionModifier { │ ────────┬─────── - │ ╰───────── def: 1 + │ ╰───────── name: 1 2 │ address public owner; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 4 │ modifier validAddress(address _addr) { │ ──────┬───── ──┬── - │ ╰───────────────────── def: 3 + │ ╰───────────────────── name: 3 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 5 │ assert(_addr != address(0)); │ ───┬── ──┬── │ ╰────────── ref: built-in @@ -26,9 +26,9 @@ References and definitions: │ 9 │ function changeOwner(address _newOwner) │ ─────┬───── ────┬──── - │ ╰───────────────────────── def: 5 + │ ╰───────────────────────── name: 5 │ │ - │ ╰────── def: 6 + │ ╰────── name: 6 │ 11 │ validAddress(_newOwner) │ ──────┬───── ────┬──── @@ -42,3 +42,30 @@ References and definitions: │ │ │ ╰────── ref: 6 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract FunctionModifier { + 2 │ │ │ address public owner; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 2 + 3 │ │ ╭─▶ + 4 │ │ │ modifier validAddress(address _addr) { + │ │ │ ──────┬────── + │ │ │ ╰──────── definiens: 4 + ┆ ┆ ┆ + 7 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 3 + 8 │ │ ╭───▶ + 9 │ │ │ function changeOwner(address _newOwner) + │ │ │ ────────┬──────── + │ │ │ ╰────────── definiens: 6 + ┆ ┆ ┆ + 14 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 15 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/structs/declaration/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/structs/declaration/generated/0.4.11-failure.txt index 9641baa0e5..55aad98abc 100644 --- a/crates/solidity/testing/snapshots/bindings_output/structs/declaration/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/structs/declaration/generated/0.4.11-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/structs/declaration/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/structs/declaration/generated/0.6.0-success.txt index ca964ea4dd..cdf5ecfadb 100644 --- a/crates/solidity/testing/snapshots/bindings_output/structs/declaration/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/structs/declaration/generated/0.6.0-success.txt @@ -5,40 +5,81 @@ References and definitions: │ 1 │ struct TopLevelStruct { │ ───────┬────── - │ ╰──────── def: 1 + │ ╰──────── name: 1 2 │ int x; │ ┬ - │ ╰── def: 2 + │ ╰── name: 2 │ 5 │ library SomeLib { │ ───┬─── - │ ╰───── def: 3 + │ ╰───── name: 3 6 │ struct LibStruct { │ ────┬──── - │ ╰────── def: 4 + │ ╰────── name: 4 7 │ int y; │ ┬ - │ ╰── def: 5 + │ ╰── name: 5 8 │ TopLevelStruct top_level_struct; │ ───────┬────── ────────┬─────── │ ╰───────────────────────── ref: 1 │ │ - │ ╰───────── def: 6 + │ ╰───────── name: 6 │ 12 │ contract MyContract { │ ─────┬──── - │ ╰────── def: 7 + │ ╰────── name: 7 13 │ struct ContractStruct { │ ───────┬────── - │ ╰──────── def: 8 + │ ╰──────── name: 8 14 │ int z; │ ┬ - │ ╰── def: 9 + │ ╰── name: 9 15 │ SomeLib.LibStruct lib_struct; │ ───┬─── ────┬──── ─────┬──── │ ╰────────────────────────── ref: 3 │ │ │ │ ╰───────────────── ref: 4 │ │ - │ ╰────── def: 10 + │ ╰────── name: 10 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ struct TopLevelStruct { + 2 │ │ int x; + │ │ ────┬──── + │ │ ╰────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───────▶ + ┆ ┆ ┆ + 6 │ │ ╭───▶ struct LibStruct { + 7 │ │ │ int y; + │ │ │ ─────┬───── + │ │ │ ╰─────── definiens: 5 + 8 │ │ │ TopLevelStruct top_level_struct; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 6 + 9 │ │ ├───▶ } + │ │ │ + │ │ ╰─────────── definiens: 4 + 10 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────── definiens: 3 + 11 │ ╭─────────▶ + ┆ ┆ ┆ + 13 │ │ ╭─────▶ struct ContractStruct { + 14 │ │ │ int z; + │ │ │ ─────┬───── + │ │ │ ╰─────── definiens: 9 + 15 │ │ │ SomeLib.LibStruct lib_struct; + │ │ │ ─────────────────┬──────────────── + │ │ │ ╰────────────────── definiens: 10 + 16 │ │ ├─────▶ } + │ │ │ + │ │ ╰───────────── definiens: 8 + 17 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 7 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/structs/function_call/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/structs/function_call/generated/0.4.11-success.txt index 5e81f906d2..460d5255b1 100644 --- a/crates/solidity/testing/snapshots/bindings_output/structs/function_call/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/structs/function_call/generated/0.4.11-success.txt @@ -5,17 +5,17 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Value { │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ int x; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 │ 5 │ function test() public { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 6 │ Value(10).x; │ ──┬── ┬ │ ╰────────── ref: 2 @@ -29,3 +29,23 @@ References and definitions: │ │ │ ╰── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract Test { + 2 │ │ ╭─▶ struct Value { + 3 │ │ │ int x; + │ │ │ ───────┬─────── + │ │ │ ╰───────── definiens: 3 + 4 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 5 │ │ ╭───▶ function test() public { + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 4 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/structs/named_params_construction/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/structs/named_params_construction/generated/0.4.11-success.txt index 7bffe0b348..87539f51e2 100644 --- a/crates/solidity/testing/snapshots/bindings_output/structs/named_params_construction/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/structs/named_params_construction/generated/0.4.11-success.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Funder { │ ───┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ address addr; │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 4 │ uint amount; │ ───┬── - │ ╰──── def: 4 + │ ╰──── name: 4 │ 7 │ function buildFunder() public payable returns (Funder memory) { │ ─────┬───── ───┬── - │ ╰──────────────────────────────────────── def: 5 + │ ╰──────────────────────────────────────── name: 5 │ │ │ ╰──── ref: 2 8 │ return Funder({addr: msg.sender, amount: msg.value}); @@ -37,3 +37,26 @@ References and definitions: │ │ │ ╰──── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract Test { + 2 │ │ ╭─▶ struct Funder { + 3 │ │ │ address addr; + │ │ │ ───────────┬────────── + │ │ │ ╰──────────── definiens: 3 + 4 │ │ │ uint amount; + │ │ │ ──────────┬────────── + │ │ │ ╰──────────── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭───▶ + ┆ ┆ ┆ + 9 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 10 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/structs/nested/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/structs/nested/generated/0.4.11-failure.txt index 9be7a0cb56..5198751022 100644 --- a/crates/solidity/testing/snapshots/bindings_output/structs/nested/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/structs/nested/generated/0.4.11-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/structs/nested/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/structs/nested/generated/0.6.0-success.txt index 5c3224a165..05adae6e42 100644 --- a/crates/solidity/testing/snapshots/bindings_output/structs/nested/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/structs/nested/generated/0.6.0-success.txt @@ -5,87 +5,87 @@ References and definitions: │ 1 │ struct Base { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ int x; │ ┬ - │ ╰── def: 2 + │ ╰── name: 2 │ 5 │ library MyLib { │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 6 │ enum Direction { North, South, West, East } │ ────┬──── ──┬── ──┬── ──┬─ ──┬─ - │ ╰───────────────────────────────── def: 4 + │ ╰───────────────────────────────── name: 4 │ │ │ │ │ - │ ╰─────────────────────── def: 5 + │ ╰─────────────────────── name: 5 │ │ │ │ - │ ╰──────────────── def: 6 + │ ╰──────────────── name: 6 │ │ │ - │ ╰───────── def: 7 + │ ╰───────── name: 7 │ │ - │ ╰─── def: 8 + │ ╰─── name: 8 │ 8 │ struct LibStruct { │ ────┬──── - │ ╰────── def: 9 + │ ╰────── name: 9 9 │ Base base; │ ──┬─ ──┬─ │ ╰──────── ref: 1 │ │ - │ ╰─── def: 10 + │ ╰─── name: 10 10 │ int y; │ ┬ - │ ╰── def: 11 + │ ╰── name: 11 │ 14 │ interface OneInterface { │ ──────┬───── - │ ╰─────── def: 12 + │ ╰─────── name: 12 15 │ struct IfaceStruct { │ ─────┬───── - │ ╰─────── def: 13 + │ ╰─────── name: 13 16 │ MyLib.LibStruct lib_struct; │ ──┬── ────┬──── ─────┬──── │ ╰───────────────────────── ref: 3 │ │ │ │ ╰───────────────── ref: 9 │ │ - │ ╰────── def: 14 + │ ╰────── name: 14 17 │ int z; │ ┬ - │ ╰── def: 15 + │ ╰── name: 15 │ 21 │ contract Sample { │ ───┬── - │ ╰──── def: 16 + │ ╰──── name: 16 22 │ struct SampleStruct { │ ──────┬───── - │ ╰─────── def: 17 + │ ╰─────── name: 17 23 │ OneInterface.IfaceStruct iface_struct; │ ──────┬───── ─────┬───── ──────┬───── │ ╰──────────────────────────────── ref: 12 │ │ │ │ ╰──────────────────── ref: 13 │ │ - │ ╰─────── def: 18 + │ ╰─────── name: 18 24 │ MyLib.Direction direction; │ ──┬── ────┬──── ────┬──── │ ╰──────────────────────── ref: 3 │ │ │ │ ╰──────────────── ref: 4 │ │ - │ ╰────── def: 19 + │ ╰────── name: 19 25 │ int w; │ ┬ - │ ╰── def: 20 + │ ╰── name: 20 │ 28 │ function hello() { │ ──┬── - │ ╰──── def: 21 + │ ╰──── name: 21 29 │ SampleStruct memory s; │ ──────┬───── ┬ │ ╰──────────────── ref: 17 │ │ - │ ╰── def: 22 + │ ╰── name: 22 30 │ s.iface_struct.lib_struct.base.x = 1; │ ┬ ──────┬───── ─────┬──── ──┬─ ┬ │ ╰───────────────────────────────── ref: 22 @@ -136,7 +136,7 @@ References and definitions: │ │ │ │ ╰──────────────── ref: 9 │ │ - │ ╰── def: 23 + │ ╰── name: 23 37 │ ls.base.x = s.iface_struct.lib_struct.base.x; │ ─┬ ──┬─ ┬ ┬ ──────┬───── ─────┬──── ──┬─ ┬ │ ╰──────────────────────────────────────────── ref: 23 @@ -155,3 +155,88 @@ References and definitions: │ │ │ ╰── ref: 2 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ struct Base { + 2 │ │ int x; + │ │ ────┬──── + │ │ ╰────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────────────▶ + ┆ ┆ + 6 │ │ │ enum Direction { North, South, West, East } + │ │ │ ─────────────────────┬─┬────┬──────┬─────┬──── + │ │ │ ╰────────────────────────── definiens: 5 + │ │ │ │ │ │ │ + │ │ │ ╰──────────────────────── definiens: 4 + │ │ │ │ │ │ + │ │ │ ╰─────────────────── definiens: 6 + │ │ │ │ │ + │ │ │ ╰──────────── definiens: 7 + │ │ │ │ + │ │ │ ╰────── definiens: 8 + 7 │ │ ╭─────▶ + ┆ ┆ ┆ + 9 │ │ │ Base base; + │ │ │ ───────┬─────── + │ │ │ ╰───────── definiens: 10 + 10 │ │ │ int y; + │ │ │ ─────┬───── + │ │ │ ╰─────── definiens: 11 + 11 │ │ ├─────▶ } + │ │ │ + │ │ ╰───────────── definiens: 9 + 12 │ ├───│ ────────▶ } + │ │ │ + │ ╰─────────────────── definiens: 3 + 13 │ ╭─────────▶ + ┆ ┆ ┆ + 15 │ │ ╭───────▶ struct IfaceStruct { + 16 │ │ │ MyLib.LibStruct lib_struct; + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 14 + 17 │ │ │ int z; + │ │ │ ─────┬───── + │ │ │ ╰─────── definiens: 15 + 18 │ │ ├───────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 13 + 19 │ │ ├─────────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 12 + 20 │ ╭─────────────────▶ + ┆ ┆ ┆ + 22 │ │ ╭───────────▶ struct SampleStruct { + 23 │ │ │ OneInterface.IfaceStruct iface_struct; + │ │ │ ─────────────────────┬───────────────────── + │ │ │ ╰─────────────────────── definiens: 18 + 24 │ │ │ MyLib.Direction direction; + │ │ │ ───────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 19 + 25 │ │ │ int w; + │ │ │ ─────┬───── + │ │ │ ╰─────── definiens: 20 + 26 │ │ │ ├───────────▶ } + │ │ │ │ + │ │ │ ╰─────────────────── definiens: 17 + 27 │ │ ╭───────────────▶ + ┆ ┆ ┆ + 29 │ │ │ SampleStruct memory s; + │ │ │ ─────────────┬───────────── + │ │ │ ╰─────────────── definiens: 22 + ┆ ┆ ┆ + 35 │ │ │ ╭───▶ + 36 │ │ │ ├───▶ MyLib.LibStruct memory ls; + │ │ │ │ + │ │ │ ╰────────────────────────────────────── definiens: 23 + ┆ ┆ ┆ + 38 │ │ ├───────────────▶ } + │ │ │ + │ │ ╰─────────────────────── definiens: 21 + 39 │ ├─────────────────▶ } + │ │ + │ ╰─────────────────────── definiens: 16 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/structs/sample/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/structs/sample/generated/0.4.11-failure.txt index d7ff86c911..c66cee3084 100644 --- a/crates/solidity/testing/snapshots/bindings_output/structs/sample/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/structs/sample/generated/0.4.11-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/structs/sample/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/structs/sample/generated/0.6.0-success.txt index d5a03b4fda..d047f097dc 100644 --- a/crates/solidity/testing/snapshots/bindings_output/structs/sample/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/structs/sample/generated/0.6.0-success.txt @@ -5,56 +5,56 @@ References and definitions: │ 1 │ struct Funder { │ ───┬── - │ ╰──── def: 1 + │ ╰──── name: 1 2 │ address addr; │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ uint amount; │ ───┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 6 │ contract CrowdFunding { │ ──────┬───── - │ ╰─────── def: 4 + │ ╰─────── name: 4 7 │ struct Campaign { │ ────┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 8 │ address payable beneficiary; │ ─────┬───── - │ ╰─────── def: 6 + │ ╰─────── name: 6 9 │ uint fundingGoal; │ ─────┬───── - │ ╰─────── def: 7 + │ ╰─────── name: 7 10 │ uint numFunders; │ ─────┬──── - │ ╰────── def: 8 + │ ╰────── name: 8 11 │ uint amount; │ ───┬── - │ ╰──── def: 9 + │ ╰──── name: 9 12 │ mapping(uint => Funder) funders; │ ───┬── ───┬─── │ ╰───────────── ref: 1 │ │ - │ ╰───── def: 10 + │ ╰───── name: 10 │ 15 │ uint numCampaigns; │ ──────┬───── - │ ╰─────── def: 11 + │ ╰─────── name: 11 16 │ mapping(uint => Campaign) campaigns; │ ────┬─── ────┬──── │ ╰──────────────── ref: 5 │ │ - │ ╰────── def: 12 + │ ╰────── name: 12 │ 18 │ function newCampaign(address payable beneficiary, uint goal) public returns (uint campaignID) { │ ─────┬───── ─────┬───── ──┬─ ─────┬──── - │ ╰─────────────────────────────────────────────────────────────────────────────── def: 13 + │ ╰─────────────────────────────────────────────────────────────────────────────── name: 13 │ │ │ │ - │ ╰─────────────────────────────────────────────────── def: 14 + │ ╰─────────────────────────────────────────────────── name: 14 │ │ │ - │ ╰──────────────────────────────────── def: 15 + │ ╰──────────────────────────────────── name: 15 │ │ - │ ╰────── def: 16 + │ ╰────── name: 16 19 │ campaignID = numCampaigns++; │ ─────┬──── ──────┬───── │ ╰───────────────────── ref: 16 @@ -64,7 +64,7 @@ References and definitions: │ ────┬─── ┬ ────┬──── ─────┬──── │ ╰────────────────────────────────────── ref: 5 │ │ │ │ - │ ╰───────────────────────── def: 17 + │ ╰───────────────────────── name: 17 │ │ │ │ ╰───────────────── ref: 12 │ │ @@ -86,14 +86,14 @@ References and definitions: │ 25 │ function contribute(uint campaignID) public payable { │ ─────┬──── ─────┬──── - │ ╰────────────────────── def: 18 + │ ╰────────────────────── name: 18 │ │ - │ ╰────── def: 19 + │ ╰────── name: 19 26 │ Campaign storage c = campaigns[campaignID]; │ ────┬─── ┬ ────┬──── ─────┬──── │ ╰────────────────────────────────────── ref: 5 │ │ │ │ - │ ╰───────────────────────── def: 20 + │ ╰───────────────────────── name: 20 │ │ │ │ ╰───────────────── ref: 12 │ │ @@ -133,16 +133,16 @@ References and definitions: │ 31 │ function checkGoalReached(uint campaignID) public returns (bool reached) { │ ────────┬─────── ─────┬──── ───┬─── - │ ╰─────────────────────────────────────────────────────── def: 21 + │ ╰─────────────────────────────────────────────────────── name: 21 │ │ │ - │ ╰──────────────────────────────────── def: 22 + │ ╰──────────────────────────────────── name: 22 │ │ - │ ╰───── def: 23 + │ ╰───── name: 23 32 │ Campaign storage c = campaigns[campaignID]; │ ────┬─── ┬ ────┬──── ─────┬──── │ ╰────────────────────────────────────── ref: 5 │ │ │ │ - │ ╰───────────────────────── def: 24 + │ ╰───────────────────────── name: 24 │ │ │ │ ╰───────────────── ref: 12 │ │ @@ -159,7 +159,7 @@ References and definitions: │ 35 │ uint amount = c.amount; │ ───┬── ┬ ───┬── - │ ╰─────────────── def: 25 + │ ╰─────────────── name: 25 │ │ │ │ ╰───────── ref: 24 │ │ @@ -179,3 +179,92 @@ References and definitions: │ │ │ ╰──── ref: 25 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ struct Funder { + 2 │ │ address addr; + │ │ ─────────┬──────── + │ │ ╰────────── definiens: 2 + 3 │ │ uint amount; + │ │ ────────┬──────── + │ │ ╰────────── definiens: 3 + 4 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 1 + 5 │ ╭─────────────▶ + ┆ ┆ ┆ + 7 │ │ ╭─────▶ struct Campaign { + 8 │ │ │ address payable beneficiary; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 6 + 9 │ │ │ uint fundingGoal; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 7 + 10 │ │ │ uint numFunders; + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 8 + 11 │ │ │ uint amount; + │ │ │ ──────────┬────────── + │ │ │ ╰──────────── definiens: 9 + 12 │ │ │ mapping(uint => Funder) funders; + │ │ │ ────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 10 + 13 │ │ ├───│ ▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 5 + 14 │ │ ╭─▶ + 15 │ │ ├─▶ uint numCampaigns; + │ │ │ + │ │ ╰──────────────────────────── definiens: 11 + 16 │ │ │ mapping(uint => Campaign) campaigns; + │ │ │ ────────────────────┬──────────────────── + │ │ │ ╰────────────────────── definiens: 12 + 17 │ │ ╭─────────▶ + 18 │ │ │ function newCampaign(address payable beneficiary, uint goal) public returns (uint campaignID) { + │ │ │ ─────────────┬───────────── ─────┬──── ───────┬─────── + │ │ │ ╰─────────────────────────────────────────────────────────── definiens: 14 + │ │ │ │ │ + │ │ │ ╰─────────────────────────────────────── definiens: 15 + │ │ │ │ + │ │ │ ╰───────── definiens: 16 + ┆ ┆ ┆ + 20 │ │ │ Campaign storage c = campaigns[campaignID]; + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 17 + ┆ ┆ ┆ + 23 │ │ ├─│ ──────▶ } + │ │ │ │ + │ │ ╰─────────────────── definiens: 13 + 24 │ │ ╭───────▶ + 25 │ │ │ function contribute(uint campaignID) public payable { + │ │ │ ───────┬─────── + │ │ │ ╰───────── definiens: 19 + 26 │ │ │ Campaign storage c = campaigns[campaignID]; + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 20 + ┆ ┆ ┆ + 29 │ │ │ ├───────▶ } + │ │ │ │ + │ │ │ ╰───────────────── definiens: 18 + 30 │ │ ╭───────────▶ + 31 │ │ │ function checkGoalReached(uint campaignID) public returns (bool reached) { + │ │ │ ───────┬─────── ──────┬───── + │ │ │ ╰─────────────────────────────────────── definiens: 22 + │ │ │ │ + │ │ │ ╰─────── definiens: 23 + 32 │ │ │ Campaign storage c = campaigns[campaignID]; + │ │ │ ──────────────────────────┬───────────────────────── + │ │ │ ╰─────────────────────────── definiens: 24 + ┆ ┆ ┆ + 35 │ │ │ uint amount = c.amount; + │ │ │ ────────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 25 + ┆ ┆ ┆ + 39 │ │ ├───────────▶ } + │ │ │ + │ │ ╰───────────────────── definiens: 21 + 40 │ ├─────────────▶ } + │ │ + │ ╰─────────────────── definiens: 4 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/structs/simple/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/structs/simple/generated/0.4.11-success.txt index 2e8718312f..e015329ebd 100644 --- a/crates/solidity/testing/snapshots/bindings_output/structs/simple/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/structs/simple/generated/0.4.11-success.txt @@ -5,29 +5,29 @@ References and definitions: │ 1 │ contract CrowdFunding { │ ──────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ struct Campaign { │ ────┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ address payable beneficiary; │ ─────┬───── - │ ╰─────── def: 3 + │ ╰─────── name: 3 4 │ uint fundingGoal; │ ─────┬───── - │ ╰─────── def: 4 + │ ╰─────── name: 4 │ 7 │ function newCampaign(address payable beneficiary, uint goal) public { │ ─────┬───── ─────┬───── ──┬─ - │ ╰────────────────────────────────────────────── def: 5 + │ ╰────────────────────────────────────────────── name: 5 │ │ │ - │ ╰────────────────── def: 6 + │ ╰────────────────── name: 6 │ │ - │ ╰─── def: 7 + │ ╰─── name: 7 8 │ Campaign storage c; │ ────┬─── ┬ │ ╰─────────────── ref: 2 │ │ - │ ╰── def: 8 + │ ╰── name: 8 9 │ c.beneficiary = beneficiary; │ ┬ ─────┬───── ─────┬───── │ ╰──────────────────────────── ref: 8 @@ -43,3 +43,34 @@ References and definitions: │ │ │ ╰─── ref: 7 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract CrowdFunding { + 2 │ │ ╭─▶ struct Campaign { + 3 │ │ │ address payable beneficiary; + │ │ │ ──────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 3 + 4 │ │ │ uint fundingGoal; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 4 + 5 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 6 │ │ ╭───▶ + 7 │ │ │ function newCampaign(address payable beneficiary, uint goal) public { + │ │ │ ─────────────┬───────────── ─────┬──── + │ │ │ ╰────────────────────────── definiens: 6 + │ │ │ │ + │ │ │ ╰────── definiens: 7 + 8 │ │ │ Campaign storage c; + │ │ │ ──────────────┬───────────── + │ │ │ ╰─────────────── definiens: 8 + ┆ ┆ ┆ + 11 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 12 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.4.11-failure.txt index b87a09cf85..390375cd76 100644 --- a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.4.11-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.6.0-failure.txt index cea0619d12..7c3b372d54 100644 --- a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.6.0-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or EnumKeyword or ImportKeyword or InterfaceKeyw │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.7.1-failure.txt b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.7.1-failure.txt index 3505cedb20..906197a5a6 100644 --- a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.7.1-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.7.1-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or EnumKeyword or FunctionKeyword or ImportKeywo │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.7.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.7.4-failure.txt index bd4b20a86b..3518769aca 100644 --- a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.7.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.7.4-failure.txt @@ -11,3 +11,4 @@ Error: Expected AddressKeyword or BoolKeyword or ByteKeyword or BytesKeyword or │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.0-failure.txt index 619151156f..203934088d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.0-failure.txt @@ -11,3 +11,4 @@ Error: Expected AddressKeyword or BoolKeyword or BytesKeyword or ContractKeyword │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.4-failure.txt index f56435985e..502036ea15 100644 --- a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.4-failure.txt @@ -11,3 +11,4 @@ Error: Expected AddressKeyword or BoolKeyword or BytesKeyword or ContractKeyword │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.8-success.txt b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.8-success.txt index 0563a6f694..8997cb8712 100644 --- a/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.8-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/user_types/wrap_unwrap/generated/0.8.8-success.txt @@ -5,21 +5,21 @@ References and definitions: │ 1 │ type ShortString is bytes32; │ ─────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 │ 3 │ contract Test { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 4 │ function test(bytes32 data) public { │ ──┬─ ──┬─ - │ ╰──────────────── def: 3 + │ ╰──────────────── name: 3 │ │ - │ ╰─── def: 4 + │ ╰─── name: 4 5 │ ShortString s = ShortString.wrap(data); │ ─────┬───── ┬ ─────┬───── ──┬─ ──┬─ │ ╰───────────────────────────────── ref: 1 │ │ │ │ │ - │ ╰────────────────────────── def: 5 + │ ╰────────────────────────── name: 5 │ │ │ │ │ ╰───────────────── ref: 1 │ │ │ @@ -34,3 +34,25 @@ References and definitions: │ │ │ ╰── ref: 5 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ type ShortString is bytes32; + │ │ ──────────────┬────────────── + │ │ ╰──────────────── definiens: 1 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test(bytes32 data) public { + │ │ │ ──────┬───── + │ │ │ ╰─────── definiens: 4 + 5 │ │ │ ShortString s = ShortString.wrap(data); + │ │ │ ────────────────────────┬─────────────────────── + │ │ │ ╰───────────────────────── definiens: 5 + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 2 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.4.11-failure.txt index 97aeb1b768..2968fe43a8 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.4.11-failure.txt @@ -14,22 +14,47 @@ References and definitions: │ 1 │ library Address { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ function sendValue(address payable recipient) internal {} │ ────┬──── ────┬──── - │ ╰──────────────────────────────── def: 2 + │ ╰──────────────────────────────── name: 2 │ │ - │ ╰────── def: 3 + │ ╰────── name: 3 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 5 │ using Address for address payable; │ ───┬─── │ ╰───── ref: 1 6 │ function test(address _rcpt) public { │ ──┬─ ──┬── - │ ╰───────────────── def: 5 + │ ╰───────────────── name: 5 │ │ - │ ╰──── def: 6 + │ ╰──── name: 6 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ library Address { + 2 │ │ function sendValue(address payable recipient) internal {} + │ │ ───────────────────────────────┬───┬────────────────────────── + │ │ ╰──────────────────────────────── definiens: 2 + │ │ │ + │ │ ╰──────────────────────────── definiens: 3 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 6 │ │ ╭───▶ function test(address _rcpt) public { + │ │ │ ──────┬────── + │ │ │ ╰──────── definiens: 6 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.4.21-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.4.21-failure.txt index d4bb34a55a..5ede1bb6ca 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.4.21-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.4.21-failure.txt @@ -14,22 +14,47 @@ References and definitions: │ 1 │ library Address { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ function sendValue(address payable recipient) internal {} │ ────┬──── ────┬──── - │ ╰──────────────────────────────── def: 2 + │ ╰──────────────────────────────── name: 2 │ │ - │ ╰────── def: 3 + │ ╰────── name: 3 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 5 │ using Address for address payable; │ ───┬─── │ ╰───── ref: 1 6 │ function test(address _rcpt) public { │ ──┬─ ──┬── - │ ╰───────────────── def: 5 + │ ╰───────────────── name: 5 │ │ - │ ╰──── def: 6 + │ ╰──── name: 6 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ library Address { + 2 │ │ function sendValue(address payable recipient) internal {} + │ │ ───────────────────────────────┬───┬────────────────────────── + │ │ ╰──────────────────────────────── definiens: 2 + │ │ │ + │ │ ╰──────────────────────────── definiens: 3 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 6 │ │ ╭───▶ function test(address _rcpt) public { + │ │ │ ──────┬────── + │ │ │ ╰──────── definiens: 6 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.5.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.5.0-failure.txt index d1ae8bf8e8..36a4396ad0 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.5.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.5.0-failure.txt @@ -14,22 +14,47 @@ References and definitions: │ 1 │ library Address { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ function sendValue(address payable recipient) internal {} │ ────┬──── ────┬──── - │ ╰──────────────────────────────── def: 2 + │ ╰──────────────────────────────── name: 2 │ │ - │ ╰────── def: 3 + │ ╰────── name: 3 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 5 │ using Address for address payable; │ ───┬─── │ ╰───── ref: 1 6 │ function test(address _rcpt) public { │ ──┬─ ──┬── - │ ╰───────────────── def: 5 + │ ╰───────────────── name: 5 │ │ - │ ╰──── def: 6 + │ ╰──── name: 6 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ library Address { + 2 │ │ function sendValue(address payable recipient) internal {} + │ │ ───────────────────────────────┬───┬────────────────────────── + │ │ ╰──────────────────────────────── definiens: 2 + │ │ │ + │ │ ╰──────────────────────────── definiens: 3 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 6 │ │ ╭───▶ function test(address _rcpt) public { + │ │ │ ──────┬────── + │ │ │ ╰──────── definiens: 6 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.5.3-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.5.3-failure.txt index 05a55cb7be..3bdb6d4c4d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.5.3-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.5.3-failure.txt @@ -14,22 +14,47 @@ References and definitions: │ 1 │ library Address { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ function sendValue(address payable recipient) internal {} │ ────┬──── ────┬──── - │ ╰──────────────────────────────── def: 2 + │ ╰──────────────────────────────── name: 2 │ │ - │ ╰────── def: 3 + │ ╰────── name: 3 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 5 │ using Address for address payable; │ ───┬─── │ ╰───── ref: 1 6 │ function test(address _rcpt) public { │ ──┬─ ──┬── - │ ╰───────────────── def: 5 + │ ╰───────────────── name: 5 │ │ - │ ╰──── def: 6 + │ ╰──── name: 6 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ library Address { + 2 │ │ function sendValue(address payable recipient) internal {} + │ │ ───────────────────────────────┬───┬────────────────────────── + │ │ ╰──────────────────────────────── definiens: 2 + │ │ │ + │ │ ╰──────────────────────────── definiens: 3 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 6 │ │ ╭───▶ function test(address _rcpt) public { + │ │ │ ──────┬────── + │ │ │ ╰──────── definiens: 6 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.6.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.6.0-success.txt index 48d9b99f62..77944920ac 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.6.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/address/generated/0.6.0-success.txt @@ -5,27 +5,52 @@ References and definitions: │ 1 │ library Address { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ function sendValue(address payable recipient) internal {} │ ────┬──── ────┬──── - │ ╰──────────────────────────────── def: 2 + │ ╰──────────────────────────────── name: 2 │ │ - │ ╰────── def: 3 + │ ╰────── name: 3 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 5 │ using Address for address payable; │ ───┬─── │ ╰───── ref: 1 6 │ function test(address _rcpt) public { │ ──┬─ ──┬── - │ ╰───────────────── def: 5 + │ ╰───────────────── name: 5 │ │ - │ ╰──── def: 6 + │ ╰──── name: 6 7 │ payable(_rcpt).sendValue(); │ ──┬── ────┬──── │ ╰─────────────── ref: 6 │ │ │ ╰────── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ library Address { + 2 │ │ function sendValue(address payable recipient) internal {} + │ │ ───────────────────────────────┬───┬────────────────────────── + │ │ ╰──────────────────────────────── definiens: 2 + │ │ │ + │ │ ╰──────────────────────────── definiens: 3 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 6 │ │ ╭───▶ function test(address _rcpt) public { + │ │ │ ──────┬────── + │ │ │ ╰──────── definiens: 6 + ┆ ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 9 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/casting/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/casting/generated/0.4.11-success.txt index 7c63d30e2f..9baa8a8849 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/casting/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/casting/generated/0.4.11-success.txt @@ -5,22 +5,22 @@ References and definitions: │ 1 │ interface IERC20 { │ ───┬── - │ ╰──── def: 1 + │ ╰──── name: 1 │ 3 │ library SafeERC20 { │ ────┬──── - │ ╰────── def: 2 + │ ╰────── name: 2 4 │ function safeApprove(IERC20 token) internal {} │ ─────┬───── ───┬── ──┬── - │ ╰──────────────────── def: 3 + │ ╰──────────────────── name: 3 │ │ │ │ ╰────────── ref: 1 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 │ 6 │ contract Test { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 7 │ using SafeERC20 for IERC20; │ ────┬──── ───┬── │ ╰───────────────── ref: 2 @@ -28,9 +28,9 @@ References and definitions: │ ╰──── ref: 1 8 │ function test(address token) public { │ ──┬─ ──┬── - │ ╰───────────────── def: 6 + │ ╰───────────────── name: 6 │ │ - │ ╰──── def: 7 + │ ╰──── name: 7 9 │ IERC20(token).safeApprove(); │ ───┬── ──┬── ─────┬───── │ ╰─────────────────────── ref: 1 @@ -39,3 +39,32 @@ References and definitions: │ │ │ ╰─────── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ interface IERC20 { + 2 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 3 │ ╭───▶ library SafeERC20 { + 4 │ │ function safeApprove(IERC20 token) internal {} + │ │ ─────────────────────────┬─────┬─────────────────── + │ │ ╰─────────────────────────── definiens: 3 + │ │ │ + │ │ ╰───────────────────── definiens: 4 + 5 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 2 + 6 │ ╭───────▶ contract Test { + ┆ ┆ ┆ + 8 │ │ ╭─────▶ function test(address token) public { + │ │ │ ──────┬────── + │ │ │ ╰──────── definiens: 7 + ┆ ┆ ┆ + 10 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 6 + 11 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/chained_calls/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/chained_calls/generated/0.4.11-success.txt index 180ec2bfde..eef49eb1ca 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/chained_calls/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/chained_calls/generated/0.4.11-success.txt @@ -5,47 +5,47 @@ References and definitions: │ 1 │ library Foo { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Bar { │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ uint value; │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 5 │ function noop(uint x) public returns (uint) {} │ ──┬─ ┬ - │ ╰────────── def: 4 + │ ╰────────── name: 4 │ │ - │ ╰── def: 5 + │ ╰── name: 5 6 │ function bar(uint x) public returns (Bar) {} │ ─┬─ ┬ ─┬─ - │ ╰─────────────────────────────── def: 6 + │ ╰─────────────────────────────── name: 6 │ │ │ - │ ╰─────────────────────── def: 7 + │ ╰─────────────────────── name: 7 │ │ │ ╰─── ref: 2 │ 9 │ contract Test { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 10 │ using Foo for uint; │ ─┬─ │ ╰─── ref: 1 11 │ function test(uint a, Foo.Bar memory b) public { │ ──┬─ ┬ ─┬─ ─┬─ ┬ - │ ╰──────────────────────────── def: 9 + │ ╰──────────────────────────── name: 9 │ │ │ │ │ - │ ╰──────────────────── def: 10 + │ ╰──────────────────── name: 10 │ │ │ │ │ ╰──────────────── ref: 1 │ │ │ │ ╰──────────── ref: 2 │ │ - │ ╰── def: 11 + │ ╰── name: 11 12 │ uint[] memory xs; │ ─┬ - │ ╰── def: 12 + │ ╰── name: 12 13 │ a.noop().noop().noop(); │ ┬ ──┬─ ──┬─ ──┬─ │ ╰───────────────────── ref: 10 @@ -76,3 +76,45 @@ References and definitions: │ │ │ ╰─── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ library Foo { + 2 │ │ ╭─▶ struct Bar { + 3 │ │ │ uint value; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 5 │ │ function noop(uint x) public returns (uint) {} + │ │ ─────────────────────┬───┬───────────────────────── + │ │ ╰─────────────────────────────── definiens: 5 + │ │ │ + │ │ ╰─────────────────────────── definiens: 4 + 6 │ │ function bar(uint x) public returns (Bar) {} + │ │ ────────────────────┬───┬──────────────────────── + │ │ ╰────────────────────────────── definiens: 7 + │ │ │ + │ │ ╰────────────────────────── definiens: 6 + 7 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 1 + 8 │ ╭───────▶ + ┆ ┆ + 11 │ │ ╭─────▶ function test(uint a, Foo.Bar memory b) public { + │ │ │ ───┬── ────────┬──────── + │ │ │ ╰────────────────────── definiens: 10 + │ │ │ │ + │ │ │ ╰────────── definiens: 11 + 12 │ │ │ uint[] memory xs; + │ │ │ ─────────────┬──────────── + │ │ │ ╰────────────── definiens: 12 + ┆ ┆ ┆ + 16 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 9 + 17 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 8 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/deconstruction/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/deconstruction/generated/0.4.11-failure.txt index a10e58ac37..74fa7e0a1d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/deconstruction/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/deconstruction/generated/0.4.11-failure.txt @@ -13,38 +13,72 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Counter { │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ uint value; │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 6 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 4 + │ ╰────────────────────────────── name: 4 │ │ │ │ ╰───────────────────── ref: 2 │ │ - │ ╰───── def: 5 + │ ╰───── name: 5 │ 9 │ contract Test { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 │ 12 │ function test(Lib.Counter memory c) public { │ ──┬─ ─┬─ ───┬─── ┬ - │ ╰──────────────────────── def: 7 + │ ╰──────────────────────── name: 7 │ │ │ │ │ ╰──────────────────── ref: 1 │ │ │ │ ╰────────────── ref: 2 │ │ - │ ╰── def: 8 + │ ╰── name: 8 13 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 8 │ │ │ ╰────── unresolved ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ library Lib { + 2 │ │ ╭─▶ struct Counter { + 3 │ │ │ uint value; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 5 │ │ ╭───▶ + 6 │ │ ├───▶ function increment(Counter memory _counter) public {} + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────────────────── definiens: 5 + │ │ │ + │ │ ╰───────────────────────────────────────────────────────────────── definiens: 4 + 7 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────── definiens: 1 + 8 │ ╭─────────▶ + ┆ ┆ + 11 │ │ ╭─────▶ + 12 │ │ │ function test(Lib.Counter memory c) public { + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 8 + ┆ ┆ ┆ + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 7 + 15 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 6 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/deconstruction/generated/0.8.13-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/deconstruction/generated/0.8.13-success.txt index b50b605fe6..e711fe7673 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/deconstruction/generated/0.8.13-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/deconstruction/generated/0.8.13-success.txt @@ -5,25 +5,25 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Counter { │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ uint value; │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 6 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 4 + │ ╰────────────────────────────── name: 4 │ │ │ │ ╰───────────────────── ref: 2 │ │ - │ ╰───── def: 5 + │ ╰───── name: 5 │ 9 │ contract Test { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 10 │ using {Lib.increment} for Lib.Counter; │ ─┬─ ────┬──── ─┬─ ───┬─── │ ╰────────────────────────────── ref: 1 @@ -36,16 +36,50 @@ References and definitions: │ 12 │ function test(Lib.Counter memory c) public { │ ──┬─ ─┬─ ───┬─── ┬ - │ ╰──────────────────────── def: 7 + │ ╰──────────────────────── name: 7 │ │ │ │ │ ╰──────────────────── ref: 1 │ │ │ │ ╰────────────── ref: 2 │ │ - │ ╰── def: 8 + │ ╰── name: 8 13 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 8 │ │ │ ╰────── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ library Lib { + 2 │ │ ╭─▶ struct Counter { + 3 │ │ │ uint value; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 5 │ │ ╭───▶ + 6 │ │ ├───▶ function increment(Counter memory _counter) public {} + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────────────────── definiens: 5 + │ │ │ + │ │ ╰───────────────────────────────────────────────────────────────── definiens: 4 + 7 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────── definiens: 1 + 8 │ ╭─────────▶ + ┆ ┆ + 11 │ │ ╭─────▶ + 12 │ │ │ function test(Lib.Counter memory c) public { + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 8 + ┆ ┆ ┆ + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 7 + 15 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 6 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.4.11-failure.txt index d5bc149c8f..201066a72d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.4.11-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.6.0-failure.txt index 8db01439b4..08ba3939c8 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.6.0-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or EnumKeyword or ImportKeyword or InterfaceKeyw │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.7.1-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.7.1-failure.txt index 42901b1e0d..bdc863c916 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.7.1-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.7.1-failure.txt @@ -15,7 +15,16 @@ References and definitions: │ 1 │ function square(int value) returns (int) {} │ ───┬── ──┬── - │ ╰────────────── def: 1 + │ ╰────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ function square(int value) returns (int) {} + │ ────────────────────┬─┬───────────────────── + │ ╰───────────────────────── definiens: 2 + │ │ + │ ╰─────────────────────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.7.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.7.4-failure.txt index 6f22fc10c0..0ac7a94555 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.7.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.7.4-failure.txt @@ -15,7 +15,16 @@ References and definitions: │ 1 │ function square(int value) returns (int) {} │ ───┬── ──┬── - │ ╰────────────── def: 1 + │ ╰────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ function square(int value) returns (int) {} + │ ────────────────────┬─┬───────────────────── + │ ╰───────────────────────── definiens: 2 + │ │ + │ ╰─────────────────────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.0-failure.txt index 727aa868e4..67d174648c 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.0-failure.txt @@ -15,7 +15,16 @@ References and definitions: │ 1 │ function square(int value) returns (int) {} │ ───┬── ──┬── - │ ╰────────────── def: 1 + │ ╰────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ function square(int value) returns (int) {} + │ ────────────────────┬─┬───────────────────── + │ ╰───────────────────────── definiens: 2 + │ │ + │ ╰─────────────────────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.13-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.13-success.txt index b5e0e14463..f3ba95c302 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.13-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.13-success.txt @@ -5,9 +5,9 @@ References and definitions: │ 1 │ function square(int value) returns (int) {} │ ───┬── ──┬── - │ ╰────────────── def: 1 + │ ╰────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 │ 3 │ using {square} for int; │ ───┬── @@ -15,12 +15,30 @@ References and definitions: │ 5 │ function test(int x) returns (int) { │ ──┬─ ┬ - │ ╰───────── def: 3 + │ ╰───────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 6 │ return x.square(); │ ┬ ───┬── │ ╰───────── ref: 4 │ │ │ ╰──── ref: 1 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ function square(int value) returns (int) {} + │ ────────────────────┬─┬───────────────────── + │ ╰───────────────────────── definiens: 2 + │ │ + │ ╰─────────────────────── definiens: 1 + │ + 4 │ ╭─▶ + 5 │ │ function test(int x) returns (int) { + │ │ ──┬── + │ │ ╰──── definiens: 4 + ┆ ┆ + 7 │ ├─▶ } + │ │ + │ ╰─────── definiens: 3 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.4-failure.txt index fb351beeb5..433e569515 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.4-failure.txt @@ -15,7 +15,16 @@ References and definitions: │ 1 │ function square(int value) returns (int) {} │ ───┬── ──┬── - │ ╰────────────── def: 1 + │ ╰────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ function square(int value) returns (int) {} + │ ────────────────────┬─┬───────────────────── + │ ╰───────────────────────── definiens: 2 + │ │ + │ ╰─────────────────────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.8-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.8-failure.txt index 95eb6e1847..4d4a681a81 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.8-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary/generated/0.8.8-failure.txt @@ -15,7 +15,16 @@ References and definitions: │ 1 │ function square(int value) returns (int) {} │ ───┬── ──┬── - │ ╰────────────── def: 1 + │ ╰────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ function square(int value) returns (int) {} + │ ────────────────────┬─┬───────────────────── + │ ╰───────────────────────── definiens: 2 + │ │ + │ ╰─────────────────────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.4.11-failure.txt index 1ff7ffa08a..df12f26c19 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.4.11-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.6.0-failure.txt index 01f52f86d5..4279486d12 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.6.0-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or EnumKeyword or ImportKeyword or InterfaceKeyw │ ╰─────── Error occurred here. ───╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.7.1-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.7.1-failure.txt index 7148e3d878..3af912fa0c 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.7.1-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.7.1-failure.txt @@ -15,10 +15,21 @@ References and definitions: │ 1 │ function first(uint[] memory values) returns (uint) { │ ──┬── ───┬── - │ ╰───────────────────────── def: 1 + │ ╰───────────────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 2 │ return values[0]; │ ───┬── │ ╰──── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ function first(uint[] memory values) returns (uint) { + │ │ ──────────┬───────── + │ │ ╰─────────── definiens: 2 + ┆ ┆ + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.7.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.7.4-failure.txt index ec13c7c601..33cdd4f726 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.7.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.7.4-failure.txt @@ -15,10 +15,21 @@ References and definitions: │ 1 │ function first(uint[] memory values) returns (uint) { │ ──┬── ───┬── - │ ╰───────────────────────── def: 1 + │ ╰───────────────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 2 │ return values[0]; │ ───┬── │ ╰──── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ function first(uint[] memory values) returns (uint) { + │ │ ──────────┬───────── + │ │ ╰─────────── definiens: 2 + ┆ ┆ + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.0-failure.txt index 195b5dfa8f..534f7b5314 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.0-failure.txt @@ -15,10 +15,21 @@ References and definitions: │ 1 │ function first(uint[] memory values) returns (uint) { │ ──┬── ───┬── - │ ╰───────────────────────── def: 1 + │ ╰───────────────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 2 │ return values[0]; │ ───┬── │ ╰──── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ function first(uint[] memory values) returns (uint) { + │ │ ──────────┬───────── + │ │ ╰─────────── definiens: 2 + ┆ ┆ + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.13-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.13-success.txt index e10430f5e7..c8f2f04db2 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.13-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.13-success.txt @@ -5,9 +5,9 @@ References and definitions: │ 1 │ function first(uint[] memory values) returns (uint) { │ ──┬── ───┬── - │ ╰───────────────────────── def: 1 + │ ╰───────────────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 2 │ return values[0]; │ ───┬── │ ╰──── ref: 2 @@ -18,12 +18,32 @@ References and definitions: │ 7 │ function test(uint[] memory values) returns (uint) { │ ──┬─ ───┬── - │ ╰──────────────────────── def: 3 + │ ╰──────────────────────── name: 3 │ │ - │ ╰──── def: 4 + │ ╰──── name: 4 8 │ return values.first(); │ ───┬── ──┬── │ ╰────────── ref: 4 │ │ │ ╰──── ref: 1 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ function first(uint[] memory values) returns (uint) { + │ │ ──────────┬───────── + │ │ ╰─────────── definiens: 2 + ┆ ┆ + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 + │ + 6 │ ╭───▶ + 7 │ │ function test(uint[] memory values) returns (uint) { + │ │ ──────────┬───────── + │ │ ╰─────────── definiens: 4 + ┆ ┆ + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 3 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.4-failure.txt index 7108951852..a866a7cf1e 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.4-failure.txt @@ -15,10 +15,21 @@ References and definitions: │ 1 │ function first(uint[] memory values) returns (uint) { │ ──┬── ───┬── - │ ╰───────────────────────── def: 1 + │ ╰───────────────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 2 │ return values[0]; │ ───┬── │ ╰──── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ function first(uint[] memory values) returns (uint) { + │ │ ──────────┬───────── + │ │ ╰─────────── definiens: 2 + ┆ ┆ + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.8-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.8-failure.txt index 4762b7438c..3e32de07e2 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.8-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/elementary_arrays/generated/0.8.8-failure.txt @@ -15,10 +15,21 @@ References and definitions: │ 1 │ function first(uint[] memory values) returns (uint) { │ ──┬── ───┬── - │ ╰───────────────────────── def: 1 + │ ╰───────────────────────── name: 1 │ │ - │ ╰──── def: 2 + │ ╰──── name: 2 2 │ return values[0]; │ ───┬── │ ╰──── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ function first(uint[] memory values) returns (uint) { + │ │ ──────────┬───────── + │ │ ╰─────────── definiens: 2 + ┆ ┆ + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.4.11-failure.txt index 35d503d83c..aad066109d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.4.11-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.6.0-failure.txt index 25715a30c8..0e3755469c 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.6.0-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or EnumKeyword or ImportKeyword or InterfaceKeyw │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.7.1-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.7.1-failure.txt index d7fed1da78..2ab4f79279 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.7.1-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.7.1-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or EnumKeyword or FunctionKeyword or ImportKeywo │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.7.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.7.4-failure.txt index 672a64c307..615eac2090 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.7.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.7.4-failure.txt @@ -11,3 +11,4 @@ Error: Expected AddressKeyword or BoolKeyword or ByteKeyword or BytesKeyword or │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.0-failure.txt index 02390336ef..584d095049 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.0-failure.txt @@ -11,3 +11,4 @@ Error: Expected AddressKeyword or BoolKeyword or BytesKeyword or ContractKeyword │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.13-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.13-success.txt index 8dd4bdd0fb..03be5aaa4c 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.13-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.13-success.txt @@ -9,22 +9,22 @@ References and definitions: │ 3 │ function invoke(function(uint) x) { │ ───┬── ┬ - │ ╰───────────────────── def: 1 + │ ╰───────────────────── name: 1 │ │ - │ ╰── def: 2 + │ ╰── name: 2 4 │ x(1); │ ┬ │ ╰── ref: 2 │ 7 │ function foo(uint x) {} │ ─┬─ ┬ - │ ╰────────── def: 3 + │ ╰────────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 │ 9 │ function test() { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 10 │ foo.invoke(); │ ─┬─ ───┬── │ ╰────────── ref: 3 @@ -33,7 +33,7 @@ References and definitions: │ 12 │ function (uint) bar = foo; │ ─┬─ ─┬─ - │ ╰───────── def: 6 + │ ╰───────── name: 6 │ │ │ ╰─── ref: 3 13 │ bar.invoke(); @@ -42,3 +42,31 @@ References and definitions: │ │ │ ╰──── ref: 1 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 2 │ ╭─────▶ + 3 │ │ function invoke(function(uint) x) { + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + ┆ ┆ + 5 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 6 │ ╭─▶ + 7 │ │ ├─▶ function foo(uint x) {} + │ │ │ ───┬── + │ │ │ ╰───────── definiens: 4 + │ │ │ + │ │ ╰───────────────────────────── definiens: 3 + 8 │ ╭───────▶ + ┆ ┆ + 11 │ │ ╭───▶ + 12 │ │ ├───▶ function (uint) bar = foo; + │ │ │ + │ │ ╰────────────────────────────────────── definiens: 6 + ┆ ┆ + 14 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.4-failure.txt index 612f25229b..d933d8ce28 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.4-failure.txt @@ -11,3 +11,4 @@ Error: Expected AddressKeyword or BoolKeyword or BytesKeyword or ContractKeyword │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.8-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.8-failure.txt index d1063c781b..235874021b 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.8-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/function_types/generated/0.8.8-failure.txt @@ -11,3 +11,4 @@ Error: Expected AddressKeyword or BoolKeyword or BytesKeyword or ContractKeyword │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.4.11-failure.txt index fecd944dcb..a02b38afe3 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.4.11-failure.txt @@ -11,28 +11,48 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰────── Error occurred here. ───╯ References and definitions: +Definiens: References and definitions: ╭─[main.sol:1:1] │ 1 │ import {Counter} from "counter.sol"; │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 │ │ │ ╰───── unresolved │ 3 │ contract Test { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 4 │ function test(Counter memory c) public { │ ──┬─ ───┬─── ┬ - │ ╰──────────────────── def: 3 + │ ╰──────────────────── name: 3 │ │ │ │ ╰────────────── ref: 1 │ │ - │ ╰── def: 4 + │ ╰── name: 4 5 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 4 │ │ │ ╰────── unresolved ───╯ +Definiens: + ╭─[main.sol:1:1] + │ + 1 │ │ import {Counter} from "counter.sol"; + │ │ ───┬─── + │ │ ╰───── definiens: 1 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test(Counter memory c) public { + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 4 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 2 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.6.0-failure.txt index 7b9380887a..60f13f6d52 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.6.0-failure.txt @@ -15,33 +15,63 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 +───╯ +Definiens: + ╭─[counter.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 ───╯ References and definitions: ╭─[main.sol:1:1] │ 1 │ import {Counter} from "counter.sol"; │ ───┬─── - │ ╰───── def: 3 + │ ╰───── name: 3 │ │ │ ╰───── ref: 1 │ 3 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 4 │ function test(Counter memory c) public { │ ──┬─ ───┬─── ┬ - │ ╰──────────────────── def: 5 + │ ╰──────────────────── name: 5 │ │ │ │ ╰────────────── ref: 1 │ │ - │ ╰── def: 6 + │ ╰── name: 6 5 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 6 │ │ │ ╰────── unresolved ───╯ +Definiens: + ╭─[main.sol:1:1] + │ + 1 │ │ import {Counter} from "counter.sol"; + │ │ ───┬─── + │ │ ╰───── definiens: 3 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test(Counter memory c) public { + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 6 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 5 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 4 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.7.1-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.7.1-failure.txt index 8818c91b3a..a8ca2070bc 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.7.1-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.7.1-failure.txt @@ -14,41 +14,77 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 +───╯ +Definiens: + ╭─[counter.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 ───╯ References and definitions: ╭─[main.sol:1:1] │ 1 │ import {Counter} from "counter.sol"; │ ───┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 │ │ │ ╰───── ref: 1 │ 3 │ contract Test { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 4 │ function test(Counter memory c) public { │ ──┬─ ───┬─── ┬ - │ ╰──────────────────── def: 7 + │ ╰──────────────────── name: 7 │ │ │ │ ╰────────────── ref: 1 │ │ - │ ╰── def: 8 + │ ╰── name: 8 5 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 8 │ │ │ ╰────── unresolved ───╯ +Definiens: + ╭─[main.sol:1:1] + │ + 1 │ │ import {Counter} from "counter.sol"; + │ │ ───┬─── + │ │ ╰───── definiens: 5 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test(Counter memory c) public { + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 8 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 7 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 6 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.7.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.7.4-failure.txt index 19f25ba046..f3a7e2bd2a 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.7.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.7.4-failure.txt @@ -14,41 +14,77 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 +───╯ +Definiens: + ╭─[counter.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 ───╯ References and definitions: ╭─[main.sol:1:1] │ 1 │ import {Counter} from "counter.sol"; │ ───┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 │ │ │ ╰───── ref: 1 │ 3 │ contract Test { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 4 │ function test(Counter memory c) public { │ ──┬─ ───┬─── ┬ - │ ╰──────────────────── def: 7 + │ ╰──────────────────── name: 7 │ │ │ │ ╰────────────── ref: 1 │ │ - │ ╰── def: 8 + │ ╰── name: 8 5 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 8 │ │ │ ╰────── unresolved ───╯ +Definiens: + ╭─[main.sol:1:1] + │ + 1 │ │ import {Counter} from "counter.sol"; + │ │ ───┬─── + │ │ ╰───── definiens: 5 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test(Counter memory c) public { + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 8 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 7 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 6 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.0-failure.txt index dd2e75f8c2..5fe86fcc35 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.0-failure.txt @@ -14,41 +14,77 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 +───╯ +Definiens: + ╭─[counter.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 ───╯ References and definitions: ╭─[main.sol:1:1] │ 1 │ import {Counter} from "counter.sol"; │ ───┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 │ │ │ ╰───── ref: 1 │ 3 │ contract Test { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 4 │ function test(Counter memory c) public { │ ──┬─ ───┬─── ┬ - │ ╰──────────────────── def: 7 + │ ╰──────────────────── name: 7 │ │ │ │ ╰────────────── ref: 1 │ │ - │ ╰── def: 8 + │ ╰── name: 8 5 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 8 │ │ │ ╰────── unresolved ───╯ +Definiens: + ╭─[main.sol:1:1] + │ + 1 │ │ import {Counter} from "counter.sol"; + │ │ ───┬─── + │ │ ╰───── definiens: 5 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test(Counter memory c) public { + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 8 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 7 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 6 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.13-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.13-success.txt index ee2ee4c284..908ff33f40 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.13-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.13-success.txt @@ -5,18 +5,18 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 │ 7 │ using {increment} for Counter global; │ ────┬──── ───┬─── @@ -24,28 +24,64 @@ References and definitions: │ │ │ ╰───── ref: 1 ───╯ +Definiens: + ╭─[counter.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 +───╯ References and definitions: ╭─[main.sol:1:1] │ 1 │ import {Counter} from "counter.sol"; │ ───┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 │ │ │ ╰───── ref: 1 │ 3 │ contract Test { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 4 │ function test(Counter memory c) public { │ ──┬─ ───┬─── ┬ - │ ╰──────────────────── def: 7 + │ ╰──────────────────── name: 7 │ │ │ │ ╰────────────── ref: 1 │ │ - │ ╰── def: 8 + │ ╰── name: 8 5 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 8 │ │ │ ╰────── ref: 3 ───╯ +Definiens: + ╭─[main.sol:1:1] + │ + 1 │ │ import {Counter} from "counter.sol"; + │ │ ───┬─── + │ │ ╰───── definiens: 5 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test(Counter memory c) public { + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 8 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 7 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 6 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.4-failure.txt index 5b849d8c4b..8ab68f067d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.4-failure.txt @@ -14,41 +14,77 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 +───╯ +Definiens: + ╭─[counter.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 ───╯ References and definitions: ╭─[main.sol:1:1] │ 1 │ import {Counter} from "counter.sol"; │ ───┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 │ │ │ ╰───── ref: 1 │ 3 │ contract Test { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 4 │ function test(Counter memory c) public { │ ──┬─ ───┬─── ┬ - │ ╰──────────────────── def: 7 + │ ╰──────────────────── name: 7 │ │ │ │ ╰────────────── ref: 1 │ │ - │ ╰── def: 8 + │ ╰── name: 8 5 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 8 │ │ │ ╰────── unresolved ───╯ +Definiens: + ╭─[main.sol:1:1] + │ + 1 │ │ import {Counter} from "counter.sol"; + │ │ ───┬─── + │ │ ╰───── definiens: 5 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test(Counter memory c) public { + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 8 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 7 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 6 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.8-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.8-failure.txt index bdd41ff013..3e57b55071 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.8-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/global/generated/0.8.8-failure.txt @@ -14,41 +14,77 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 +───╯ +Definiens: + ╭─[counter.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 ───╯ References and definitions: ╭─[main.sol:1:1] │ 1 │ import {Counter} from "counter.sol"; │ ───┬─── - │ ╰───── def: 5 + │ ╰───── name: 5 │ │ │ ╰───── ref: 1 │ 3 │ contract Test { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 4 │ function test(Counter memory c) public { │ ──┬─ ───┬─── ┬ - │ ╰──────────────────── def: 7 + │ ╰──────────────────── name: 7 │ │ │ │ ╰────────────── ref: 1 │ │ - │ ╰── def: 8 + │ ╰── name: 8 5 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 8 │ │ │ ╰────── unresolved ───╯ +Definiens: + ╭─[main.sol:1:1] + │ + 1 │ │ import {Counter} from "counter.sol"; + │ │ ───┬─── + │ │ ╰───── definiens: 5 + 2 │ ╭───▶ + ┆ ┆ ┆ + 4 │ │ ╭─▶ function test(Counter memory c) public { + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 8 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 7 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 6 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/in_contract/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/in_contract/generated/0.4.11-success.txt index 8f55bce19a..1beb7f67eb 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/in_contract/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/in_contract/generated/0.4.11-success.txt @@ -5,25 +5,25 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Counter { │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ uint value; │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 6 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 4 + │ ╰────────────────────────────── name: 4 │ │ │ │ ╰───────────────────── ref: 2 │ │ - │ ╰───── def: 5 + │ ╰───── name: 5 │ 9 │ contract Test { │ ──┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 10 │ using Lib for Lib.Counter; │ ─┬─ ─┬─ ───┬─── │ ╰─────────────────── ref: 1 @@ -34,16 +34,50 @@ References and definitions: │ 12 │ function test(Lib.Counter memory c) public { │ ──┬─ ─┬─ ───┬─── ┬ - │ ╰──────────────────────── def: 7 + │ ╰──────────────────────── name: 7 │ │ │ │ │ ╰──────────────────── ref: 1 │ │ │ │ ╰────────────── ref: 2 │ │ - │ ╰── def: 8 + │ ╰── name: 8 13 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 8 │ │ │ ╰────── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ library Lib { + 2 │ │ ╭─▶ struct Counter { + 3 │ │ │ uint value; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 5 │ │ ╭───▶ + 6 │ │ ├───▶ function increment(Counter memory _counter) public {} + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────────────────── definiens: 5 + │ │ │ + │ │ ╰───────────────────────────────────────────────────────────────── definiens: 4 + 7 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────── definiens: 1 + 8 │ ╭─────────▶ + ┆ ┆ + 11 │ │ ╭─────▶ + 12 │ │ │ function test(Lib.Counter memory c) public { + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 8 + ┆ ┆ ┆ + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 7 + 15 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 6 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/in_library/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/in_library/generated/0.4.11-success.txt index 0822d8a3a3..f6e1680c63 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/in_library/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/in_library/generated/0.4.11-success.txt @@ -5,25 +5,25 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Counter { │ ───┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 3 │ uint value; │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 6 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 4 + │ ╰────────────────────────────── name: 4 │ │ │ │ ╰───────────────────── ref: 2 │ │ - │ ╰───── def: 5 + │ ╰───── name: 5 │ 9 │ library Utils { │ ──┬── - │ ╰──── def: 6 + │ ╰──── name: 6 10 │ using Lib for Lib.Counter; │ ─┬─ ─┬─ ───┬─── │ ╰─────────────────── ref: 1 @@ -34,16 +34,50 @@ References and definitions: │ 12 │ function test(Lib.Counter memory c) public { │ ──┬─ ─┬─ ───┬─── ┬ - │ ╰──────────────────────── def: 7 + │ ╰──────────────────────── name: 7 │ │ │ │ │ ╰──────────────────── ref: 1 │ │ │ │ ╰────────────── ref: 2 │ │ - │ ╰── def: 8 + │ ╰── name: 8 13 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 8 │ │ │ ╰────── ref: 4 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ library Lib { + 2 │ │ ╭─▶ struct Counter { + 3 │ │ │ uint value; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 3 + 4 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 5 │ │ ╭───▶ + 6 │ │ ├───▶ function increment(Counter memory _counter) public {} + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────────────────── definiens: 5 + │ │ │ + │ │ ╰───────────────────────────────────────────────────────────────── definiens: 4 + 7 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────── definiens: 1 + 8 │ ╭─────────▶ + ┆ ┆ + 11 │ │ ╭─────▶ + 12 │ │ │ function test(Lib.Counter memory c) public { + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 8 + ┆ ┆ ┆ + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 7 + 15 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 6 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/inherit_extension/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/inherit_extension/generated/0.4.11-success.txt index d8aec265bc..098b245dbd 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/inherit_extension/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/inherit_extension/generated/0.4.11-success.txt @@ -5,23 +5,23 @@ References and definitions: │ 2 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 3 │ function nop(uint256 x) {} │ ─┬─ ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 5 │ contract Base { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 6 │ uint256 totalSupply; │ ─────┬───── - │ ╰─────── def: 5 + │ ╰─────── name: 5 │ 8 │ contract Middle is Base { │ ───┬── ──┬─ - │ ╰──────────── def: 6 + │ ╰──────────── name: 6 │ │ │ ╰─── ref: 4 9 │ using Lib for uint256; @@ -30,15 +30,50 @@ References and definitions: │ 11 │ contract Test is Middle { │ ──┬─ ───┬── - │ ╰───────────── def: 7 + │ ╰───────────── name: 7 │ │ │ ╰──── ref: 6 12 │ function test() public { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 13 │ totalSupply.nop(); │ ─────┬───── ─┬─ │ ╰─────────── ref: 5 │ │ │ ╰─── ref: 2 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────────▶ // In Solidity < 0.7.0 using directives are inherited in sub contracts + ┆ ┆ + 3 │ │ function nop(uint256 x) {} + │ │ ───────────────┬─────┬───────── + │ │ ╰───────────────── definiens: 2 + │ │ │ + │ │ ╰─────────── definiens: 3 + 4 │ ├───────│ ▶ } + │ │ │ + │ ╰─────────────── definiens: 1 + 5 │ ╭─▶ contract Base { + 6 │ │ uint256 totalSupply; + │ │ ────────────┬──────────── + │ │ ╰────────────── definiens: 5 + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 4 + 8 │ ╭───▶ contract Middle is Base { + ┆ ┆ + 10 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 6 + 11 │ ╭─│ ────▶ contract Test is Middle { + 12 │ │ ╭─────▶ function test() public { + ┆ ┆ ┆ + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 8 + 15 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 7 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/inherit_extension/generated/0.7.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/inherit_extension/generated/0.7.0-failure.txt index 3aa3f58fd1..666e748fe5 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/inherit_extension/generated/0.7.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/inherit_extension/generated/0.7.0-failure.txt @@ -5,23 +5,23 @@ References and definitions: │ 2 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 3 │ function nop(uint256 x) {} │ ─┬─ ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 5 │ contract Base { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 6 │ uint256 totalSupply; │ ─────┬───── - │ ╰─────── def: 5 + │ ╰─────── name: 5 │ 8 │ contract Middle is Base { │ ───┬── ──┬─ - │ ╰──────────── def: 6 + │ ╰──────────── name: 6 │ │ │ ╰─── ref: 4 9 │ using Lib for uint256; @@ -30,15 +30,50 @@ References and definitions: │ 11 │ contract Test is Middle { │ ──┬─ ───┬── - │ ╰───────────── def: 7 + │ ╰───────────── name: 7 │ │ │ ╰──── ref: 6 12 │ function test() public { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 13 │ totalSupply.nop(); │ ─────┬───── ─┬─ │ ╰─────────── ref: 5 │ │ │ ╰─── unresolved ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────────▶ // In Solidity < 0.7.0 using directives are inherited in sub contracts + ┆ ┆ + 3 │ │ function nop(uint256 x) {} + │ │ ───────────────┬─────┬───────── + │ │ ╰───────────────── definiens: 2 + │ │ │ + │ │ ╰─────────── definiens: 3 + 4 │ ├───────│ ▶ } + │ │ │ + │ ╰─────────────── definiens: 1 + 5 │ ╭─▶ contract Base { + 6 │ │ uint256 totalSupply; + │ │ ────────────┬──────────── + │ │ ╰────────────── definiens: 5 + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 4 + 8 │ ╭───▶ contract Middle is Base { + ┆ ┆ + 10 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 6 + 11 │ ╭─│ ────▶ contract Test is Middle { + 12 │ │ ╭─────▶ function test() public { + ┆ ┆ ┆ + 14 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 8 + 15 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 7 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/inherited_types/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/inherited_types/generated/0.4.11-success.txt index e4adbece8d..90d77cc793 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/inherited_types/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/inherited_types/generated/0.4.11-success.txt @@ -5,41 +5,41 @@ References and definitions: │ 1 │ interface IPool { │ ──┬── - │ ╰──── def: 1 + │ ╰──── name: 1 2 │ struct Info { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ uint256 amount; │ ───┬── - │ ╰──── def: 3 + │ ╰──── name: 3 │ 6 │ library Math { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 7 │ function nop(uint256 x) public {} │ ─┬─ ┬ - │ ╰───────────── def: 5 + │ ╰───────────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 │ 9 │ contract Test is IPool { │ ──┬─ ──┬── - │ ╰──────────── def: 7 + │ ╰──────────── name: 7 │ │ │ ╰──── ref: 1 10 │ mapping(uint256 => Info) infos; │ ──┬─ ──┬── │ ╰────────── ref: 2 │ │ - │ ╰──── def: 8 + │ ╰──── name: 8 11 │ using Math for uint256; │ ──┬─ │ ╰─── ref: 4 12 │ function test(uint256 x) public { │ ──┬─ ┬ - │ ╰───────────── def: 9 + │ ╰───────────── name: 9 │ │ - │ ╰── def: 10 + │ ╰── name: 10 13 │ infos[x].amount.nop(); │ ──┬── ┬ ───┬── ─┬─ │ ╰────────────────── ref: 8 @@ -50,3 +50,42 @@ References and definitions: │ │ │ ╰─── ref: 5 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ interface IPool { + 2 │ │ ╭─▶ struct Info { + 3 │ │ │ uint256 amount; + │ │ │ ────────────┬─────────── + │ │ │ ╰───────────── definiens: 3 + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 5 │ ├─│ ──▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 6 │ ╭───▶ library Math { + 7 │ │ function nop(uint256 x) public {} + │ │ ───────────────────┬─┬──────────────── + │ │ ╰──────────────────── definiens: 5 + │ │ │ + │ │ ╰────────────────── definiens: 6 + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 4 + 9 │ ╭─────────▶ contract Test is IPool { + 10 │ │ mapping(uint256 => Info) infos; + │ │ ──────────────────┬───────────────── + │ │ ╰─────────────────── definiens: 8 + ┆ ┆ ┆ + 12 │ │ ╭───────▶ function test(uint256 x) public { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 10 + ┆ ┆ ┆ + 14 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────────── definiens: 9 + 15 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 7 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/mappings/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/mappings/generated/0.4.11-success.txt index 6094b2e72e..c124d59a51 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/mappings/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/mappings/generated/0.4.11-success.txt @@ -5,16 +5,16 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ using Lib for mapping(address => uint); │ ─┬─ │ ╰─── ref: 4 3 │ mapping(address => uint) balances; │ ────┬─── - │ ╰───── def: 2 + │ ╰───── name: 2 4 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ balances.nop(); │ ────┬─── ─┬─ │ ╰───────── ref: 2 @@ -23,10 +23,36 @@ References and definitions: │ 8 │ library Lib { │ ─┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 9 │ function nop(mapping(address => uint) storage m) internal {} │ ─┬─ ┬ - │ ╰────────────────────────────────────── def: 5 + │ ╰────────────────────────────────────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract Test { + ┆ ┆ + 3 │ │ │ mapping(address => uint) balances; + │ │ │ ───────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 2 + 4 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 7 │ ├─│ ──▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 8 │ ╭───▶ library Lib { + 9 │ │ function nop(mapping(address => uint) storage m) internal {} + │ │ ────────────────────────────────┬─┬────────────────────────────── + │ │ ╰────────────────────────────────── definiens: 5 + │ │ │ + │ │ ╰──────────────────────────────── definiens: 6 + 10 │ ├───▶ } + │ │ + │ ╰───────── definiens: 4 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/on_interfaces_inherited/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/on_interfaces_inherited/generated/0.4.11-success.txt index f11a068098..1a2e48aea4 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/on_interfaces_inherited/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/on_interfaces_inherited/generated/0.4.11-success.txt @@ -5,22 +5,22 @@ References and definitions: │ 1 │ library LibFoo { │ ───┬── - │ ╰──── def: 1 + │ ╰──── name: 1 2 │ function use_foo(IFoo x) public returns (int) {} │ ───┬─── ──┬─ ┬ - │ ╰──────────── def: 2 + │ ╰──────────── name: 2 │ │ │ │ ╰───── ref: 4 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ interface IFoo { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 │ 6 │ contract Base { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 7 │ using LibFoo for IFoo; │ ───┬── ──┬─ │ ╰───────────── ref: 1 @@ -29,14 +29,14 @@ References and definitions: │ 9 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 6 + │ ╰─────────── name: 6 │ │ │ ╰─── ref: 5 10 │ function test(address x) public { │ ──┬─ ┬ - │ ╰───────────── def: 7 + │ ╰───────────── name: 7 │ │ - │ ╰── def: 8 + │ ╰── name: 8 │ 12 │ IFoo(x).use_foo(); │ ──┬─ ┬ ───┬─── @@ -46,3 +46,36 @@ References and definitions: │ │ │ ╰───── ref: 2 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ library LibFoo { + 2 │ │ function use_foo(IFoo x) public returns (int) {} + │ │ ────────────────────────┬─┬────────────────────────── + │ │ ╰────────────────────────────── definiens: 3 + │ │ │ + │ │ ╰──────────────────────────── definiens: 2 + 3 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 4 │ ╭─▶ interface IFoo { + 5 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 4 + 6 │ ╭───▶ contract Base { + ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 5 + 9 │ ╭─│ ──────▶ contract Test is Base { + 10 │ │ ╭───────▶ function test(address x) public { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 8 + ┆ ┆ ┆ + 13 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────────── definiens: 7 + 14 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 6 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/on_interfaces_inherited/generated/0.7.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/on_interfaces_inherited/generated/0.7.0-failure.txt index 5afd65e4af..7f312bf59f 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/on_interfaces_inherited/generated/0.7.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/on_interfaces_inherited/generated/0.7.0-failure.txt @@ -5,22 +5,22 @@ References and definitions: │ 1 │ library LibFoo { │ ───┬── - │ ╰──── def: 1 + │ ╰──── name: 1 2 │ function use_foo(IFoo x) public returns (int) {} │ ───┬─── ──┬─ ┬ - │ ╰──────────── def: 2 + │ ╰──────────── name: 2 │ │ │ │ ╰───── ref: 4 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ interface IFoo { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 │ 6 │ contract Base { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 7 │ using LibFoo for IFoo; │ ───┬── ──┬─ │ ╰───────────── ref: 1 @@ -29,14 +29,14 @@ References and definitions: │ 9 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 6 + │ ╰─────────── name: 6 │ │ │ ╰─── ref: 5 10 │ function test(address x) public { │ ──┬─ ┬ - │ ╰───────────── def: 7 + │ ╰───────────── name: 7 │ │ - │ ╰── def: 8 + │ ╰── name: 8 │ 12 │ IFoo(x).use_foo(); │ ──┬─ ┬ ───┬─── @@ -46,3 +46,36 @@ References and definitions: │ │ │ ╰───── unresolved ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ library LibFoo { + 2 │ │ function use_foo(IFoo x) public returns (int) {} + │ │ ────────────────────────┬─┬────────────────────────── + │ │ ╰────────────────────────────── definiens: 3 + │ │ │ + │ │ ╰──────────────────────────── definiens: 2 + 3 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 4 │ ╭─▶ interface IFoo { + 5 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 4 + 6 │ ╭───▶ contract Base { + ┆ ┆ + 8 │ │ ├───▶ } + │ │ │ + │ │ ╰───────── definiens: 5 + 9 │ ╭─│ ──────▶ contract Test is Base { + 10 │ │ ╭───────▶ function test(address x) public { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 8 + ┆ ┆ ┆ + 13 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────────── definiens: 7 + 14 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 6 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/on_parameters/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/on_parameters/generated/0.4.11-success.txt index 4753580729..d98baa2788 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/on_parameters/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/on_parameters/generated/0.4.11-success.txt @@ -5,26 +5,26 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function nop(uint256 x) internal {} │ ─┬─ ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 5 │ using Lib for uint256; │ ─┬─ │ ╰─── ref: 1 6 │ function test(uint256 x) public returns (uint256 y) { │ ──┬─ ┬ ┬ - │ ╰──────────────────────────────────────── def: 5 + │ ╰──────────────────────────────────────── name: 5 │ │ │ - │ ╰───────────────────────────── def: 6 + │ ╰───────────────────────────── name: 6 │ │ - │ ╰── def: 7 + │ ╰── name: 7 7 │ x.nop(); │ ┬ ─┬─ │ ╰────── ref: 6 @@ -36,3 +36,30 @@ References and definitions: │ │ │ ╰─── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ library Lib { + 2 │ │ function nop(uint256 x) internal {} + │ │ ────────────────────┬┬────────────────── + │ │ ╰───────────────────── definiens: 2 + │ │ │ + │ │ ╰──────────────────── definiens: 3 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 6 │ │ ╭───▶ function test(uint256 x) public returns (uint256 y) { + │ │ │ ────┬──── ────┬──── + │ │ │ ╰───────────────────────────────── definiens: 6 + │ │ │ │ + │ │ │ ╰────── definiens: 7 + ┆ ┆ ┆ + 9 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 10 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/on_state_var_initialization/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/on_state_var_initialization/generated/0.4.11-success.txt index 0dacde723a..ca0193bba0 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/on_state_var_initialization/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/on_state_var_initialization/generated/0.4.11-success.txt @@ -5,29 +5,53 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function nop(uint256 x) returns (uint256) { return x; } │ ─┬─ ┬ ┬ - │ ╰─────────────────────────────────────────── def: 2 + │ ╰─────────────────────────────────────────── name: 2 │ │ │ - │ ╰──────────────────────────────── def: 3 + │ ╰──────────────────────────────── name: 3 │ │ │ ╰── ref: 3 │ 4 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 5 │ using Lib for uint256; │ ─┬─ │ ╰─── ref: 1 6 │ uint256 private v1 = 1; │ ─┬ - │ ╰── def: 5 + │ ╰── name: 5 7 │ uint256 private v2 = v1.nop(); │ ─┬ ─┬ ─┬─ - │ ╰─────────── def: 6 + │ ╰─────────── name: 6 │ │ │ │ ╰────── ref: 5 │ │ │ ╰─── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ library Lib { + 2 │ │ function nop(uint256 x) returns (uint256) { return x; } + │ │ ─────────────────────┬────────┬───────────────────────────── + │ │ ╰──────────────────────────────────────── definiens: 3 + │ │ │ + │ │ ╰─────────────────────────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ contract Test { + ┆ ┆ + 6 │ │ uint256 private v1 = 1; + │ │ ──────────────┬───────────── + │ │ ╰─────────────── definiens: 5 + 7 │ │ uint256 private v2 = v1.nop(); + │ │ ─────────────────┬───────────────── + │ │ ╰─────────────────── definiens: 6 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 4 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/on_super_calls/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/on_super_calls/generated/0.4.11-success.txt index 99cdf03840..366f061137 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/on_super_calls/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/on_super_calls/generated/0.4.11-success.txt @@ -5,14 +5,14 @@ References and definitions: │ 1 │ contract A { │ ┬ - │ ╰── def: 1 + │ ╰── name: 1 2 │ function total() public returns (uint256) {} │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 4 │ contract B is A { │ ┬ ┬ - │ ╰─────── def: 3 + │ ╰─────── name: 3 │ │ │ ╰── ref: 1 5 │ using Lib for uint256; @@ -20,7 +20,7 @@ References and definitions: │ ╰─── ref: 5 6 │ function total() public returns (uint256) { │ ──┬── - │ ╰──── def: 4 + │ ╰──── name: 4 7 │ return super.total().nop(); │ ──┬── ─┬─ │ ╰────────── ref: 2 @@ -29,10 +29,40 @@ References and definitions: │ 10 │ library Lib { │ ─┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 11 │ function nop(uint256 x) internal returns (uint256) {} │ ─┬─ ┬ - │ ╰───────────── def: 6 + │ ╰───────────── name: 6 │ │ - │ ╰── def: 7 + │ ╰── name: 7 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ contract A { + 2 │ │ function total() public returns (uint256) {} + │ │ ────────────────────────┬──────────────────────── + │ │ ╰────────────────────────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───────▶ contract B is A { + ┆ ┆ ┆ + 6 │ │ ╭─────▶ function total() public returns (uint256) { + ┆ ┆ ┆ + 8 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 4 + 9 │ ├───│ ──▶ } + │ │ │ + │ ╰───────────── definiens: 3 + 10 │ ╭───▶ library Lib { + 11 │ │ function nop(uint256 x) internal returns (uint256) {} + │ │ ─────────────────────┬───────┬──────────────────────────── + │ │ ╰────────────────────────────────────── definiens: 7 + │ │ │ + │ │ ╰────────────────────────────── definiens: 6 + 12 │ ├───▶ } + │ │ + │ ╰───────── definiens: 5 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/qualified_type/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/qualified_type/generated/0.4.11-success.txt index d2c34aa894..5914318fdb 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/qualified_type/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/qualified_type/generated/0.4.11-success.txt @@ -5,30 +5,30 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Value { │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 3 │ int x; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 │ 5 │ function getValue() external returns (Value memory) {} │ ────┬─── ──┬── - │ ╰─────────────────────────────── def: 4 + │ ╰─────────────────────────────── name: 4 │ │ │ ╰──── ref: 2 6 │ function use(Value memory x) external {} │ ─┬─ ──┬── ┬ - │ ╰────────────────── def: 5 + │ ╰────────────────── name: 5 │ │ │ │ ╰───────────── ref: 2 │ │ - │ ╰── def: 6 + │ ╰── name: 6 │ 8 │ contract Test { │ ──┬─ - │ ╰─── def: 7 + │ ╰─── name: 7 9 │ using Lib for Lib.Value; │ ─┬─ ─┬─ ──┬── │ ╰───────────────── ref: 1 @@ -38,7 +38,7 @@ References and definitions: │ ╰──── ref: 2 10 │ function test() internal { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 11 │ Lib.getValue().use(); │ ─┬─ ────┬─── ─┬─ │ ╰────────────────── ref: 1 @@ -47,3 +47,36 @@ References and definitions: │ │ │ ╰─── ref: 5 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ library Lib { + 2 │ │ ╭─▶ struct Value { + 3 │ │ │ int x; + │ │ │ ───────┬─────── + │ │ │ ╰───────── definiens: 3 + 4 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 5 │ │ function getValue() external returns (Value memory) {} + │ │ ─────────────────────────────┬───────────────────────────── + │ │ ╰─────────────────────────────── definiens: 4 + 6 │ │ function use(Value memory x) external {} + │ │ ──────────────────────┬─┬──────────────────── + │ │ ╰──────────────────────── definiens: 5 + │ │ │ + │ │ ╰────────────────────── definiens: 6 + 7 │ ├─│ ────▶ } + │ │ │ + │ ╰───────────── definiens: 1 + 8 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 10 │ │ ╭───▶ function test() internal { + ┆ ┆ ┆ + 12 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 8 + 13 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 7 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/star/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/star/generated/0.4.11-success.txt index f3c3ede787..8291638574 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/star/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/star/generated/0.4.11-success.txt @@ -5,28 +5,54 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function increment(uint x) public {} │ ────┬──── ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 5 │ contract Test { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 6 │ using Lib for *; │ ─┬─ │ ╰─── ref: 1 │ 8 │ function test(uint x) public { │ ──┬─ ┬ - │ ╰────────── def: 5 + │ ╰────────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 9 │ x.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 6 │ │ │ ╰────── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ library Lib { + 2 │ │ function increment(uint x) public {} + │ │ ────────────────────┬─────┬────────────── + │ │ ╰────────────────────── definiens: 2 + │ │ │ + │ │ ╰──────────────── definiens: 3 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭─────▶ + ┆ ┆ + 7 │ │ ╭───▶ + 8 │ │ │ function test(uint x) public { + │ │ │ ───┬── + │ │ │ ╰──── definiens: 6 + ┆ ┆ ┆ + 10 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 11 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 4 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/star_in_library/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/star_in_library/generated/0.4.11-success.txt index dfe2b1d565..26a6ac7c39 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/star_in_library/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/star_in_library/generated/0.4.11-success.txt @@ -5,15 +5,15 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ using Math for *; │ ──┬─ │ ╰─── ref: 4 3 │ function test(uint x) internal { │ ──┬─ ┬ - │ ╰────────── def: 2 + │ ╰────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 4 │ x.add(1); │ ┬ ─┬─ │ ╰────── ref: 3 @@ -22,12 +22,39 @@ References and definitions: │ 7 │ library Math { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 8 │ function add(uint x, uint y) internal {} │ ─┬─ ┬ ┬ - │ ╰────────────────── def: 5 + │ ╰────────────────── name: 5 │ │ │ - │ ╰────────── def: 6 + │ ╰────────── name: 6 │ │ - │ ╰── def: 7 + │ ╰── name: 7 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ library Lib { + ┆ ┆ ┆ + 3 │ │ ╭─▶ function test(uint x) internal { + │ │ │ ───┬── + │ │ │ ╰──── definiens: 3 + ┆ ┆ ┆ + 5 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 6 │ ├─│ ──▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 7 │ ╭───▶ library Math { + 8 │ │ function add(uint x, uint y) internal {} + │ │ ────────────────────┬─┬────┬───────────────── + │ │ ╰────────────────────────── definiens: 6 + │ │ │ │ + │ │ ╰──────────────────────── definiens: 5 + │ │ │ + │ │ ╰─────────────────── definiens: 7 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 4 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/star_inherited/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/star_inherited/generated/0.4.11-success.txt index 0c749da6a4..d5b5ae5c27 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/star_inherited/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/star_inherited/generated/0.4.11-success.txt @@ -5,30 +5,30 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function increment(uint x) public {} │ ────┬──── ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 5 │ contract Base { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 6 │ using Lib for *; │ ─┬─ │ ╰─── ref: 1 │ 9 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 5 + │ ╰─────────── name: 5 │ │ │ ╰─── ref: 4 10 │ function test(uint x) public { │ ──┬─ ┬ - │ ╰────────── def: 6 + │ ╰────────── name: 6 │ │ - │ ╰── def: 7 + │ ╰── name: 7 │ 12 │ x.increment(); │ ┬ ────┬──── @@ -36,3 +36,33 @@ References and definitions: │ │ │ ╰────── ref: 2 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ library Lib { + 2 │ │ function increment(uint x) public {} + │ │ ────────────────────┬─────┬────────────── + │ │ ╰────────────────────── definiens: 2 + │ │ │ + │ │ ╰──────────────── definiens: 3 + 3 │ ├─│ ▶ } + │ │ │ + │ ╰───────── definiens: 1 + 4 │ ╭─▶ + ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 4 + 8 │ ╭───────▶ + ┆ ┆ ┆ + 10 │ │ ╭─────▶ function test(uint x) public { + │ │ │ ───┬── + │ │ │ ╰──── definiens: 7 + ┆ ┆ ┆ + 13 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 6 + 14 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/star_inherited/generated/0.7.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/star_inherited/generated/0.7.0-failure.txt index d743ce1067..ec3ba0e30c 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/star_inherited/generated/0.7.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/star_inherited/generated/0.7.0-failure.txt @@ -5,30 +5,30 @@ References and definitions: │ 1 │ library Lib { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function increment(uint x) public {} │ ────┬──── ┬ - │ ╰───────────── def: 2 + │ ╰───────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 5 │ contract Base { │ ──┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 6 │ using Lib for *; │ ─┬─ │ ╰─── ref: 1 │ 9 │ contract Test is Base { │ ──┬─ ──┬─ - │ ╰─────────── def: 5 + │ ╰─────────── name: 5 │ │ │ ╰─── ref: 4 10 │ function test(uint x) public { │ ──┬─ ┬ - │ ╰────────── def: 6 + │ ╰────────── name: 6 │ │ - │ ╰── def: 7 + │ ╰── name: 7 │ 12 │ x.increment(); │ ┬ ────┬──── @@ -36,3 +36,33 @@ References and definitions: │ │ │ ╰────── unresolved ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ library Lib { + 2 │ │ function increment(uint x) public {} + │ │ ────────────────────┬─────┬────────────── + │ │ ╰────────────────────── definiens: 2 + │ │ │ + │ │ ╰──────────────── definiens: 3 + 3 │ ├─│ ▶ } + │ │ │ + │ ╰───────── definiens: 1 + 4 │ ╭─▶ + ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 4 + 8 │ ╭───────▶ + ┆ ┆ ┆ + 10 │ │ ╭─────▶ function test(uint x) public { + │ │ │ ───┬── + │ │ │ ╰──── definiens: 7 + ┆ ┆ ┆ + 13 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 6 + 14 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.4.11-failure.txt index ae1890fdba..1507807af8 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.4.11-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.6.0-failure.txt index f3f1f399ce..3e0c1906aa 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.6.0-failure.txt @@ -15,8 +15,19 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ ├─▶ } + │ │ + │ ╰─────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.7.1-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.7.1-failure.txt index 8d6d2aff39..f80af499d9 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.7.1-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.7.1-failure.txt @@ -15,16 +15,33 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.7.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.7.4-failure.txt index a4414df943..6bda655392 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.7.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.7.4-failure.txt @@ -15,16 +15,33 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.0-failure.txt index 447ed737f3..16b7ae22cc 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.0-failure.txt @@ -15,16 +15,33 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.13-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.13-success.txt index cec8162ea1..157df6029b 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.13-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.13-success.txt @@ -5,18 +5,18 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 │ 7 │ using {increment} for Counter; │ ────┬──── ───┬─── @@ -26,17 +26,47 @@ References and definitions: │ 9 │ contract Test { │ ──┬─ - │ ╰─── def: 5 + │ ╰─── name: 5 10 │ function test(Counter memory c) public { │ ──┬─ ───┬─── ┬ - │ ╰──────────────────── def: 6 + │ ╰──────────────────── name: 6 │ │ │ │ ╰────────────── ref: 1 │ │ - │ ╰── def: 7 + │ ╰── name: 7 11 │ c.increment(); │ ┬ ────┬──── │ ╰──────────── ref: 7 │ │ │ ╰────── ref: 3 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 + │ + 8 │ ╭───────▶ + ┆ ┆ ┆ + 10 │ │ ╭─────▶ function test(Counter memory c) public { + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 7 + ┆ ┆ ┆ + 12 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 6 + 13 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 5 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.4-failure.txt index 93c5946dce..6cb9a57fac 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.4-failure.txt @@ -15,16 +15,33 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.8-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.8-failure.txt index 8c897d071d..908483dfcd 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.8-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/top_level/generated/0.8.8-failure.txt @@ -15,16 +15,33 @@ References and definitions: │ 1 │ struct Counter { │ ───┬─── - │ ╰───── def: 1 + │ ╰───── name: 1 2 │ uint value; │ ──┬── - │ ╰──── def: 2 + │ ╰──── name: 2 │ 5 │ function increment(Counter memory _counter) public {} │ ────┬──── ───┬─── ────┬─── - │ ╰────────────────────────────── def: 3 + │ ╰────────────────────────────── name: 3 │ │ │ │ ╰───────────────────── ref: 1 │ │ - │ ╰───── def: 4 + │ ╰───── name: 4 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─▶ struct Counter { + 2 │ │ uint value; + │ │ ────────┬─────── + │ │ ╰───────── definiens: 2 + 3 │ │ ├─▶ } + │ │ │ + │ │ ╰─────── definiens: 1 + 4 │ ╭───▶ + 5 │ ├───▶ function increment(Counter memory _counter) public {} + │ │ ───────────┬─────────── + │ │ ╰───────────────────────── definiens: 4 + │ │ + │ ╰───────────────────────────────────────────────────────────── definiens: 3 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/uint_alias/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/uint_alias/generated/0.4.11-success.txt index d04e0ece4e..6e85585342 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/uint_alias/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/uint_alias/generated/0.4.11-success.txt @@ -5,16 +5,16 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ using Lib for uint256; │ ─┬─ │ ╰─── ref: 4 3 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 4 │ uint x; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 5 │ x.nop(); │ ┬ ─┬─ │ ╰────── ref: 3 @@ -23,10 +23,36 @@ References and definitions: │ 8 │ library Lib { │ ─┬─ - │ ╰─── def: 4 + │ ╰─── name: 4 9 │ function nop(uint256 x) external {} │ ─┬─ ┬ - │ ╰───────────── def: 5 + │ ╰───────────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────▶ contract Test { + ┆ ┆ ┆ + 3 │ │ ╭───▶ function test() public { + 4 │ │ │ uint x; + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 3 + ┆ ┆ ┆ + 6 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 7 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 1 + 8 │ ╭─▶ library Lib { + 9 │ │ function nop(uint256 x) external {} + │ │ ────────────────────┬┬────────────────── + │ │ ╰───────────────────── definiens: 5 + │ │ │ + │ │ ╰──────────────────── definiens: 6 + 10 │ ├─▶ } + │ │ + │ ╰─────── definiens: 4 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.4.11-failure.txt index 5b3351888a..4f63c29adb 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.4.11-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryK │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.6.0-failure.txt index 59217924c2..33addb11ce 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.6.0-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or EnumKeyword or ImportKeyword or InterfaceKeyw │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.7.1-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.7.1-failure.txt index d19bf6dfe0..cf05881e73 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.7.1-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.7.1-failure.txt @@ -11,3 +11,4 @@ Error: Expected ContractKeyword or EnumKeyword or FunctionKeyword or ImportKeywo │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.7.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.7.4-failure.txt index 50dc41f2ab..23b6bafb51 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.7.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.7.4-failure.txt @@ -11,3 +11,4 @@ Error: Expected AddressKeyword or BoolKeyword or ByteKeyword or BytesKeyword or │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.0-failure.txt index 205226995e..748b6bbe4f 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.0-failure.txt @@ -11,3 +11,4 @@ Error: Expected AddressKeyword or BoolKeyword or BytesKeyword or ContractKeyword │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.4-failure.txt index c709a0526b..6102e951d6 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.4-failure.txt @@ -11,3 +11,4 @@ Error: Expected AddressKeyword or BoolKeyword or BytesKeyword or ContractKeyword │ ╰─────── Error occurred here. ────╯ References and definitions: +Definiens: diff --git a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.8-success.txt b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.8-success.txt index 2ec0bb8683..e884db070b 100644 --- a/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.8-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/using/user_types/generated/0.8.8-success.txt @@ -5,11 +5,11 @@ References and definitions: │ 1 │ type ShortString is bytes32; │ ─────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 │ 3 │ contract Test { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 4 │ using Lib for ShortString; │ ─┬─ ─────┬───── │ ╰─────────────────── ref: 6 @@ -21,14 +21,14 @@ References and definitions: │ 7 │ function test(bytes32 data) public { │ ──┬─ ──┬─ - │ ╰──────────────── def: 3 + │ ╰──────────────── name: 3 │ │ - │ ╰─── def: 4 + │ ╰─── name: 4 8 │ ShortString s; │ ─────┬───── ┬ │ ╰───────── ref: 1 │ │ - │ ╰── def: 5 + │ ╰── name: 5 │ 10 │ ShortString.wrap(data).nop(); │ ─────┬───── ──┬─ ──┬─ ─┬─ @@ -51,17 +51,55 @@ References and definitions: │ 15 │ library Lib { │ ─┬─ - │ ╰─── def: 6 + │ ╰─── name: 6 16 │ function nop(ShortString x) internal {} │ ─┬─ ─────┬───── ┬ - │ ╰───────────────── def: 7 + │ ╰───────────────── name: 7 │ │ │ │ ╰───────── ref: 1 │ │ - │ ╰── def: 8 + │ ╰── name: 8 17 │ function pon(bytes32 x) internal {} │ ─┬─ ┬ - │ ╰───────────── def: 9 + │ ╰───────────── name: 9 │ │ - │ ╰── def: 10 + │ ╰── name: 10 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ │ type ShortString is bytes32; + │ │ ──────────────┬────────────── + │ │ ╰──────────────── definiens: 1 + 2 │ ╭─────▶ + ┆ ┆ + 6 │ │ ╭───▶ + 7 │ │ │ function test(bytes32 data) public { + │ │ │ ──────┬───── + │ │ │ ╰─────── definiens: 4 + 8 │ │ │ ShortString s; + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────── definiens: 5 + ┆ ┆ ┆ + 12 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 3 + 13 │ ├───│ ▶ } + │ │ │ + │ ╰─────────── definiens: 2 + 14 │ ╭─▶ + ┆ ┆ + 16 │ │ function nop(ShortString x) internal {} + │ │ ──────────────────────┬┬──────────────────── + │ │ ╰─────────────────────── definiens: 7 + │ │ │ + │ │ ╰────────────────────── definiens: 8 + 17 │ │ function pon(bytes32 x) internal {} + │ │ ────────────────────┬┬────────────────── + │ │ ╰───────────────────── definiens: 9 + │ │ │ + │ │ ╰──────────────────── definiens: 10 + 18 │ ├─▶ } + │ │ + │ ╰─────── definiens: 6 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/variables/local_vars/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/variables/local_vars/generated/0.4.11-success.txt index f5fae7b1fd..725d304a04 100644 --- a/crates/solidity/testing/snapshots/bindings_output/variables/local_vars/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/variables/local_vars/generated/0.4.11-success.txt @@ -5,19 +5,38 @@ References and definitions: │ 1 │ contract Foo { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function bar() returns (uint) { │ ─┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ uint x = 10; │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 4 │ uint w = 2; │ ┬ - │ ╰── def: 4 + │ ╰── name: 4 5 │ return x + w; │ ┬ ┬ │ ╰────── ref: 3 │ │ │ ╰── ref: 4 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Foo { + 2 │ │ ╭─▶ function bar() returns (uint) { + 3 │ │ │ uint x = 10; + │ │ │ ──────────┬────────── + │ │ │ ╰──────────── definiens: 3 + 4 │ │ │ uint w = 2; + │ │ │ ──────────┬───────── + │ │ │ ╰─────────── definiens: 4 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/variables/params/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/variables/params/generated/0.4.11-success.txt index c1f0fd2567..37726b5b9e 100644 --- a/crates/solidity/testing/snapshots/bindings_output/variables/params/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/variables/params/generated/0.4.11-success.txt @@ -5,23 +5,23 @@ References and definitions: │ 1 │ contract Foo { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function bar(uint z) returns (uint) { │ ─┬─ ┬ - │ ╰────────── def: 2 + │ ╰────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 3 │ return z + 1; │ ┬ │ ╰── ref: 3 │ 6 │ function baz(int x, int y) returns (int) { │ ─┬─ ┬ ┬ - │ ╰──────────────── def: 4 + │ ╰──────────────── name: 4 │ │ │ - │ ╰───────── def: 5 + │ ╰───────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 7 │ return x + y; │ ┬ ┬ │ ╰────── ref: 5 @@ -30,13 +30,13 @@ References and definitions: │ 10 │ function quux(int x, int y) returns (int z) { │ ──┬─ ┬ ┬ ┬ - │ ╰──────────────────────────────── def: 7 + │ ╰──────────────────────────────── name: 7 │ │ │ │ - │ ╰───────────────────────── def: 8 + │ ╰───────────────────────── name: 8 │ │ │ - │ ╰────────────────── def: 9 + │ ╰────────────────── name: 9 │ │ - │ ╰── def: 10 + │ ╰── name: 10 11 │ z = x + y; │ ┬ ┬ ┬ │ ╰────────── ref: 10 @@ -45,3 +45,40 @@ References and definitions: │ │ │ ╰── ref: 9 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────│ ▶ contract Foo { + 2 │ │ ╭─▶ function bar(uint z) returns (uint) { + │ │ │ ───┬── + │ │ │ ╰──── definiens: 3 + ┆ ┆ ┆ + 4 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 5 │ │ ╭─────▶ + 6 │ │ │ function baz(int x, int y) returns (int) { + │ │ │ ──┬── ───┬── + │ │ │ ╰─────────── definiens: 5 + │ │ │ │ + │ │ │ ╰──── definiens: 6 + ┆ ┆ ┆ + 8 │ │ ├─│ ──▶ } + │ │ │ │ + │ │ ╰─────────────── definiens: 4 + 9 │ │ ╭───▶ + 10 │ │ │ function quux(int x, int y) returns (int z) { + │ │ │ ──┬── ───┬── ──┬── + │ │ │ ╰─────────────────────────── definiens: 8 + │ │ │ │ │ + │ │ │ ╰──────────────────── definiens: 9 + │ │ │ │ + │ │ │ ╰──── definiens: 10 + ┆ ┆ ┆ + 12 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 7 + 13 │ ├───────▶ } + │ │ + │ ╰───────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/variables/state_vars/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/variables/state_vars/generated/0.4.11-success.txt index ffb15b133c..0e8ece7f43 100644 --- a/crates/solidity/testing/snapshots/bindings_output/variables/state_vars/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/variables/state_vars/generated/0.4.11-success.txt @@ -5,15 +5,31 @@ References and definitions: │ 1 │ contract Foo { │ ─┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ uint x; │ ┬ - │ ╰── def: 2 + │ ╰── name: 2 │ 4 │ function bar() returns (uint) { │ ─┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 5 │ return x; │ ┬ │ ╰── ref: 2 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Foo { + 2 │ │ │ uint x; + │ │ │ ──────┬───── + │ │ │ ╰─────── definiens: 2 + 3 │ │ ╭─▶ + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.4.11-success.txt index 49bae9ee2c..77e41a4c7b 100644 --- a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.4.11-success.txt @@ -5,22 +5,22 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Value { int x; } │ ──┬── ┬ - │ ╰──────────── def: 2 + │ ╰──────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 3 │ function test(Value memory value) public { │ ──┬─ ──┬── ──┬── - │ ╰────────────────────── def: 4 + │ ╰────────────────────── name: 4 │ │ │ │ ╰───────────────── ref: 2 │ │ - │ ╰──── def: 5 + │ ╰──── name: 5 4 │ var v = value; │ ┬ ──┬── - │ ╰────────── def: 6 + │ ╰────────── name: 6 │ │ │ ╰──── ref: 5 5 │ v.x; @@ -29,3 +29,26 @@ References and definitions: │ │ │ ╰── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ struct Value { int x; } + │ │ │ ──────────────┬──────┬────── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ + │ │ │ ╰──────── definiens: 3 + 3 │ │ ╭─▶ function test(Value memory value) public { + │ │ │ ─────────┬──────── + │ │ │ ╰────────── definiens: 5 + 4 │ │ │ var v = value; + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────── definiens: 6 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 4 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.5.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.5.0-failure.txt index b1aab5f30b..1c7494a1af 100644 --- a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.5.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.5.0-failure.txt @@ -15,17 +15,37 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Value { int x; } │ ──┬── ┬ - │ ╰──────────── def: 2 + │ ╰──────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 3 │ function test(Value memory value) public { │ ──┬─ ──┬── ──┬── - │ ╰────────────────────── def: 4 + │ ╰────────────────────── name: 4 │ │ │ │ ╰───────────────── ref: 2 │ │ - │ ╰──── def: 5 + │ ╰──── name: 5 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ struct Value { int x; } + │ │ │ ──────────────┬──────┬────── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ + │ │ │ ╰──────── definiens: 3 + 3 │ │ ╭─▶ function test(Value memory value) public { + │ │ │ ─────────┬──────── + │ │ │ ╰────────── definiens: 5 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 4 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.5.3-failure.txt b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.5.3-failure.txt index 916fc51d48..a7da58254d 100644 --- a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.5.3-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.5.3-failure.txt @@ -15,17 +15,37 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Value { int x; } │ ──┬── ┬ - │ ╰──────────── def: 2 + │ ╰──────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 3 │ function test(Value memory value) public { │ ──┬─ ──┬── ──┬── - │ ╰────────────────────── def: 4 + │ ╰────────────────────── name: 4 │ │ │ │ ╰───────────────── ref: 2 │ │ - │ ╰──── def: 5 + │ ╰──── name: 5 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ struct Value { int x; } + │ │ │ ──────────────┬──────┬────── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ + │ │ │ ╰──────── definiens: 3 + 3 │ │ ╭─▶ function test(Value memory value) public { + │ │ │ ─────────┬──────── + │ │ │ ╰────────── definiens: 5 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 4 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.6.0-failure.txt index baeb9846cc..81cda13951 100644 --- a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.6.0-failure.txt @@ -15,17 +15,37 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Value { int x; } │ ──┬── ┬ - │ ╰──────────── def: 2 + │ ╰──────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 3 │ function test(Value memory value) public { │ ──┬─ ──┬── ──┬── - │ ╰────────────────────── def: 4 + │ ╰────────────────────── name: 4 │ │ │ │ ╰───────────────── ref: 2 │ │ - │ ╰──── def: 5 + │ ╰──── name: 5 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ struct Value { int x; } + │ │ │ ──────────────┬──────┬────── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ + │ │ │ ╰──────── definiens: 3 + 3 │ │ ╭─▶ function test(Value memory value) public { + │ │ │ ─────────┬──────── + │ │ │ ╰────────── definiens: 5 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 4 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.7.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.7.0-failure.txt index d9a26d93af..460ed26bb6 100644 --- a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.7.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.7.0-failure.txt @@ -15,17 +15,37 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Value { int x; } │ ──┬── ┬ - │ ╰──────────── def: 2 + │ ╰──────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 3 │ function test(Value memory value) public { │ ──┬─ ──┬── ──┬── - │ ╰────────────────────── def: 4 + │ ╰────────────────────── name: 4 │ │ │ │ ╰───────────────── ref: 2 │ │ - │ ╰──── def: 5 + │ ╰──── name: 5 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ struct Value { int x; } + │ │ │ ──────────────┬──────┬────── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ + │ │ │ ╰──────── definiens: 3 + 3 │ │ ╭─▶ function test(Value memory value) public { + │ │ │ ─────────┬──────── + │ │ │ ╰────────── definiens: 5 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 4 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.8.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.8.0-failure.txt index 4ab42efd3b..5d3b483a7e 100644 --- a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.8.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.8.0-failure.txt @@ -15,17 +15,37 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Value { int x; } │ ──┬── ┬ - │ ╰──────────── def: 2 + │ ╰──────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 3 │ function test(Value memory value) public { │ ──┬─ ──┬── ──┬── - │ ╰────────────────────── def: 4 + │ ╰────────────────────── name: 4 │ │ │ │ ╰───────────────── ref: 2 │ │ - │ ╰──── def: 5 + │ ╰──── name: 5 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ struct Value { int x; } + │ │ │ ──────────────┬──────┬────── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ + │ │ │ ╰──────── definiens: 3 + 3 │ │ ╭─▶ function test(Value memory value) public { + │ │ │ ─────────┬──────── + │ │ │ ╰────────── definiens: 5 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 4 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.8.4-failure.txt b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.8.4-failure.txt index bef3f48735..62ea45f3cb 100644 --- a/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.8.4-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/variables/var_declaration/generated/0.8.4-failure.txt @@ -15,17 +15,37 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ struct Value { int x; } │ ──┬── ┬ - │ ╰──────────── def: 2 + │ ╰──────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 3 │ function test(Value memory value) public { │ ──┬─ ──┬── ──┬── - │ ╰────────────────────── def: 4 + │ ╰────────────────────── name: 4 │ │ │ │ ╰───────────────── ref: 2 │ │ - │ ╰──── def: 5 + │ ╰──── name: 5 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ struct Value { int x; } + │ │ │ ──────────────┬──────┬────── + │ │ │ ╰─────────────── definiens: 2 + │ │ │ │ + │ │ │ ╰──────── definiens: 3 + 3 │ │ ╭─▶ function test(Value memory value) public { + │ │ │ ─────────┬──────── + │ │ │ ╰────────── definiens: 5 + ┆ ┆ ┆ + 6 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 4 + 7 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/conditionals/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/yul/conditionals/generated/0.4.11-success.txt index 366fb10897..a36383e941 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/conditionals/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/conditionals/generated/0.4.11-success.txt @@ -5,14 +5,14 @@ References and definitions: │ 1 │ contract AssemblyConditionals { │ ──────────┬───────── - │ ╰─────────── def: 1 + │ ╰─────────── name: 1 2 │ function yul_if(uint256 x) public returns (uint256 z) { │ ───┬── ┬ ┬ - │ ╰───────────────────────────────────────── def: 2 + │ ╰───────────────────────────────────────── name: 2 │ │ │ - │ ╰───────────────────────────── def: 3 + │ ╰───────────────────────────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 │ 4 │ if lt(x, 10) { z := 99 } │ ┬ ┬ @@ -22,11 +22,11 @@ References and definitions: │ 8 │ function yul_switch(uint256 x) public returns (uint256 z) { │ ─────┬──── ┬ ┬ - │ ╰─────────────────────────────────────────── def: 5 + │ ╰─────────────────────────────────────────── name: 5 │ │ │ - │ ╰───────────────────────────── def: 6 + │ ╰───────────────────────────── name: 6 │ │ - │ ╰── def: 7 + │ ╰── name: 7 │ 10 │ switch x │ ┬ @@ -41,3 +41,30 @@ References and definitions: │ ┬ │ ╰── ref: 7 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract AssemblyConditionals { + 2 │ │ ╭─▶ function yul_if(uint256 x) public returns (uint256 z) { + │ │ │ ────┬──── ────┬──── + │ │ │ ╰───────────────────────────────── definiens: 3 + │ │ │ │ + │ │ │ ╰────── definiens: 4 + ┆ ┆ ┆ + 6 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 7 │ │ ╭───▶ + 8 │ │ │ function yul_switch(uint256 x) public returns (uint256 z) { + │ │ │ ────┬──── ────┬──── + │ │ │ ╰───────────────────────────────── definiens: 6 + │ │ │ │ + │ │ │ ╰────── definiens: 7 + ┆ ┆ ┆ + 15 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 16 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.4.11-failure.txt index 568d7b9b08..ff0f2f57ab 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.4.11-failure.txt @@ -13,20 +13,20 @@ References and definitions: │ 1 │ contract InContracts { │ ─────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ uint256 private constant CONTRACT_CONST = 1; │ ───────┬────── - │ ╰──────── def: 2 + │ ╰──────── name: 2 │ 4 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 │ 6 │ function swap(emptyPtr) { │ ──┬─ ────┬─── - │ ╰──────────── def: 4 + │ ╰──────────── name: 4 │ │ - │ ╰───── def: 5 + │ ╰───── name: 5 7 │ mstore(emptyPtr, CONTRACT_CONST) │ ────┬─── ───────┬────── │ ╰───────────────────── ref: 5 @@ -40,20 +40,20 @@ References and definitions: │ 14 │ library InLibraries { │ ─────┬───── - │ ╰─────── def: 6 + │ ╰─────── name: 6 15 │ uint256 private constant LIB_CONST = 2; │ ────┬──── - │ ╰────── def: 7 + │ ╰────── name: 7 │ 17 │ function test() public { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 │ 19 │ function swap(emptyPtr) { │ ──┬─ ────┬─── - │ ╰──────────── def: 9 + │ ╰──────────── name: 9 │ │ - │ ╰───── def: 10 + │ ╰───── name: 10 20 │ mstore(emptyPtr, LIB_CONST) │ ────┬─── ────┬──── │ ╰──────────────── ref: 10 @@ -65,3 +65,48 @@ References and definitions: │ │ │ ╰───────── unresolved ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───────────▶ contract InContracts { + 2 │ │ │ uint256 private constant CONTRACT_CONST = 1; + │ │ │ ────────────────────────┬──────────────────────── + │ │ │ ╰────────────────────────── definiens: 2 + 3 │ │ ╭───────▶ + ┆ ┆ ┆ + 6 │ │ │ ╭───▶ function swap(emptyPtr) { + │ │ │ │ ────┬─── + │ │ │ │ ╰───── definiens: 5 + ┆ ┆ ┆ ┆ + 9 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────────────── definiens: 4 + ┆ ┆ ┆ + 11 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────────── definiens: 3 + 12 │ ├─│ ────────▶ } + │ │ │ + │ ╰───────────────── definiens: 1 + 13 │ ╭─────────▶ + ┆ ┆ + 15 │ │ │ uint256 private constant LIB_CONST = 2; + │ │ │ ──────────────────────┬───────────────────── + │ │ │ ╰─────────────────────── definiens: 7 + 16 │ │ ╭─────▶ + ┆ ┆ ┆ + 19 │ │ │ ╭─▶ function swap(emptyPtr) { + │ │ │ │ ────┬─── + │ │ │ │ ╰───── definiens: 10 + ┆ ┆ ┆ ┆ + 22 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────────────── definiens: 9 + ┆ ┆ ┆ + 24 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 8 + 25 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 6 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.6.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.6.0-failure.txt index 19b7c69fae..f9adb05cca 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.6.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.6.0-failure.txt @@ -13,20 +13,20 @@ References and definitions: │ 1 │ contract InContracts { │ ─────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ uint256 private constant CONTRACT_CONST = 1; │ ───────┬────── - │ ╰──────── def: 2 + │ ╰──────── name: 2 │ 4 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 │ 6 │ function swap(emptyPtr) { │ ──┬─ ────┬─── - │ ╰──────────── def: 4 + │ ╰──────────── name: 4 │ │ - │ ╰───── def: 5 + │ ╰───── name: 5 7 │ mstore(emptyPtr, CONTRACT_CONST) │ ────┬─── ───────┬────── │ ╰───────────────────── ref: 5 @@ -40,20 +40,20 @@ References and definitions: │ 14 │ library InLibraries { │ ─────┬───── - │ ╰─────── def: 6 + │ ╰─────── name: 6 15 │ uint256 private constant LIB_CONST = 2; │ ────┬──── - │ ╰────── def: 7 + │ ╰────── name: 7 │ 17 │ function test() public { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 │ 19 │ function swap(emptyPtr) { │ ──┬─ ────┬─── - │ ╰──────────── def: 9 + │ ╰──────────── name: 9 │ │ - │ ╰───── def: 10 + │ ╰───── name: 10 20 │ mstore(emptyPtr, LIB_CONST) │ ────┬─── ────┬──── │ ╰──────────────── ref: 10 @@ -65,3 +65,48 @@ References and definitions: │ │ │ ╰───────── unresolved ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───────────▶ contract InContracts { + 2 │ │ │ uint256 private constant CONTRACT_CONST = 1; + │ │ │ ────────────────────────┬──────────────────────── + │ │ │ ╰────────────────────────── definiens: 2 + 3 │ │ ╭───────▶ + ┆ ┆ ┆ + 6 │ │ │ ╭───▶ function swap(emptyPtr) { + │ │ │ │ ────┬─── + │ │ │ │ ╰───── definiens: 5 + ┆ ┆ ┆ ┆ + 9 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────────────── definiens: 4 + ┆ ┆ ┆ + 11 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────────── definiens: 3 + 12 │ ├─│ ────────▶ } + │ │ │ + │ ╰───────────────── definiens: 1 + 13 │ ╭─────────▶ + ┆ ┆ + 15 │ │ │ uint256 private constant LIB_CONST = 2; + │ │ │ ──────────────────────┬───────────────────── + │ │ │ ╰─────────────────────── definiens: 7 + 16 │ │ ╭─────▶ + ┆ ┆ ┆ + 19 │ │ │ ╭─▶ function swap(emptyPtr) { + │ │ │ │ ────┬─── + │ │ │ │ ╰───── definiens: 10 + ┆ ┆ ┆ ┆ + 22 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────────────── definiens: 9 + ┆ ┆ ┆ + 24 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 8 + 25 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 6 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.7.1-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.7.1-failure.txt index 19d15d5248..eed96beb6f 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.7.1-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.7.1-failure.txt @@ -13,20 +13,20 @@ References and definitions: │ 1 │ contract InContracts { │ ─────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ uint256 private constant CONTRACT_CONST = 1; │ ───────┬────── - │ ╰──────── def: 2 + │ ╰──────── name: 2 │ 4 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 │ 6 │ function swap(emptyPtr) { │ ──┬─ ────┬─── - │ ╰──────────── def: 4 + │ ╰──────────── name: 4 │ │ - │ ╰───── def: 5 + │ ╰───── name: 5 7 │ mstore(emptyPtr, CONTRACT_CONST) │ ────┬─── ───────┬────── │ ╰───────────────────── ref: 5 @@ -40,20 +40,20 @@ References and definitions: │ 14 │ library InLibraries { │ ─────┬───── - │ ╰─────── def: 6 + │ ╰─────── name: 6 15 │ uint256 private constant LIB_CONST = 2; │ ────┬──── - │ ╰────── def: 7 + │ ╰────── name: 7 │ 17 │ function test() public { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 │ 19 │ function swap(emptyPtr) { │ ──┬─ ────┬─── - │ ╰──────────── def: 9 + │ ╰──────────── name: 9 │ │ - │ ╰───── def: 10 + │ ╰───── name: 10 20 │ mstore(emptyPtr, LIB_CONST) │ ────┬─── ────┬──── │ ╰──────────────── ref: 10 @@ -65,3 +65,48 @@ References and definitions: │ │ │ ╰───────── unresolved ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───────────▶ contract InContracts { + 2 │ │ │ uint256 private constant CONTRACT_CONST = 1; + │ │ │ ────────────────────────┬──────────────────────── + │ │ │ ╰────────────────────────── definiens: 2 + 3 │ │ ╭───────▶ + ┆ ┆ ┆ + 6 │ │ │ ╭───▶ function swap(emptyPtr) { + │ │ │ │ ────┬─── + │ │ │ │ ╰───── definiens: 5 + ┆ ┆ ┆ ┆ + 9 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────────────── definiens: 4 + ┆ ┆ ┆ + 11 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────────── definiens: 3 + 12 │ ├─│ ────────▶ } + │ │ │ + │ ╰───────────────── definiens: 1 + 13 │ ╭─────────▶ + ┆ ┆ + 15 │ │ │ uint256 private constant LIB_CONST = 2; + │ │ │ ──────────────────────┬───────────────────── + │ │ │ ╰─────────────────────── definiens: 7 + 16 │ │ ╭─────▶ + ┆ ┆ ┆ + 19 │ │ │ ╭─▶ function swap(emptyPtr) { + │ │ │ │ ────┬─── + │ │ │ │ ╰───── definiens: 10 + ┆ ┆ ┆ ┆ + 22 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────────────── definiens: 9 + ┆ ┆ ┆ + 24 │ │ ├─────▶ } + │ │ │ + │ │ ╰─────────────── definiens: 8 + 25 │ ├─────────▶ } + │ │ + │ ╰─────────────── definiens: 6 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.7.4-success.txt b/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.7.4-success.txt index 38815261bc..98c1dba045 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.7.4-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/constant_access_from_functions/generated/0.7.4-success.txt @@ -5,20 +5,20 @@ References and definitions: │ 1 │ contract InContracts { │ ─────┬───── - │ ╰─────── def: 1 + │ ╰─────── name: 1 2 │ uint256 private constant CONTRACT_CONST = 1; │ ───────┬────── - │ ╰──────── def: 2 + │ ╰──────── name: 2 │ 4 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 │ 6 │ function swap(emptyPtr) { │ ──┬─ ────┬─── - │ ╰──────────── def: 4 + │ ╰──────────── name: 4 │ │ - │ ╰───── def: 5 + │ ╰───── name: 5 7 │ mstore(emptyPtr, CONTRACT_CONST) │ ────┬─── ───────┬────── │ ╰───────────────────── ref: 5 @@ -32,20 +32,20 @@ References and definitions: │ 14 │ library InLibraries { │ ─────┬───── - │ ╰─────── def: 6 + │ ╰─────── name: 6 15 │ uint256 private constant LIB_CONST = 2; │ ────┬──── - │ ╰────── def: 7 + │ ╰────── name: 7 │ 17 │ function test() public { │ ──┬─ - │ ╰─── def: 8 + │ ╰─── name: 8 │ 19 │ function swap(emptyPtr) { │ ──┬─ ────┬─── - │ ╰──────────── def: 9 + │ ╰──────────── name: 9 │ │ - │ ╰───── def: 10 + │ ╰───── name: 10 20 │ mstore(emptyPtr, LIB_CONST) │ ────┬─── ────┬──── │ ╰──────────────── ref: 10 @@ -59,5 +59,54 @@ References and definitions: │ 27 │ uint256 constant TOP_LEVEL_CONST = 0; │ ───────┬─────── - │ ╰───────── def: 11 + │ ╰───────── name: 11 +────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─────────────▶ contract InContracts { + 2 │ │ │ uint256 private constant CONTRACT_CONST = 1; + │ │ │ ────────────────────────┬──────────────────────── + │ │ │ ╰────────────────────────── definiens: 2 + 3 │ │ ╭─────────▶ + ┆ ┆ ┆ + 6 │ │ │ ╭─────▶ function swap(emptyPtr) { + │ │ │ │ ────┬─── + │ │ │ │ ╰───── definiens: 5 + ┆ ┆ ┆ ┆ + 9 │ │ │ ├─────▶ } + │ │ │ │ + │ │ │ ╰─────────────────────── definiens: 4 + ┆ ┆ ┆ + 11 │ │ ├─────────▶ } + │ │ │ + │ │ ╰─────────────────── definiens: 3 + 12 │ ├─│ ──────────▶ } + │ │ │ + │ ╰─────────────────── definiens: 1 + 13 │ ╭───────────▶ + ┆ ┆ + 15 │ │ │ uint256 private constant LIB_CONST = 2; + │ │ │ ──────────────────────┬───────────────────── + │ │ │ ╰─────────────────────── definiens: 7 + 16 │ │ ╭───────▶ + ┆ ┆ ┆ + 19 │ │ │ ╭───▶ function swap(emptyPtr) { + │ │ │ │ ────┬─── + │ │ │ │ ╰───── definiens: 10 + ┆ ┆ ┆ ┆ + 22 │ │ │ ├───▶ } + │ │ │ │ + │ │ │ ╰───────────────────── definiens: 9 + ┆ ┆ ┆ + 24 │ │ ├───────▶ } + │ │ │ + │ │ ╰───────────────── definiens: 8 + 25 │ ├─────────│ ▶ } + │ │ │ + │ ╰───────────────── definiens: 6 + 26 │ ╭─▶ + 27 │ ├─▶ uint256 constant TOP_LEVEL_CONST = 0; + │ │ + │ ╰─────────────────────────────────────────── definiens: 11 ────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/functions/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/yul/functions/generated/0.4.11-success.txt index 4d553b0505..683bf1f819 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/functions/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/functions/generated/0.4.11-success.txt @@ -5,18 +5,18 @@ References and definitions: │ 1 │ contract AssemblyFunctions { │ ────────┬──────── - │ ╰────────── def: 1 + │ ╰────────── name: 1 2 │ function test(uint256 x) public returns (uint256 r) { │ ──┬─ ┬ ┬ - │ ╰──────────────────────────────────────── def: 2 + │ ╰──────────────────────────────────────── name: 2 │ │ │ - │ ╰───────────────────────────── def: 3 + │ ╰───────────────────────────── name: 3 │ │ - │ ╰── def: 4 + │ ╰── name: 4 │ 4 │ let y := add(x, 5) │ ┬ ┬ - │ ╰─────────── def: 5 + │ ╰─────────── name: 5 │ │ │ ╰── ref: 3 5 │ x, y := swap(x, y) @@ -40,15 +40,15 @@ References and definitions: │ 8 │ function swap(a, b) -> c, d { │ ──┬─ ┬ ┬ ┬ ┬ - │ ╰───────────────── def: 6 + │ ╰───────────────── name: 6 │ │ │ │ │ - │ ╰────────────── def: 7 + │ ╰────────────── name: 7 │ │ │ │ - │ ╰─────────── def: 8 + │ ╰─────────── name: 8 │ │ │ - │ ╰───── def: 9 + │ ╰───── name: 9 │ │ - │ ╰── def: 10 + │ ╰── name: 10 9 │ c := b │ ┬ ┬ │ ╰─────── ref: 9 @@ -60,3 +60,39 @@ References and definitions: │ │ │ ╰── ref: 7 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ──▶ contract AssemblyFunctions { + 2 │ │ ╭───▶ function test(uint256 x) public returns (uint256 r) { + │ │ │ ────┬──── ────┬──── + │ │ │ ╰───────────────────────────────── definiens: 3 + │ │ │ │ + │ │ │ ╰────── definiens: 4 + ┆ ┆ ┆ + 4 │ │ │ let y := add(x, 5) + │ │ │ ───────────────┬─────────────── + │ │ │ ╰───────────────── definiens: 5 + ┆ ┆ ┆ + 7 │ │ │ ╭─▶ + 8 │ │ │ │ function swap(a, b) -> c, d { + │ │ │ │ ┬ ┬ ┬ ┬ + │ │ │ │ ╰────────────── definiens: 7 + │ │ │ │ │ │ │ + │ │ │ │ ╰─────────── definiens: 8 + │ │ │ │ │ │ + │ │ │ │ ╰───── definiens: 9 + │ │ │ │ │ + │ │ │ │ ╰── definiens: 10 + ┆ ┆ ┆ ┆ + 11 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────────────── definiens: 6 + ┆ ┆ ┆ + 13 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 2 + 14 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.4.11-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.4.11-failure.txt index d14a31e3bf..2e4fff3fb3 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.4.11-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.4.11-failure.txt @@ -15,12 +15,29 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ let x.y.z := 0 │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 4 │ │ │ let x.y.z := 0 + │ │ │ ────────┬──────── + │ │ │ ╰────────── definiens: 3 + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.4.12-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.4.12-failure.txt index d64f0a606b..4383436ef7 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.4.12-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.4.12-failure.txt @@ -15,12 +15,29 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ let x.y.z := 0 │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 4 │ │ │ let x.y.z := 0 + │ │ │ ────────┬──────── + │ │ │ ╰────────── definiens: 3 + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.5.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.5.0-failure.txt index a85be30fd2..ca13d08298 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.5.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.5.0-failure.txt @@ -15,12 +15,29 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ let x.y.z := 0 │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 4 │ │ │ let x.y.z := 0 + │ │ │ ────────┬──────── + │ │ │ ╰────────── definiens: 3 + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.5.8-success.txt b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.5.8-success.txt index a50ffd562b..d9e9ddfa68 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.5.8-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.5.8-success.txt @@ -5,17 +5,37 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ let x.y.z := 0 │ ──┬── - │ ╰──── def: 3 + │ ╰──── name: 3 5 │ let r := add(x.y.z, 20) │ ┬ ──┬── - │ ╰─────────────── def: 4 + │ ╰─────────────── name: 4 │ │ │ ╰──── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 4 │ │ │ let x.y.z := 0 + │ │ │ ─────────────┬───────────── + │ │ │ ╰─────────────── definiens: 3 + 5 │ │ │ let r := add(x.y.z, 20) + │ │ │ ──────────────────┬───────────────── + │ │ │ ╰─────────────────── definiens: 4 + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.7.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.7.0-failure.txt index 13ec567204..21e9b53b90 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.7.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.7.0-failure.txt @@ -15,12 +15,29 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ let x.y.z := 0 │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 4 │ │ │ let x.y.z := 0 + │ │ │ ────────┬──────── + │ │ │ ╰────────── definiens: 3 + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.18-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.18-failure.txt index ba89cdf44b..4006b143d6 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.18-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.18-failure.txt @@ -15,12 +15,29 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ let x.y.z := 0 │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 4 │ │ │ let x.y.z := 0 + │ │ │ ────────┬──────── + │ │ │ ╰────────── definiens: 3 + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.24-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.24-failure.txt index 1a4a9715b3..d17f46e413 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.24-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.24-failure.txt @@ -15,12 +15,29 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ let x.y.z := 0 │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 4 │ │ │ let x.y.z := 0 + │ │ │ ────────┬──────── + │ │ │ ╰────────── definiens: 3 + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.7-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.7-failure.txt index 7572b37c42..e0e8254876 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.7-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/identifiers_with_dots/generated/0.8.7-failure.txt @@ -15,12 +15,29 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ function test() public { │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 │ 4 │ let x.y.z := 0 │ ┬ - │ ╰── def: 3 + │ ╰── name: 3 +───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract Test { + 2 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 4 │ │ │ let x.y.z := 0 + │ │ │ ────────┬──────── + │ │ │ ╰────────── definiens: 3 + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 ───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/loops/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/yul/loops/generated/0.4.11-success.txt index 49a2c21d23..2f1f16c290 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/loops/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/loops/generated/0.4.11-success.txt @@ -5,16 +5,16 @@ References and definitions: │ 1 │ contract AssemblyLoops { │ ──────┬────── - │ ╰──────── def: 1 + │ ╰──────── name: 1 2 │ function yul_for_loop() public returns (uint256 z) { │ ──────┬───── ┬ - │ ╰─────────────────────────────────── def: 2 + │ ╰─────────────────────────────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ for { let i := 0 } lt(i, 10) { i := add(i, 1) } { z := add(z, 1) } │ ┬ ┬ ┬ ┬ ┬ ┬ - │ ╰─────────────────────────────────────────────────── def: 4 + │ ╰─────────────────────────────────────────────────── name: 4 │ │ │ │ │ │ │ ╰─────────────────────────────────────── ref: 4 │ │ │ │ │ @@ -28,13 +28,13 @@ References and definitions: │ 8 │ function yul_while_loop() public returns (uint256 z) { │ ───────┬────── ┬ - │ ╰──────────────────────────────────── def: 5 + │ ╰──────────────────────────────────── name: 5 │ │ - │ ╰── def: 6 + │ ╰── name: 6 │ 10 │ let i := 0 │ ┬ - │ ╰── def: 7 + │ ╰── name: 7 11 │ for {} lt(i, 5) {} { │ ┬ │ ╰── ref: 7 @@ -49,3 +49,34 @@ References and definitions: │ │ │ ╰── ref: 6 ────╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───│ ▶ contract AssemblyLoops { + 2 │ │ ╭─▶ function yul_for_loop() public returns (uint256 z) { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 3 + ┆ ┆ ┆ + 4 │ │ │ for { let i := 0 } lt(i, 10) { i := add(i, 1) } { z := add(z, 1) } + │ │ │ ─────┬───── + │ │ │ ╰─────── definiens: 4 + ┆ ┆ ┆ + 6 │ │ │ ├─▶ } + │ │ │ │ + │ │ │ ╰─────────── definiens: 2 + 7 │ │ ╭───▶ + 8 │ │ │ function yul_while_loop() public returns (uint256 z) { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 6 + ┆ ┆ ┆ + 10 │ │ │ let i := 0 + │ │ │ ───────────┬─────────── + │ │ │ ╰───────────── definiens: 7 + ┆ ┆ ┆ + 16 │ │ ├───▶ } + │ │ │ + │ │ ╰───────────── definiens: 5 + 17 │ ├─────▶ } + │ │ + │ ╰─────────── definiens: 1 +────╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.4.11-success.txt index 6e244c0dcf..f923df2dc1 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.4.11-success.txt @@ -5,26 +5,49 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ bytes data; │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 │ 5 │ let s := sload(data.slot) │ ┬ ──┬─ ──┬─ - │ ╰───────────────────── def: 4 + │ ╰───────────────────── name: 4 │ │ │ │ ╰──────── ref: 2 │ │ │ ╰─── ref: built-in 6 │ let o := sload(data.offset) │ ┬ ──┬─ ───┬── - │ ╰─────────────────────── def: 5 + │ ╰─────────────────────── name: 5 │ │ │ │ ╰────────── ref: 2 │ │ │ ╰──── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ bytes data; + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 2 + 3 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 5 │ │ │ let s := sload(data.slot) + │ │ │ ───────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 4 + 6 │ │ │ let o := sload(data.offset) + │ │ │ ────────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 5 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.5.8-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.5.8-failure.txt index 6ec15facf8..6b753a1218 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.5.8-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.5.8-failure.txt @@ -5,22 +5,45 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ bytes data; │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 │ 5 │ let s := sload(data.slot) │ ┬ ────┬──── - │ ╰───────────────────── def: 4 + │ ╰───────────────────── name: 4 │ │ │ ╰────── unresolved 6 │ let o := sload(data.offset) │ ┬ ─────┬───── - │ ╰─────────────────────── def: 5 + │ ╰─────────────────────── name: 5 │ │ │ ╰─────── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ bytes data; + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 2 + 3 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 5 │ │ │ let s := sload(data.slot) + │ │ │ ───────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 4 + 6 │ │ │ let o := sload(data.offset) + │ │ │ ────────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 5 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.7.0-success.txt b/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.7.0-success.txt index 6e244c0dcf..f923df2dc1 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.7.0-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/slot_offset_members/generated/0.7.0-success.txt @@ -5,26 +5,49 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ bytes data; │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 │ 5 │ let s := sload(data.slot) │ ┬ ──┬─ ──┬─ - │ ╰───────────────────── def: 4 + │ ╰───────────────────── name: 4 │ │ │ │ ╰──────── ref: 2 │ │ │ ╰─── ref: built-in 6 │ let o := sload(data.offset) │ ┬ ──┬─ ───┬── - │ ╰─────────────────────── def: 5 + │ ╰─────────────────────── name: 5 │ │ │ │ ╰────────── ref: 2 │ │ │ ╰──── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ bytes data; + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 2 + 3 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 5 │ │ │ let s := sload(data.slot) + │ │ │ ───────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 4 + 6 │ │ │ let o := sload(data.offset) + │ │ │ ────────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 5 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/slot_suffix/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/yul/slot_suffix/generated/0.4.11-success.txt index bb7557764a..889e82c75c 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/slot_suffix/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/slot_suffix/generated/0.4.11-success.txt @@ -5,22 +5,45 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ bytes data; │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 │ 5 │ let s := sload(data_slot) │ ┬ ────┬──── - │ ╰───────────────────── def: 4 + │ ╰───────────────────── name: 4 │ │ │ ╰────── ref: built-in 6 │ let o := sload(data_offset) │ ┬ ─────┬───── - │ ╰─────────────────────── def: 5 + │ ╰─────────────────────── name: 5 │ │ │ ╰─────── ref: built-in ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ bytes data; + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 2 + 3 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 5 │ │ │ let s := sload(data_slot) + │ │ │ ───────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 4 + 6 │ │ │ let o := sload(data_offset) + │ │ │ ────────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 5 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/slot_suffix/generated/0.7.0-failure.txt b/crates/solidity/testing/snapshots/bindings_output/yul/slot_suffix/generated/0.7.0-failure.txt index 8745d145dd..839c514f9b 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/slot_suffix/generated/0.7.0-failure.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/slot_suffix/generated/0.7.0-failure.txt @@ -5,22 +5,45 @@ References and definitions: │ 1 │ contract Test { │ ──┬─ - │ ╰─── def: 1 + │ ╰─── name: 1 2 │ bytes data; │ ──┬─ - │ ╰─── def: 2 + │ ╰─── name: 2 3 │ function test() public { │ ──┬─ - │ ╰─── def: 3 + │ ╰─── name: 3 │ 5 │ let s := sload(data_slot) │ ┬ ────┬──── - │ ╰───────────────────── def: 4 + │ ╰───────────────────── name: 4 │ │ │ ╰────── unresolved 6 │ let o := sload(data_offset) │ ┬ ─────┬───── - │ ╰─────────────────────── def: 5 + │ ╰─────────────────────── name: 5 │ │ │ ╰─────── unresolved ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭───▶ contract Test { + 2 │ │ │ bytes data; + │ │ │ ────────┬─────── + │ │ │ ╰───────── definiens: 2 + 3 │ │ ╭─▶ function test() public { + ┆ ┆ ┆ + 5 │ │ │ let s := sload(data_slot) + │ │ │ ───────────────────┬────────────────── + │ │ │ ╰──────────────────── definiens: 4 + 6 │ │ │ let o := sload(data_offset) + │ │ │ ────────────────────┬─────────────────── + │ │ │ ╰───────────────────── definiens: 5 + ┆ ┆ ┆ + 8 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 3 + 9 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯ diff --git a/crates/solidity/testing/snapshots/bindings_output/yul/variables/generated/0.4.11-success.txt b/crates/solidity/testing/snapshots/bindings_output/yul/variables/generated/0.4.11-success.txt index 5b5f23efa7..d50acd7fdd 100644 --- a/crates/solidity/testing/snapshots/bindings_output/yul/variables/generated/0.4.11-success.txt +++ b/crates/solidity/testing/snapshots/bindings_output/yul/variables/generated/0.4.11-success.txt @@ -5,17 +5,36 @@ References and definitions: │ 1 │ contract AssemblyVariable { │ ────────┬─────── - │ ╰───────── def: 1 + │ ╰───────── name: 1 2 │ function yul_let() public returns (uint256 z) { │ ───┬─── ┬ - │ ╰───────────────────────────────── def: 2 + │ ╰───────────────────────────────── name: 2 │ │ - │ ╰── def: 3 + │ ╰── name: 3 │ 4 │ let x := 123 │ ┬ - │ ╰── def: 4 + │ ╰── name: 4 5 │ z := 456 │ ┬ │ ╰── ref: 3 ───╯ +Definiens: + ╭─[input.sol:1:1] + │ + 1 │ ╭─│ ▶ contract AssemblyVariable { + 2 │ │ ╭─▶ function yul_let() public returns (uint256 z) { + │ │ │ ────┬──── + │ │ │ ╰────── definiens: 3 + ┆ ┆ ┆ + 4 │ │ │ let x := 123 + │ │ │ ────────────┬──────────── + │ │ │ ╰────────────── definiens: 4 + ┆ ┆ ┆ + 7 │ │ ├─▶ } + │ │ │ + │ │ ╰─────────── definiens: 2 + 8 │ ├───▶ } + │ │ + │ ╰───────── definiens: 1 +───╯