-
Notifications
You must be signed in to change notification settings - Fork 6k
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
06baee1
commit 17524b3
Showing
15 changed files
with
194 additions
and
1 deletion.
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
5 changes: 5 additions & 0 deletions
5
test/libsolidity/syntaxTests/modifierAreas/modifiers/valid/empty.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,5 @@ | ||
contract C { | ||
modifier A { _; } | ||
apply A {} | ||
} | ||
// ---- |
12 changes: 12 additions & 0 deletions
12
test/libsolidity/syntaxTests/modifierAreas/modifiers/valid/many_functions.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 C { | ||
modifier A { _; } | ||
apply A { | ||
function f() {} | ||
function g() {} | ||
} | ||
} | ||
// ---- | ||
// Warning: (57-72): No visibility specified. Defaulting to "public". | ||
// Warning: (81-96): No visibility specified. Defaulting to "public". | ||
// Warning: (57-72): Function state mutability can be restricted to pure | ||
// Warning: (81-96): Function state mutability can be restricted to pure |
9 changes: 9 additions & 0 deletions
9
test/libsolidity/syntaxTests/modifierAreas/modifiers/valid/one_function.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,9 @@ | ||
contract C { | ||
modifier A { _; } | ||
apply A { | ||
function f() {} | ||
} | ||
} | ||
// ---- | ||
// Warning: (57-72): No visibility specified. Defaulting to "public". | ||
// Warning: (57-72): Function state mutability can be restricted to pure |
7 changes: 7 additions & 0 deletions
7
test/libsolidity/syntaxTests/modifierAreas/mutability/invalid/function_discrepancy.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,7 @@ | ||
contract C { | ||
apply pure { | ||
function f() view {} | ||
} | ||
} | ||
// ---- | ||
// ParserError: (51-55): Cannot override modifier area's state mutability. |
7 changes: 7 additions & 0 deletions
7
test/libsolidity/syntaxTests/modifierAreas/mutability/invalid/nested_discrepancy.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,7 @@ | ||
contract C { | ||
apply pure { | ||
apply payable {} | ||
} | ||
} | ||
// ---- | ||
// ParserError: (44-51): Cannot override parent modifier area's state mutability of "pure". |
4 changes: 4 additions & 0 deletions
4
test/libsolidity/syntaxTests/modifierAreas/mutability/valid/empty.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,4 @@ | ||
contract C { | ||
apply payable {} | ||
} | ||
// ---- |
9 changes: 9 additions & 0 deletions
9
test/libsolidity/syntaxTests/modifierAreas/mutability/valid/many_functions.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,9 @@ | ||
contract C { | ||
apply pure { | ||
function f() {} | ||
function g() {} | ||
} | ||
} | ||
// ---- | ||
// Warning: (38-53): No visibility specified. Defaulting to "public". | ||
// Warning: (62-77): No visibility specified. Defaulting to "public". |
7 changes: 7 additions & 0 deletions
7
test/libsolidity/syntaxTests/modifierAreas/mutability/valid/one_function.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,7 @@ | ||
contract C { | ||
apply pure { | ||
function f() {} | ||
} | ||
} | ||
// ---- | ||
// Warning: (38-53): No visibility specified. Defaulting to "public". |
7 changes: 7 additions & 0 deletions
7
test/libsolidity/syntaxTests/modifierAreas/visibility/invalid/function_discrepancy.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,7 @@ | ||
contract C { | ||
apply public { | ||
function f() private {} | ||
} | ||
} | ||
// ---- | ||
// ParserError: (53-60): Cannot override modifier area's visibility. |
7 changes: 7 additions & 0 deletions
7
test/libsolidity/syntaxTests/modifierAreas/visibility/invalid/nested_discrepancy.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,7 @@ | ||
contract C { | ||
apply public { | ||
apply private {} | ||
} | ||
} | ||
// ---- | ||
// ParserError: (46-53): Cannot override parent modifier area's visibility of "public". |
4 changes: 4 additions & 0 deletions
4
test/libsolidity/syntaxTests/modifierAreas/visibility/valid/empty.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,4 @@ | ||
contract C { | ||
apply public {} | ||
} | ||
// ---- |
9 changes: 9 additions & 0 deletions
9
test/libsolidity/syntaxTests/modifierAreas/visibility/valid/many_functions.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,9 @@ | ||
contract C { | ||
apply internal { | ||
function f() {} | ||
function g() {} | ||
} | ||
} | ||
// ---- | ||
// Warning: (42-57): Function state mutability can be restricted to pure | ||
// Warning: (66-81): Function state mutability can be restricted to pure |
7 changes: 7 additions & 0 deletions
7
test/libsolidity/syntaxTests/modifierAreas/visibility/valid/one_function.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,7 @@ | ||
contract C { | ||
apply private { | ||
function f() {} | ||
} | ||
} | ||
// ---- | ||
// Warning: (41-56): Function state mutability can be restricted to pure |