forked from NomicFoundation/slang
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose public state variables so that they are accessible through
this
- Loading branch information
Showing
5 changed files
with
82 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 13 additions & 5 deletions
18
...s/solidity/outputs/cargo/slang_solidity/src/generated/bindings/generated/binding_rules.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
crates/solidity/outputs/cargo/tests/src/bindings_output/generated/contracts.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...y/testing/snapshots/bindings_output/contracts/public_getters/generated/0.4.11-success.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
References and definitions: | ||
╭─[input.sol:1:1] | ||
│ | ||
1 │ contract Foo { | ||
│ ─┬─ | ||
│ ╰─── def: 1 | ||
2 │ int public x; | ||
│ ┬ | ||
│ ╰── def: 2 | ||
│ | ||
5 │ contract Bar { | ||
│ ─┬─ | ||
│ ╰─── def: 3 | ||
6 │ int public y; | ||
│ ┬ | ||
│ ╰── def: 4 | ||
7 │ Foo f; | ||
│ ─┬─ ┬ | ||
│ ╰───── ref: 1 | ||
│ │ | ||
│ ╰── def: 5 | ||
│ | ||
9 │ function test() public returns (int) { | ||
│ ──┬─ | ||
│ ╰─── def: 6 | ||
10 │ return y + this.y() + f.x(); | ||
│ ┬ ──┬─ ┬ ┬ ┬ | ||
│ ╰─────────────────── ref: 4 | ||
│ │ │ │ │ | ||
│ ╰───────────── unresolved | ||
│ │ │ │ | ||
│ ╰────────── ref: 4 | ||
│ │ │ | ||
│ ╰──── ref: 5 | ||
│ │ | ||
│ ╰── ref: 2 | ||
────╯ |
12 changes: 12 additions & 0 deletions
12
crates/solidity/testing/snapshots/bindings_output/contracts/public_getters/input.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
contract Foo { | ||
int public x; | ||
} | ||
|
||
contract Bar { | ||
int public y; | ||
Foo f; | ||
|
||
function test() public returns (int) { | ||
return y + this.y() + f.x(); | ||
} | ||
} |