Skip to content

Conversation

@vipocenka
Copy link
Contributor

docs/contracts/inheritance.rst:

  • The text incorrectly stated that a super call in a contract defined as Final is Base1, Base2 would invoke the function in Base1.
  • According to Solidity's C3 linearization rules (right-to-left), the next contract in the inheritance graph is Base2. The change corrects the text to state that Base2.emitEvent() is called, resolving a logical contradiction in the documentation.

scripts/externalTests/benchmark_diff.py:

  • The verb replace was changed to replaces to agree with its singular subject, improving the clarity of the script's usage instructions.

@github-actions
Copy link

github-actions bot commented Aug 4, 2025

Thank you for your contribution to the Solidity compiler! A team member will follow up shortly.

If you haven't read our contributing guidelines and our review checklist before, please do it now, this makes the reviewing process and accepting your contribution smoother.

If you have any questions or need our help, feel free to post them in the PR or talk to us directly on the #solidity-dev channel on Matrix.

Copy link
Member

@clonker clonker left a comment

Choose a reason for hiding this comment

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

Hey, thank you for the contribution!

The docs are correct as they are right now but the wording is confusing. In the bigger context it is described that not using super skips Base1 entirely. Using super does call Base1 (eventually) and in parenthesis it even says that Base2 is called first. In that sense, your proposed change would make matters worse.

On a more technical note: Please rebase against the current develop (we don't want merge commits on develop) and if you end up implementing the change, squash your commits.

Thanks :)

Also a duplicate of #15517. But since this is the second time, perhaps it's worth to update the phrasing to make things clearer.

call this function on one of its base contracts. Rather, it
calls this function on the next base contract in the final
inheritance graph, so it will call ``Base1.emitEvent()`` (note that
inheritance graph, so it will call ``Base2.emitEvent()`` (note that
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
inheritance graph, so it will call ``Base2.emitEvent()`` (note that
inheritance graph, ensuring that ``Base1.emitEvent()`` is called (note that

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.

3 participants