mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update docs.
This commit is contained in:
parent
05baa23e8a
commit
c33d233d88
@ -529,11 +529,11 @@ As an example, the code
|
|||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
|
|
||||||
abstract contract Test {
|
contract Test {
|
||||||
struct S { uint a; uint[] b; T[] c; }
|
struct S { uint a; uint[] b; T[] c; }
|
||||||
struct T { uint x; uint y; }
|
struct T { uint x; uint y; }
|
||||||
function f(S memory s, T memory t, uint a) public;
|
function f(S memory s, T memory t, uint a) public {}
|
||||||
function g() public returns (S memory s, T memory t, uint a);
|
function g() public returns (S memory s, T memory t, uint a) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
would result in the JSON:
|
would result in the JSON:
|
||||||
|
@ -15,7 +15,7 @@ provided (no implementation body ``{ }`` was given).::
|
|||||||
pragma solidity >=0.4.0 <0.7.0;
|
pragma solidity >=0.4.0 <0.7.0;
|
||||||
|
|
||||||
abstract contract Feline {
|
abstract contract Feline {
|
||||||
function utterance() public returns (bytes32);
|
function utterance() public virtual returns (bytes32);
|
||||||
}
|
}
|
||||||
|
|
||||||
Such abstract contracts can not be instantiated directly. This is also true, if an abstract contract itself does implement
|
Such abstract contracts can not be instantiated directly. This is also true, if an abstract contract itself does implement
|
||||||
|
@ -53,13 +53,13 @@ Details are given in the following example.
|
|||||||
// without body. If a contract does not implement all
|
// without body. If a contract does not implement all
|
||||||
// functions it can only be used as an interface.
|
// functions it can only be used as an interface.
|
||||||
abstract contract Config {
|
abstract contract Config {
|
||||||
function lookup(uint id) public returns (address adr);
|
function lookup(uint id) public virtual returns (address adr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
abstract contract NameReg {
|
abstract contract NameReg {
|
||||||
function register(bytes32 name) public;
|
function register(bytes32 name) public virtual;
|
||||||
function unregister() public;
|
function unregister() public virtual;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user