Adds default visibility specifier to syntax tests.

This commit is contained in:
Erik Kundt
2018-07-04 10:45:59 +02:00
parent 533d5d4b1c
commit 2e0d019ef0
37 changed files with 619 additions and 610 deletions
@@ -1,7 +1,7 @@
contract C {
function f(uint constant LEN) {
function f(uint constant LEN) public {
uint[LEN] a;
}
}
// ----
// TypeError: (62-65): Invalid array length, expected integer literal or constant expression.
// TypeError: (69-72): Invalid array length, expected integer literal or constant expression.
@@ -1,6 +1,6 @@
contract C {
function f() {}
function f() public {}
uint[f] ids;
}
// ----
// TypeError: (42-43): Invalid array length, expected integer literal or constant expression.
// TypeError: (49-50): Invalid array length, expected integer literal or constant expression.
@@ -1,7 +1,7 @@
contract C {
function f(uint x) {}
function f(uint x) public {}
uint constant LEN = f();
uint[LEN] ids;
}
// ----
// TypeError: (77-80): Invalid array length, expected integer literal or constant expression.
// TypeError: (84-87): Invalid array length, expected integer literal or constant expression.
@@ -2,7 +2,7 @@ contract C {
uint constant L2 = LEN - 10;
uint constant L1 = L2 / 10;
uint constant LEN = 10 + L1 * 5;
function f() {
function f() public {
uint[LEN] a;
}
}
@@ -1,6 +1,6 @@
contract C {
uint constant LEN = LEN;
function f() {
function f() public {
uint[LEN] a;
}
}