Merge pull request #7837 from ethereum/docstring-named-return

Report DocString error on named return paramater mismatch
This commit is contained in:
chriseth
2019-12-04 17:57:52 +01:00
committed by GitHub
7 changed files with 64 additions and 19 deletions
+2 -2
View File
@@ -12831,7 +12831,7 @@ BOOST_AUTO_TEST_CASE(snark)
return G1Point(p.X, q - (p.Y % q));
}
/// @return the sum of two points of G1
/// @return r the sum of two points of G1
function add(G1Point memory p1, G1Point memory p2) internal returns (G1Point memory r) {
uint[4] memory input;
input[0] = p1.X;
@@ -12847,7 +12847,7 @@ BOOST_AUTO_TEST_CASE(snark)
require(success);
}
/// @return the product of a point on G1 and a scalar, i.e.
/// @return r the product of a point on G1 and a scalar, i.e.
/// p == p.mul(1) and p.add(p) == p.mul(2) for all points p.
function mul(G1Point memory p, uint s) internal returns (G1Point memory r) {
uint[3] memory input;
@@ -0,0 +1,5 @@
abstract contract C {
/// @return value The value returned by this function.
function vote() public virtual returns (uint value);
}
// ----
@@ -0,0 +1,7 @@
abstract contract C {
/// @param id Some identifier
/// @return No value returned
function vote(uint id) public virtual returns (uint value);
}
// ----
// DocstringParsingError: Documentation tag "@return No value returned" does not contain the name of its return parameter.
@@ -0,0 +1,7 @@
abstract contract C {
/// @param id Some identifier
/// @return No value returned
function vote(uint id) public virtual returns (uint value);
}
// ----
// DocstringParsingError: Documentation tag "@return No value returned" does not contain the name of its return parameter.