Skip to content

Report DocString error on named return paramater mismatch - #7837

Merged
chriseth merged 2 commits into
develop_060from
docstring-named-return
Dec 4, 2019
Merged

Report DocString error on named return paramater mismatch#7837
chriseth merged 2 commits into
develop_060from
docstring-named-return

Conversation

@erak

@erak erak commented Nov 28, 2019

Copy link
Copy Markdown
Collaborator

Part of #7835.

Changelog and documentation was already updated with #7534. This is just making it report a parser error instead of silently accepting it and then throwing an ICE when --devdoc is passed to solc.

Implementation detail

Whenever a @return tag is visited, the list of named return parameters is checked for at least one matching name. We do not care of enforce the order of them.

EDIT:
We do care about the order of named / unnamed return parameters and their corresponding documentation tag (as required by #7534 already). This PR also requires that the number of return parameters and @return tags is equal.

}

/// @dev Allows to withdraw fees from market contract to campaign contract
/// @return Fee amount

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function does not return anything.

@erak
erak force-pushed the docstring-named-return branch 3 times, most recently from 7e26179 to 4445d47 Compare November 28, 2019 16:23
@leonardoalt
leonardoalt force-pushed the docstring-named-return branch from 4445d47 to 03097fb Compare December 3, 2019 20:30
@leonardoalt

Copy link
Copy Markdown

Rebased for now

@leonardoalt
leonardoalt force-pushed the docstring-named-return branch 2 times, most recently from ef185f5 to c72faf3 Compare December 4, 2019 10:47
@leonardoalt

Copy link
Copy Markdown

@chriseth @axic Updated

@chriseth

chriseth commented Dec 4, 2019

Copy link
Copy Markdown
Contributor

Tests are failing.

@chriseth
chriseth force-pushed the docstring-named-return branch from c72faf3 to 19d466d Compare December 4, 2019 14:40
@chriseth
chriseth merged commit d34b0b7 into develop_060 Dec 4, 2019
@chriseth
chriseth deleted the docstring-named-return branch December 4, 2019 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants