We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The code example about linearization of constructors from the Solidity docs produces wrong code:
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; contract Base1 { uint public foo; constructor() {} } abstract contract Base2 { constructor() {} } // Constructors are executed in the following order: // 1 - Base1 // 2 - Base2 // 3 - Derived1 contract Derived1 is Base1, Base2 { constructor() Base1() Base2() {} } // Constructors are executed in the following order: // 1 - Base2 // 2 - Base1 // 3 - Derived2 contract Derived2 is Base2, Base1 { constructor() Base2() Base1() {} } // Constructors are still executed in the following order: // 1 - Base2 // 2 - Base1 // 3 - Derived3 contract Derived3 is Base2, Base1 { constructor() Base1() Base2() {} }
Instead of what is explained in the comment of the example contracts, the constructors look like this:
# constructor Derived1::Derived1::constructor::872ccdc6190148bc public:true selector:872ccdc6190148bc nonpayable:true # params: # returns: block0: # entry = call Derived1::Base2::constructor::872ccdc6190148bc = call Derived1::Base1::constructor::872ccdc6190148bc return
# constructor Derived2::Derived2::constructor::872ccdc6190148bc public:true selector:872ccdc6190148bc nonpayable:true # params: # returns: block0: # entry = call Derived2::Base1::constructor::872ccdc6190148bc = call Derived2::Base2::constructor::872ccdc6190148bc return
# constructor Derived3::Derived3::constructor::872ccdc6190148bc public:true selector:872ccdc6190148bc nonpayable:true # params: # returns: block0: # entry = call Derived3::Base1::constructor::872ccdc6190148bc = call Derived3::Base2::constructor::872ccdc6190148bc return
The same is the case when compiling for the polkadot target.
polkadot
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The code example about linearization of constructors from the Solidity docs produces wrong code:
Instead of what is explained in the comment of the example contracts, the constructors look like this:
The same is the case when compiling for the
polkadot
target.The text was updated successfully, but these errors were encountered: