mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adds syntax tests, documentation and changelog entry.
Refines comment for array utility function.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
contract C {
|
||||
uint[] data;
|
||||
function test() public {
|
||||
data.pop();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
@@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
uint[] data;
|
||||
function test() public {
|
||||
data.pop(5);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (65-76): Wrong argument count for function call: 1 arguments given but expected 0.
|
||||
@@ -0,0 +1,7 @@
|
||||
contract C {
|
||||
bytes data;
|
||||
function test() public {
|
||||
data.pop();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
@@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
function test() public {
|
||||
uint[] memory data;
|
||||
data.pop();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (74-82): Member "pop" is not available in uint256[] memory outside of storage.
|
||||
@@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
uint data;
|
||||
function test() public {
|
||||
data.pop();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (63-71): Member "pop" not found or not visible after argument-dependent lookup in uint256
|
||||
@@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
uint[3] data;
|
||||
function test() public {
|
||||
data.pop();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (66-74): Member "pop" not found or not visible after argument-dependent lookup in uint256[3] storage ref
|
||||
@@ -0,0 +1,8 @@
|
||||
contract C {
|
||||
string data;
|
||||
function test() public {
|
||||
data.pop();
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (65-73): Member "pop" not found or not visible after argument-dependent lookup in string storage ref
|
||||
Reference in New Issue
Block a user