-
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
1 parent
79051aa
commit fb133c3
Showing
5 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
test/libsolidity/semanticTests/expressions/module_from_ternary_expression.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,14 @@ | ||
==== Source: A ==== | ||
contract C { | ||
} | ||
==== Source: B ==== | ||
import "A" as M; | ||
|
||
contract C { | ||
function f() public pure { | ||
bool flag; | ||
((flag = true) ? M : M).C; | ||
} | ||
} | ||
// ---- | ||
// f() -> |
8 changes: 8 additions & 0 deletions
8
test/libsolidity/semanticTests/expressions/tuple_from_ternary_expression.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 C { | ||
function f(bool flag) public pure returns (uint, uint, uint){ | ||
return (flag ? (1, 2, 3) : (3, 2, 1)); | ||
} | ||
} | ||
// ---- | ||
// f(bool): true -> 1, 2, 3 | ||
// f(bool): false -> 3, 2, 1 |
7 changes: 0 additions & 7 deletions
7
test/libsolidity/syntaxTests/inline_arrays/unnamed_types_in_inline_array_3.sol
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
contract A { | ||
function f() public {} | ||
} | ||
|
||
contract C { | ||
function f() public returns (bytes memory) { | ||
function f() public pure returns (bytes memory) { | ||
return type(A).runtimeCode; | ||
} | ||
} | ||
// ---- | ||
// Warning 2018: (60-146): Function state mutability can be restricted to pure |
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