mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Adds default visibility specifier to syntax tests.
This commit is contained in:
+2
-2
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user