Remix compilation fails with Source file requires different compiler version

Hi @Tedmcm,

It didn’t compile for me the first time, giving me an error.
I changed to the Release Candidate (I changed the GitHub import) and checked the Solidity compiler version and was able to compile.

I assume there may be some sort of caching issue.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.0.0-rc.0/contracts/token/ERC20/ERC20.sol";

contract Token is ERC20 {
  
    constructor () ERC20("TEDY", "TEDY") {
        _mint(msg.sender, 1000000 * (10 ** uint256(decimals())));
    }
}

You could also try removing the github directory.

Another community member also had a similar issue: Remix: Parse error : source file requires different compiler version - #2 by abcoathup