-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add precedence to contract members and top-level definitions
This fixes some ambiguities especially with built-ins.
- Loading branch information
Showing
11 changed files
with
129 additions
and
12 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
3 changes: 3 additions & 0 deletions
3
crates/solidity/outputs/cargo/crate/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/scoping.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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 |
---|---|---|
|
@@ -12,3 +12,7 @@ contract Test { | |
} | ||
|
||
function sha256() {} | ||
|
||
function top_level() { | ||
sha256(); | ||
} |
13 changes: 13 additions & 0 deletions
13
...solidity/testing/snapshots/bindings_output/scoping/shadowing/generated/0.4.11-failure.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,13 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
Parse errors: | ||
Error: Expected ContractKeyword or ImportKeyword or InterfaceKeyword or LibraryKeyword or PragmaKeyword. | ||
╭─[input.sol:1:1] | ||
│ | ||
1 │ ╭─▶ function foo() {} | ||
┆ ┆ | ||
18 │ ├─▶ } | ||
│ │ | ||
│ ╰─────── Error occurred here. | ||
────╯ | ||
References and definitions: |
13 changes: 13 additions & 0 deletions
13
.../solidity/testing/snapshots/bindings_output/scoping/shadowing/generated/0.6.0-failure.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,13 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
Parse errors: | ||
Error: Expected ContractKeyword or EnumKeyword or ImportKeyword or InterfaceKeyword or LibraryKeyword or PragmaKeyword or StructKeyword. | ||
╭─[input.sol:1:1] | ||
│ | ||
1 │ ╭─▶ function foo() {} | ||
┆ ┆ | ||
18 │ ├─▶ } | ||
│ │ | ||
│ ╰─────── Error occurred here. | ||
────╯ | ||
References and definitions: |
47 changes: 47 additions & 0 deletions
47
.../solidity/testing/snapshots/bindings_output/scoping/shadowing/generated/0.7.1-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,47 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
References and definitions: | ||
╭─[input.sol:1:1] | ||
│ | ||
1 │ function foo() {} | ||
│ ─┬─ | ||
│ ╰─── def: 1 | ||
2 │ function bar() {} | ||
│ ─┬─ | ||
│ ╰─── def: 2 | ||
│ | ||
4 │ contract Base { | ||
│ ──┬─ | ||
│ ╰─── def: 3 | ||
5 │ function bar() public {} | ||
│ ─┬─ | ||
│ ╰─── def: 4 | ||
│ | ||
8 │ contract Test is Base { | ||
│ ──┬─ ──┬─ | ||
│ ╰─────────── def: 5 | ||
│ │ | ||
│ ╰─── ref: 3 | ||
9 │ int x; | ||
│ ┬ | ||
│ ╰── def: 6 | ||
│ | ||
11 │ function test(int x) public { | ||
│ ──┬─ ┬ | ||
│ ╰───────── def: 7 | ||
│ │ | ||
│ ╰── def: 8 | ||
12 │ foo(); | ||
│ ─┬─ | ||
│ ╰─── ref: 9 | ||
13 │ bar(); | ||
│ ─┬─ | ||
│ ╰─── ref: 4 | ||
14 │ x; | ||
│ ┬ | ||
│ ╰── ref: 8 | ||
│ | ||
17 │ function foo() internal {} | ||
│ ─┬─ | ||
│ ╰─── def: 9 | ||
────╯ |
18 changes: 18 additions & 0 deletions
18
crates/solidity/testing/snapshots/bindings_output/scoping/shadowing/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,18 @@ | ||
function foo() {} | ||
function bar() {} | ||
|
||
contract Base { | ||
function bar() public {} | ||
} | ||
|
||
contract Test is Base { | ||
int x; | ||
|
||
function test(int x) public { | ||
foo(); | ||
bar(); | ||
x; | ||
} | ||
|
||
function foo() internal {} | ||
} |