mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
docs: Replace > with >= in pragmas to work around the highligher being unable to process the former
This commit is contained in:
parent
310a35185a
commit
d8260a1e93
@ -657,7 +657,7 @@ As an example, the code
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// 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;
|
pragma abicoder v2;
|
||||||
|
|
||||||
contract Test {
|
contract Test {
|
||||||
|
@ -18,7 +18,7 @@ if they are marked ``virtual``. For details, please see
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >0.7.0 <0.9.0;
|
pragma solidity >=0.7.1 <0.9.0;
|
||||||
|
|
||||||
contract owned {
|
contract owned {
|
||||||
constructor() { owner = payable(msg.sender); }
|
constructor() { owner = payable(msg.sender); }
|
||||||
|
@ -15,7 +15,7 @@ that call them, similar to internal library functions.
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// 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) {
|
function sum(uint[] memory _arr) pure returns (uint s) {
|
||||||
for (uint i = 0; i < _arr.length; i++)
|
for (uint i = 0; i < _arr.length; i++)
|
||||||
|
@ -786,7 +786,7 @@ A failure in an external call can be caught using a try/catch statement, as foll
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// 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); }
|
interface DataFeed { function getData(address token) external returns (uint value); }
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ hiding new and different behavior in existing code.
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >0.7.0;
|
pragma solidity >=0.7.1;
|
||||||
|
|
||||||
contract C {
|
contract C {
|
||||||
struct S {
|
struct S {
|
||||||
@ -80,7 +80,7 @@ This causes differences in some contracts, for example:
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >0.7.0;
|
pragma solidity >=0.7.1;
|
||||||
|
|
||||||
contract A {
|
contract A {
|
||||||
uint x;
|
uint x;
|
||||||
@ -104,7 +104,7 @@ This causes differences in some contracts, for example:
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >0.8.0;
|
pragma solidity >=0.8.1;
|
||||||
|
|
||||||
contract C {
|
contract C {
|
||||||
bytes x;
|
bytes x;
|
||||||
@ -135,7 +135,7 @@ This causes differences in some contracts, for example:
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >0.8.0;
|
pragma solidity >=0.8.1;
|
||||||
contract C {
|
contract C {
|
||||||
function preincr_u8(uint8 _a) public pure returns (uint8) {
|
function preincr_u8(uint8 _a) public pure returns (uint8) {
|
||||||
return ++_a + _a;
|
return ++_a + _a;
|
||||||
@ -155,7 +155,7 @@ This causes differences in some contracts, for example:
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >0.8.0;
|
pragma solidity >=0.8.1;
|
||||||
contract C {
|
contract C {
|
||||||
function add(uint8 _a, uint8 _b) public pure returns (uint8) {
|
function add(uint8 _a, uint8 _b) public pure returns (uint8) {
|
||||||
return _a + _b;
|
return _a + _b;
|
||||||
@ -177,7 +177,7 @@ This causes differences in some contracts, for example:
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >0.8.0;
|
pragma solidity >=0.8.1;
|
||||||
contract C {
|
contract C {
|
||||||
function f() public pure returns (uint256 aMod, uint256 mMod) {
|
function f() public pure returns (uint256 aMod, uint256 mMod) {
|
||||||
uint256 x = 3;
|
uint256 x = 3;
|
||||||
@ -228,7 +228,7 @@ For example:
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >0.8.0;
|
pragma solidity >=0.8.1;
|
||||||
contract C {
|
contract C {
|
||||||
function f(uint8 _a) public pure returns (uint _r1, uint _r2)
|
function f(uint8 _a) public pure returns (uint _r1, uint _r2)
|
||||||
{
|
{
|
||||||
|
@ -50,7 +50,7 @@ contracts.
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >0.7.0 <0.9.0;
|
pragma solidity >=0.7.1 <0.9.0;
|
||||||
|
|
||||||
contract SimpleAuction {
|
contract SimpleAuction {
|
||||||
function bid() public payable { // Function
|
function bid() public payable { // Function
|
||||||
|
@ -492,7 +492,7 @@ Array slices are useful to ABI-decode secondary data passed in function paramete
|
|||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >0.8.4 <0.9.0;
|
pragma solidity >=0.8.5 <0.9.0;
|
||||||
contract Proxy {
|
contract Proxy {
|
||||||
/// @dev Address of the client contract managed by proxy i.e., this contract
|
/// @dev Address of the client contract managed by proxy i.e., this contract
|
||||||
address client;
|
address client;
|
||||||
|
Loading…
Reference in New Issue
Block a user