From bd6e65a89c1e90a01740c61af84b17be7ade26a0 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Tue, 3 Jan 2017 19:40:50 +0100 Subject: docs: document the resriction about a function and an event of the same name, and so on --- docs/contracts.rst | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/contracts.rst') diff --git a/docs/contracts.rst b/docs/contracts.rst index e82b7495..edc42c3d 100644 --- a/docs/contracts.rst +++ b/docs/contracts.rst @@ -877,6 +877,13 @@ cannot be resolved. A simple rule to remember is to specify the base classes in the order from "most base-like" to "most derived". +Inheriting Different Kinds of Members of the Same Name +====================================================== + +When the inheritance results in a contract with a function and a modifier of the same name, it is considered as an error. +This error is produced also by an event and a modifier of the same name, and a function and an event of the same name. +As an exception, a state variable accessor can override a public function. + .. index:: ! contract;abstract, ! abstract contract ****************** -- cgit v1.2.3