forked from ethereum/solidity
-
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.
Natspec: Don't copy from base function if return parameters differ
- Loading branch information
Showing
6 changed files
with
109 additions
and
9 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
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
14 changes: 14 additions & 0 deletions
14
test/libsolidity/syntaxTests/natspec/invalid/return_param_amount_differs.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 @@ | ||
interface IThing { | ||
/// @return x a number | ||
/// @return y another number | ||
function value() external view returns (uint128 x, uint128 y); | ||
} | ||
|
||
contract Thing is IThing { | ||
struct Value { | ||
uint128 x; | ||
uint128 y; | ||
} | ||
|
||
Value public override value; | ||
} |
15 changes: 15 additions & 0 deletions
15
test/libsolidity/syntaxTests/natspec/invalid/return_param_amount_differs2.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,15 @@ | ||
interface IThing { | ||
/// @param v value to search for | ||
/// @return x a number | ||
/// @return y another number | ||
function value(uint256 v) external view returns (uint128 x, uint128 y); | ||
} | ||
|
||
contract Thing is IThing { | ||
struct Value { | ||
uint128 x; | ||
uint128 y; | ||
} | ||
|
||
mapping(uint256=>Value) public override value; | ||
} |