title: Solidity TypeError in lottery contract
body: <p>I'm writing a simple Lottery contract in Solidity, and in the last line I get this error:</p>
  <pre><code>TypeError: Return argument type address payable[] storage ref is not
  implicitly convertible to expected type (type of first return
  variable) address[] memory.
  contracts/Lottery.sol:40:16: return players;
                                      ^^^^^^^
  </code></pre>
  <p>I'm compiling on 8.7 with this code:</p>
  <pre><code>    //SPDX-License-Identifier: GPL-3.0
      
  pragma solidity &gt;=0.4.17 &lt;0.9.0;
  //pragma solidity ^0.4.17;
      
  contract Lottery {
      address public manager;
      address payable[] public players;
  
      constructor() {
          manager = msg.sender; 
      }
  
      function enter() public restricted payable {
          require(msg.value &gt;= .01 ether);    //min. amount to enter the lottery is 0.01 ether in wei
          players.push(payable(msg.sender));
      }
      
      function random() private view restricted returns(uint) {  //picking random number, we use block difficulty, current block time and amount of players to hash with sha3 algorithm
          return uint(keccak256(abi.encodePacked(block.difficulty, block.timestamp , players)));          //keccak256 == sha3
      
      }
  
      function pickWinner() public {
          require(msg.sender == manager);             //only manager can pick winner
              
          uint index = random() % players.length;     //pick winner by using random number and % modulo from it, as player in array
                                                          //players[index].transfer(this.balance);
          players[index].transfer(address(this).balance);                 //player with index number in players array is winner, return address
                                                                          //transfer(amount of lottery reward);
          players = new address payable[](0);        //reseting lottery; '0' means size of dynamic array
      }
      
      modifier restricted() {                 //modifier for repeated functions
          require(msg.sender == manager);
          _;              // _ means run the rest of the code inside this function
      }
      
      function getPlayers() public view returns(address[] memory) {
          return players; 
      }
      
  }
  </code></pre>
  <p>What is wrong? Thanks for help!</p>