title: How to implement multiple inheritance with OpenZeppelin upgradeable contracts?
body: <p>I'm trying to convert an existing non-upgradeable contract that has multiple inheritance into an upgradeable one. I'm following the tutorial at <a href="https://docs.openzeppelin.com/contracts/4.x/upgradeable" rel="nofollow noreferrer">https://docs.openzeppelin.com/contracts/4.x/upgradeable</a> and the only thing I've found in docs is the following:</p>
  <blockquote>
  <p>Initializer functions are not linearized by the compiler like
  constructors. Because of this, each __{ContractName}_init function
  embeds the linearized calls to all parent initializers. As a
  consequence, calling two of these init functions can potentially
  initialize the same contract twice.</p>
  <p>The function __{ContractName}_init_unchained found in every contract
  is the initializer function minus the calls to parent initializers,
  and can be used to avoid the double initialization problem, but doing
  this manually is not recommended. We hope to be able to implement
  safety checks for this in future versions of the Upgrades Plugins.</p>
  </blockquote>
  <p>I don't know what to do from here. It talks about a problem, tells a workaround, but also telling that manually isn't recommended, and also telling that it will have the safety checks in the future upgrades plugins.</p>
  <p>So what <em>should</em> I do? It says what I shouldn't do but doesn't mention what I should do. Am I missing something?</p>
  <p>How can I have multiple inheritance and upgradeability at the same time with OpenZeppelin contracts? (I'm extending <code>ERC20BurnableUpgradeable</code> and <code>[draft-]ERC20PermitUpgradeable</code>, and using Solidity 0.8.9, Hardhat, OpenZeppelin 4.7.3 if it helps)</p>