diff --git a/crates/solidity/inputs/language/bindings/rules.msgb b/crates/solidity/inputs/language/bindings/rules.msgb index db1390c6c..0e341a683 100644 --- a/crates/solidity/inputs/language/bindings/rules.msgb +++ b/crates/solidity/inputs/language/bindings/rules.msgb @@ -767,6 +767,8 @@ inherit .lexical_scope @type_name [TypeName @mapping [MappingType]] { let @type_name.type_ref = @mapping.lexical_scope let @type_name.output = @mapping.output + let @type_name.pop_begin = @mapping.pop_begin + let @type_name.pop_end = @mapping.pop_end } @@ -845,6 +847,12 @@ inherit .lexical_scope ; resolve the value type through our scope edge @value_type.type_ref -> @mapping.lexical_scope + + ; We use the value_type's definition path as our own because it's needed when + ; a mapping is the target of a `using` directive. It's not correct, but we + ; don't have the analog referencing path either. + let @mapping.pop_begin = @value_type.pop_begin + let @mapping.pop_end = @value_type.pop_end } 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 c28dc2449..63e086289 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 @@ -772,6 +772,8 @@ inherit .lexical_scope @type_name [TypeName @mapping [MappingType]] { let @type_name.type_ref = @mapping.lexical_scope let @type_name.output = @mapping.output + let @type_name.pop_begin = @mapping.pop_begin + let @type_name.pop_end = @mapping.pop_end } @@ -850,6 +852,12 @@ inherit .lexical_scope ; resolve the value type through our scope edge @value_type.type_ref -> @mapping.lexical_scope + + ; We use the value_type's definition path as our own because it's needed when + ; a mapping is the target of a `using` directive. It's not correct, but we + ; don't have the analog referencing path either. + let @mapping.pop_begin = @value_type.pop_begin + let @mapping.pop_end = @value_type.pop_end }