Skip to content

Commit 0196a9a

Browse files
cameelnikola-matic
authored andcommitted
docs: Update the list of definitions in a contract whose names do not clash when inherited
1 parent 3e660d4 commit 0196a9a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/contracts/inheritance.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -590,9 +590,11 @@ One area where inheritance linearization is especially important and perhaps not
590590
Inheriting Different Kinds of Members of the Same Name
591591
======================================================
592592

593-
It is an error when any of the following pairs in a contract have the same name due to inheritance:
594-
- a function and a modifier
595-
- a function and an event
596-
- an event and a modifier
597-
598-
As an exception, a state variable getter can override an external function.
593+
The only situations where, due to inheritance, a contract may contain multiple definitions sharing
594+
the same name are:
595+
596+
- Overloading of functions.
597+
- Overriding of virtual functions.
598+
- Overriding of external virtual functions by state variable getters.
599+
- Overriding of virtual modifiers.
600+
- Overloading of events.

0 commit comments

Comments
 (0)