docs: Replace > with >= in pragmas to work around the highligher being unable to process the former

This commit is contained in:
Kamil Śliwak 2021-07-14 17:57:35 +02:00
parent 310a35185a
commit d8260a1e93
7 changed files with 13 additions and 13 deletions

View File

@ -657,7 +657,7 @@ As an example, the code
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.7.4 <0.9.0;
pragma solidity >=0.7.5 <0.9.0;
pragma abicoder v2;
contract Test {

View File

@ -18,7 +18,7 @@ if they are marked ``virtual``. For details, please see
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.7.0 <0.9.0;
pragma solidity >=0.7.1 <0.9.0;
contract owned {
constructor() { owner = payable(msg.sender); }

View File

@ -15,7 +15,7 @@ that call them, similar to internal library functions.
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.7.0 <0.9.0;
pragma solidity >=0.7.1 <0.9.0;
function sum(uint[] memory _arr) pure returns (uint s) {
for (uint i = 0; i < _arr.length; i++)

View File

@ -786,7 +786,7 @@ A failure in an external call can be caught using a try/catch statement, as foll
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.8.0;
pragma solidity >=0.8.1;
interface DataFeed { function getData(address token) external returns (uint value); }

View File

@ -17,7 +17,7 @@ hiding new and different behavior in existing code.
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.7.0;
pragma solidity >=0.7.1;
contract C {
struct S {
@ -80,7 +80,7 @@ This causes differences in some contracts, for example:
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.7.0;
pragma solidity >=0.7.1;
contract A {
uint x;
@ -104,7 +104,7 @@ This causes differences in some contracts, for example:
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.8.0;
pragma solidity >=0.8.1;
contract C {
bytes x;
@ -135,7 +135,7 @@ This causes differences in some contracts, for example:
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.8.0;
pragma solidity >=0.8.1;
contract C {
function preincr_u8(uint8 _a) public pure returns (uint8) {
return ++_a + _a;
@ -155,7 +155,7 @@ This causes differences in some contracts, for example:
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.8.0;
pragma solidity >=0.8.1;
contract C {
function add(uint8 _a, uint8 _b) public pure returns (uint8) {
return _a + _b;
@ -177,7 +177,7 @@ This causes differences in some contracts, for example:
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.8.0;
pragma solidity >=0.8.1;
contract C {
function f() public pure returns (uint256 aMod, uint256 mMod) {
uint256 x = 3;
@ -228,7 +228,7 @@ For example:
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.8.0;
pragma solidity >=0.8.1;
contract C {
function f(uint8 _a) public pure returns (uint _r1, uint _r2)
{

View File

@ -50,7 +50,7 @@ contracts.
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.7.0 <0.9.0;
pragma solidity >=0.7.1 <0.9.0;
contract SimpleAuction {
function bid() public payable { // Function

View File

@ -492,7 +492,7 @@ Array slices are useful to ABI-decode secondary data passed in function paramete
.. code-block:: solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.8.4 <0.9.0;
pragma solidity >=0.8.5 <0.9.0;
contract Proxy {
/// @dev Address of the client contract managed by proxy i.e., this contract
address client;