current position:Home>Which can override specify?

Which can override specify?

2022-02-04 00:02:45 Q & A of Denglian community

dego.png In this case , How to write ?

Take the answer 1:

Multiple inherited override , like this :

pragma solidity >=0.5.0 <0.7.0;contract Base1 {    function foo() virtual public {}}contract Base2 {    function foo() virtual public {}}contract Inherited is Base1, Base2 {    // Derives from multiple bases defining foo(), so we must explicitly    // override it    function foo() public override(Base1, Base2) {}}

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.

Random recommended