-
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.
- Loading branch information
1 parent
0a578b3
commit 214fce4
Showing
6 changed files
with
103 additions
and
2 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
10 changes: 9 additions & 1 deletion
10
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/using.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
13 changes: 13 additions & 0 deletions
13
.../testing/snapshots/bindings_output/using/binding_enum_member/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 │ ╭─▶ enum Answer { | ||
┆ ┆ | ||
17 │ ├─▶ } | ||
│ │ | ||
│ ╰─────── Error occurred here. | ||
────╯ | ||
References and definitions: |
50 changes: 50 additions & 0 deletions
50
...y/testing/snapshots/bindings_output/using/binding_enum_member/generated/0.6.0-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,50 @@ | ||
# This file is generated automatically by infrastructure scripts. Please don't edit by hand. | ||
|
||
References and definitions: | ||
╭─[input.sol:1:1] | ||
│ | ||
1 │ enum Answer { | ||
│ ───┬── | ||
│ ╰──── def: 1 | ||
2 │ Yes | ||
│ ─┬─ | ||
│ ╰─── def: 2 | ||
│ | ||
5 │ library Id { | ||
│ ─┬ | ||
│ ╰── def: 3 | ||
6 │ function id(Answer ans) returns (Answer) { | ||
│ ─┬ ───┬── ─┬─ ───┬── | ||
│ ╰────────────────────────────── def: 4 | ||
│ │ │ │ | ||
│ ╰───────────────────────── ref: 1 | ||
│ │ │ | ||
│ ╰──────────────────── def: 5 | ||
│ │ | ||
│ ╰──── ref: 1 | ||
7 │ return ans; | ||
│ ─┬─ | ||
│ ╰─── ref: 5 | ||
│ | ||
11 │ contract Test { | ||
│ ──┬─ | ||
│ ╰─── def: 6 | ||
12 │ using Id for Answer; | ||
│ ─┬ ───┬── | ||
│ ╰───────────── ref: 3 | ||
│ │ | ||
│ ╰──── ref: 1 | ||
│ | ||
14 │ function testFunc() returns (Answer) { | ||
│ ────┬─── ───┬── | ||
│ ╰─────────────────────── def: 7 | ||
│ │ | ||
│ ╰──── ref: 1 | ||
15 │ Answer.Yes.id(); | ||
│ ───┬── ─┬─ ─┬ | ||
│ ╰─────────── ref: 1 | ||
│ │ │ | ||
│ ╰────── ref: 2 | ||
│ │ | ||
│ ╰── ref: 4 | ||
────╯ |
17 changes: 17 additions & 0 deletions
17
crates/solidity/testing/snapshots/bindings_output/using/binding_enum_member/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,17 @@ | ||
enum Answer { | ||
Yes | ||
} | ||
|
||
library Id { | ||
function id(Answer ans) returns (Answer) { | ||
return ans; | ||
} | ||
} | ||
|
||
contract Test { | ||
using Id for Answer; | ||
|
||
function testFunc() returns (Answer) { | ||
Answer.Yes.id(); | ||
} | ||
} |