-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Showing
8 changed files
with
73 additions
and
0 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
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
8 changes: 8 additions & 0 deletions
8
test/libsolidity/syntaxTests/constants/access_through_contract_name.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,8 @@ | ||
contract A { | ||
uint constant a = 0x1; | ||
} | ||
contract C { | ||
function f() public pure returns (uint) { | ||
return A.a; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
test/libsolidity/syntaxTests/constants/cross_contract_base.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,10 @@ | ||
contract A { | ||
uint constant c = 0; | ||
} | ||
contract B is A { | ||
} | ||
contract C { | ||
uint constant c = B.c; | ||
} | ||
// ---- | ||
// TypeError: (95-98): Member "c" not found or not visible after argument-dependent lookup in type(contract B) |
8 changes: 8 additions & 0 deletions
8
test/libsolidity/syntaxTests/constants/cross_contract_cyclic_dependency.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,8 @@ | ||
contract A { | ||
uint constant c = B.c; | ||
} | ||
contract B { | ||
uint constant c = A.c; | ||
} | ||
// ---- | ||
// Some Error: This should fail with some error! |
10 changes: 10 additions & 0 deletions
10
test/libsolidity/syntaxTests/constants/cross_contract_super.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,10 @@ | ||
contract A { | ||
uint constant c = 0; | ||
} | ||
contract B is A { | ||
} | ||
contract C { | ||
uint constant c = B.super.c; | ||
} | ||
// ---- | ||
// TypeError: (95-102): Member "super" not found or not visible after argument-dependent lookup in type(contract B) |
8 changes: 8 additions & 0 deletions
8
test/libsolidity/syntaxTests/constants/cross_contract_this.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,8 @@ | ||
contract A { | ||
uint constant c = 0; | ||
} | ||
contract C { | ||
uint constant c = A.this.c; | ||
} | ||
// ---- | ||
// TypeError: (75-81): Member "this" not found or not visible after argument-dependent lookup in type(contract A) |
10 changes: 10 additions & 0 deletions
10
test/libsolidity/syntaxTests/constants/no_non_constant_access_through_contract_name.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,10 @@ | ||
contract A { | ||
uint a = 0x1; | ||
} | ||
contract C { | ||
function f() public pure returns (uint) { | ||
return A.a; | ||
} | ||
} | ||
// ---- | ||
// TypeError: (107-110): Member "a" not found or not visible after argument-dependent lookup in type(contract A) |