Adds syntax tests, documentation and changelog entry.

Refines comment for array utility function.
This commit is contained in:
Erik Kundt
2018-05-30 17:43:20 +02:00
parent 34b5eca1f8
commit 98d52beba3
33 changed files with 61 additions and 3 deletions
@@ -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