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.
Make using directives inherited in Solidity < 0.7.0
- Loading branch information
Showing
5 changed files
with
45 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.
1 change: 1 addition & 0 deletions
1
crates/solidity/outputs/cargo/tests/src/bindings_assertions/generated/mod.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
crates/solidity/outputs/cargo/tests/src/bindings_assertions/generated/using.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
16 changes: 16 additions & 0 deletions
16
crates/solidity/testing/snapshots/bindings_assertions/using/inherited.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,16 @@ | ||
library Lib { | ||
function squared(int x) public returns (int) { return x * x; } | ||
// ^def:1 | ||
} | ||
|
||
contract Base { | ||
using Lib for int; | ||
} | ||
|
||
contract Test is Base { | ||
function test(int x) public returns (int) { | ||
return x.squared(); | ||
// ^ref:1 (< 0.7.0) | ||
// ^ref:! (>= 0.7.0) | ||
} | ||
} |