mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into breaking
This commit is contained in:
@@ -4,4 +4,4 @@ interface A {
|
||||
contract B is A {
|
||||
}
|
||||
// ----
|
||||
// TypeError: (69-88): Contract "B" should be marked as abstract.
|
||||
// TypeError 3656: (69-88): Contract "B" should be marked as abstract.
|
||||
|
||||
@@ -9,4 +9,4 @@ contract Test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (215-235): Cannot instantiate an abstract contract.
|
||||
// TypeError 4614: (215-235): Cannot instantiate an abstract contract.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
abstract
|
||||
// ----
|
||||
// ParserError: (9-9): Expected keyword "contract", "interface" or "library".
|
||||
// ParserError: (9-9): Expected identifier but got end of source
|
||||
// ParserError 3515: (9-9): Expected keyword "contract", "interface" or "library".
|
||||
// ParserError 2314: (9-9): Expected identifier but got end of source
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
abstract A { }
|
||||
// ----
|
||||
// ParserError: (9-10): Expected keyword "contract", "interface" or "library".
|
||||
// ParserError 3515: (9-10): Expected keyword "contract", "interface" or "library".
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
interface B { }
|
||||
abstract interface A { }
|
||||
// ----
|
||||
// TypeError: (16-40): Interfaces do not need the "abstract" keyword, they are abstract implicitly.
|
||||
// TypeError 9348: (16-40): Interfaces do not need the "abstract" keyword, they are abstract implicitly.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
abstract library A { }
|
||||
// ----
|
||||
// TypeError: (0-22): Libraries cannot be abstract.
|
||||
// TypeError 9571: (0-22): Libraries cannot be abstract.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract A {
|
||||
function a() public virtual;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (0-47): Contract "A" should be marked as abstract.
|
||||
// TypeError 3656: (0-47): Contract "A" should be marked as abstract.
|
||||
|
||||
@@ -4,4 +4,4 @@ abstract contract A {
|
||||
contract B is A {
|
||||
}
|
||||
// ----
|
||||
// TypeError: (57-76): Contract "B" should be marked as abstract.
|
||||
// TypeError 3656: (57-76): Contract "B" should be marked as abstract.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (65-76): Wrong argument count for function call: 1 arguments given but expected 0.
|
||||
// TypeError 6160: (65-76): Wrong argument count for function call: 1 arguments given but expected 0.
|
||||
|
||||
@@ -3,4 +3,4 @@ contract Test {
|
||||
function f(uint256[] calldata s) external { s[0] = 4; }
|
||||
}
|
||||
// ----
|
||||
// TypeError: (98-102): Calldata arrays are read-only.
|
||||
// TypeError 6182: (98-102): Calldata arrays are read-only.
|
||||
|
||||
@@ -3,5 +3,5 @@ contract Test {
|
||||
function g(uint[][1] calldata) external { }
|
||||
}
|
||||
// ----
|
||||
// TypeError: (31-48): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.
|
||||
// TypeError: (78-96): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.
|
||||
// TypeError 4957: (31-48): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.
|
||||
// TypeError 4957: (78-96): This type is only supported in ABIEncoderV2. Use "pragma experimental ABIEncoderV2;" to enable the feature.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (75-83): Member "length" is read-only and cannot be used to resize arrays.
|
||||
// TypeError 7567: (75-83): Member "length" is read-only and cannot be used to resize arrays.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (74-82): Member "pop" is not available in uint256[] memory outside of storage.
|
||||
// TypeError 4994: (74-82): Member "pop" is not available in uint256[] memory outside of storage.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (52-56): Index access for contracts or libraries is not possible.
|
||||
// TypeError 2876: (52-56): Index access for contracts or libraries is not possible.
|
||||
|
||||
@@ -4,4 +4,4 @@ library C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (51-55): Index access for contracts or libraries is not possible.
|
||||
// TypeError 2876: (51-55): Index access for contracts or libraries is not possible.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (75-90): Type too large for memory.
|
||||
// TypeError 6118: (75-90): Type too large for memory.
|
||||
|
||||
+3
-3
@@ -4,6 +4,6 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// DeclarationError: (28-45): The "constant" keyword can only be used for state variables.
|
||||
// TypeError: (69-72): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError: (64-75): Data location must be "storage", "memory" or "calldata" for variable, but none was given.
|
||||
// DeclarationError 1788: (28-45): The "constant" keyword can only be used for state variables.
|
||||
// TypeError 5462: (69-72): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 6651: (64-75): Data location must be "storage", "memory" or "calldata" for variable, but none was given.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
bytes32[8**90] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (25-30): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (25-30): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
bytes32[8**90][500] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (25-30): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (25-30): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (72-91): Member "length" is read-only and cannot be used to resize arrays.
|
||||
// TypeError 7567: (72-91): Member "length" is read-only and cannot be used to resize arrays.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (80-93): Member "length" is read-only and cannot be used to resize arrays.
|
||||
// TypeError 7567: (80-93): Member "length" is read-only and cannot be used to resize arrays.
|
||||
|
||||
@@ -8,4 +8,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (95-105): Member "length" is read-only and cannot be used to resize arrays.
|
||||
// TypeError 7567: (95-105): Member "length" is read-only and cannot be used to resize arrays.
|
||||
|
||||
@@ -3,4 +3,4 @@ contract C {
|
||||
uint[f] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (49-50): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (49-50): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
uint[LEN] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (84-87): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (84-87): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -7,4 +7,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (36-39): Cyclic constant definition (or maximum recursion depth exhausted).
|
||||
// TypeError 5210: (36-39): Cyclic constant definition (or maximum recursion depth exhausted).
|
||||
|
||||
@@ -3,4 +3,4 @@ contract C {
|
||||
uint[L] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (51-52): Array with fractional length specified.
|
||||
// TypeError 3208: (51-52): Array with fractional length specified.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (37-40): Cyclic constant definition (or maximum recursion depth exhausted).
|
||||
// TypeError 5210: (37-40): Cyclic constant definition (or maximum recursion depth exhausted).
|
||||
|
||||
@@ -7,9 +7,9 @@ contract C {
|
||||
function e() public pure returns(string[0][500] memory) {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (52-53): Array with zero length specified.
|
||||
// TypeError: (111-112): Array with zero length specified.
|
||||
// TypeError: (170-171): Array with zero length specified.
|
||||
// TypeError: (232-233): Array with zero length specified.
|
||||
// TypeError: (292-293): Array with zero length specified.
|
||||
// TypeError: (353-354): Array with zero length specified.
|
||||
// TypeError 1406: (52-53): Array with zero length specified.
|
||||
// TypeError 1406: (111-112): Array with zero length specified.
|
||||
// TypeError 1406: (170-171): Array with zero length specified.
|
||||
// TypeError 1406: (232-233): Array with zero length specified.
|
||||
// TypeError 1406: (292-293): Array with zero length specified.
|
||||
// TypeError 1406: (353-354): Array with zero length specified.
|
||||
|
||||
@@ -7,9 +7,9 @@ contract C {
|
||||
string[0] f;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (19-20): Array with zero length specified.
|
||||
// TypeError: (32-33): Array with zero length specified.
|
||||
// TypeError: (45-46): Array with zero length specified.
|
||||
// TypeError: (61-62): Array with zero length specified.
|
||||
// TypeError: (75-76): Array with zero length specified.
|
||||
// TypeError: (90-91): Array with zero length specified.
|
||||
// TypeError 1406: (19-20): Array with zero length specified.
|
||||
// TypeError 1406: (32-33): Array with zero length specified.
|
||||
// TypeError 1406: (45-46): Array with zero length specified.
|
||||
// TypeError 1406: (61-62): Array with zero length specified.
|
||||
// TypeError 1406: (75-76): Array with zero length specified.
|
||||
// TypeError 1406: (90-91): Array with zero length specified.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
uint[[2]] a15;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (22-25): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (22-25): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
uint[-true] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (22-27): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (22-27): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
uint[true/1] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (22-28): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (22-28): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
uint[1/true] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (22-28): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (22-28): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
uint[1.111111E1111111111111] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (22-44): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (22-44): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
uint[3/0] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (22-25): Operator / not compatible with types int_const 3 and int_const 0
|
||||
// TypeError 6020: (22-25): Operator / not compatible with types int_const 3 and int_const 0
|
||||
|
||||
@@ -8,7 +8,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (48-90): Type too large for memory.
|
||||
// TypeError: (96-118): Type too large for memory.
|
||||
// TypeError: (124-153): Type too large for memory.
|
||||
// TypeError: (159-188): Type too large for memory.
|
||||
// TypeError 1534: (48-90): Type too large for memory.
|
||||
// TypeError 1534: (96-118): Type too large for memory.
|
||||
// TypeError 1534: (124-153): Type too large for memory.
|
||||
// TypeError 1534: (159-188): Type too large for memory.
|
||||
|
||||
@@ -3,4 +3,4 @@ contract C {
|
||||
uint[LEN] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (52-55): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (52-55): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
uint[true] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (22-26): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (22-26): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
function f(bytes32[1263941234127518272] memory) public pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (26-61): Type too large for memory.
|
||||
// TypeError 1534: (26-61): Type too large for memory.
|
||||
|
||||
@@ -5,7 +5,7 @@ contract C {
|
||||
function f(uint[2**16][2**16][] memory) public pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (26-66): Type too large for memory.
|
||||
// TypeError: (96-116): Type too large for memory.
|
||||
// TypeError: (146-173): Type too large for memory.
|
||||
// TypeError: (203-230): Type too large for memory.
|
||||
// TypeError 1534: (26-66): Type too large for memory.
|
||||
// TypeError 1534: (96-116): Type too large for memory.
|
||||
// TypeError 1534: (146-173): Type too large for memory.
|
||||
// TypeError 1534: (203-230): Type too large for memory.
|
||||
|
||||
@@ -5,5 +5,5 @@ contract C {
|
||||
function f(uint[2**30][2**30][][] memory) public pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (61-101): Type too large for memory.
|
||||
// TypeError: (131-160): Type too large for memory.
|
||||
// TypeError 1534: (61-101): Type too large for memory.
|
||||
// TypeError 1534: (131-160): Type too large for memory.
|
||||
|
||||
@@ -3,4 +3,4 @@ contract C {
|
||||
uint[LEN] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (72-75): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (72-75): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
uint[8**90] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (22-27): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (22-27): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
uint[(1,2)] a15;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (22-27): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (22-27): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
uint[8**90][500] ids;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (22-27): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (22-27): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (60-67): Length has to be placed in parentheses after the array type for new expression.
|
||||
// TypeError 3904: (60-67): Length has to be placed in parentheses after the array type for new expression.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (63-71): Member "pop" not found or not visible after argument-dependent lookup in uint256.
|
||||
// TypeError 9582: (63-71): Member "pop" not found or not visible after argument-dependent lookup in uint256.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (66-71): Member "pop" is not available in uint256[] calldata outside of storage.
|
||||
// TypeError 4994: (66-71): Member "pop" is not available in uint256[] calldata outside of storage.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (72-77): Member "pop" is not available in uint256[] memory outside of storage.
|
||||
// TypeError 4994: (72-77): Member "pop" is not available in uint256[] memory outside of storage.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (66-72): Member "push" is not available in uint256[] calldata outside of storage.
|
||||
// TypeError 4994: (66-72): Member "push" is not available in uint256[] calldata outside of storage.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (72-78): Member "push" is not available in uint256[] memory outside of storage.
|
||||
// TypeError 4994: (72-78): Member "push" is not available in uint256[] memory outside of storage.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract c {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (63-74): Type bytes calldata slice is not implicitly convertible to expected type bytes storage ref.
|
||||
// TypeError 7407: (63-74): Type bytes calldata slice is not implicitly convertible to expected type bytes storage ref.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (66-72): Index range access is only supported for dynamic calldata arrays.
|
||||
// TypeError 1227: (66-72): Index range access is only supported for dynamic calldata arrays.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (65-71): Index range access is only supported for dynamic calldata arrays.
|
||||
// TypeError 1227: (65-71): Index range access is only supported for dynamic calldata arrays.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (65-88): Type bytes calldata slice is not implicitly convertible to expected type bytes memory.
|
||||
// TypeError 9574: (65-88): Type bytes calldata slice is not implicitly convertible to expected type bytes memory.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (79-85): Invalid type for argument in function call. Invalid implicit conversion from bytes calldata slice to bytes memory requested.
|
||||
// TypeError 9553: (79-85): Invalid type for argument in function call. Invalid implicit conversion from bytes calldata slice to bytes memory requested.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (76-82): Index range access is only supported for dynamic calldata arrays.
|
||||
// TypeError 1227: (76-82): Index range access is only supported for dynamic calldata arrays.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (92-100): Member "a" not found or not visible after argument-dependent lookup in uint256[] calldata slice.
|
||||
// TypeError 9582: (92-100): Member "a" not found or not visible after argument-dependent lookup in uint256[] calldata slice.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (70-76): Index range access is only supported for dynamic calldata arrays.
|
||||
// TypeError 1227: (70-76): Index range access is only supported for dynamic calldata arrays.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (72-78): Index range access is only supported for dynamic calldata arrays.
|
||||
// TypeError 1227: (72-78): Index range access is only supported for dynamic calldata arrays.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (52-57): Index range access is only possible for arrays and array slices.
|
||||
// TypeError 4781: (52-57): Index range access is only possible for arrays and array slices.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (76-82): Index range access is only supported for dynamic calldata arrays.
|
||||
// TypeError 1227: (76-82): Index range access is only supported for dynamic calldata arrays.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (77-83): Index range access is only supported for dynamic calldata arrays.
|
||||
// TypeError 1227: (77-83): Index range access is only supported for dynamic calldata arrays.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (52-58): Index range access is only possible for arrays and array slices.
|
||||
// TypeError 4781: (52-58): Index range access is only possible for arrays and array slices.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (69-75): Index range access is only supported for dynamic calldata arrays.
|
||||
// TypeError 1227: (69-75): Index range access is only supported for dynamic calldata arrays.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (71-77): Index range access is only supported for dynamic calldata arrays.
|
||||
// TypeError 1227: (71-77): Index range access is only supported for dynamic calldata arrays.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (66-74): Member "pop" not found or not visible after argument-dependent lookup in uint256[3] storage ref.
|
||||
// TypeError 9582: (66-74): Member "pop" not found or not visible after argument-dependent lookup in uint256[3] storage ref.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (65-73): Member "pop" not found or not visible after argument-dependent lookup in string storage ref.
|
||||
// TypeError 9582: (65-73): Member "pop" not found or not visible after argument-dependent lookup in string storage ref.
|
||||
|
||||
@@ -7,5 +7,5 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (80-81): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError: (85-86): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (80-81): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
// TypeError 3464: (85-86): This variable is of storage pointer type and can be accessed without prior assignment, which would lead to undefined behaviour.
|
||||
|
||||
@@ -6,4 +6,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (136-140): Member "f" not found or not visible after argument-dependent lookup in bytes memory.
|
||||
// TypeError 9582: (136-140): Member "f" not found or not visible after argument-dependent lookup in bytes memory.
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
contract C {
|
||||
struct S { uint t; }
|
||||
function r() public {
|
||||
S memory x;
|
||||
x.d;
|
||||
}
|
||||
using S for S;
|
||||
}
|
||||
// ----
|
||||
// TypeError 4357: (113-114): Library name expected.
|
||||
@@ -7,4 +7,4 @@ contract test {
|
||||
// ====
|
||||
// EVMVersion: >=spuriousDragon
|
||||
// ----
|
||||
// Warning: (0-27133): Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
|
||||
// Warning 5574: (0-27133): Contract code size exceeds 24576 bytes (a limit introduced in Spurious Dragon). This contract may not be deployable on mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
|
||||
|
||||
@@ -3,5 +3,5 @@ contract C {
|
||||
uint constant b = mulmod(3, 4, 0.1);
|
||||
}
|
||||
// ----
|
||||
// TypeError: (48-51): Invalid type for argument in function call. Invalid implicit conversion from rational_const 1 / 10 to uint256 requested.
|
||||
// TypeError: (89-92): Invalid type for argument in function call. Invalid implicit conversion from rational_const 1 / 10 to uint256 requested.
|
||||
// TypeError 9553: (48-51): Invalid type for argument in function call. Invalid implicit conversion from rational_const 1 / 10 to uint256 requested.
|
||||
// TypeError 9553: (89-92): Invalid type for argument in function call. Invalid implicit conversion from rational_const 1 / 10 to uint256 requested.
|
||||
|
||||
@@ -6,6 +6,6 @@ contract c {
|
||||
uint constant b3 = addmod(3, 4, a2 - 1);
|
||||
}
|
||||
// ----
|
||||
// TypeError: (88-103): Arithmetic modulo zero.
|
||||
// TypeError: (128-144): Arithmetic modulo zero.
|
||||
// TypeError: (169-189): Arithmetic modulo zero.
|
||||
// TypeError 4195: (88-103): Arithmetic modulo zero.
|
||||
// TypeError 4195: (128-144): Arithmetic modulo zero.
|
||||
// TypeError 4195: (169-189): Arithmetic modulo zero.
|
||||
|
||||
@@ -3,4 +3,4 @@ contract C {
|
||||
uint constant y = x();
|
||||
}
|
||||
// ----
|
||||
// TypeError: (74-77): Initial value for constant variable has to be compile-time constant.
|
||||
// TypeError 8349: (74-77): Initial value for constant variable has to be compile-time constant.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
uint constant a = a;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (17-36): The value of the constant a has a cyclic dependency via a.
|
||||
// TypeError 6161: (17-36): The value of the constant a has a cyclic dependency via a.
|
||||
|
||||
@@ -5,6 +5,6 @@ contract C {
|
||||
uint constant d = 2 + a;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (17-40): The value of the constant a has a cyclic dependency via c.
|
||||
// TypeError: (71-129): The value of the constant c has a cyclic dependency via d.
|
||||
// TypeError: (135-158): The value of the constant d has a cyclic dependency via a.
|
||||
// TypeError 6161: (17-40): The value of the constant a has a cyclic dependency via c.
|
||||
// TypeError 6161: (71-129): The value of the constant c has a cyclic dependency via d.
|
||||
// TypeError 6161: (135-158): The value of the constant d has a cyclic dependency via a.
|
||||
|
||||
@@ -5,7 +5,7 @@ contract C {
|
||||
uint constant c = b;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (17-36): The value of the constant x has a cyclic dependency via a.
|
||||
// TypeError: (42-65): The value of the constant a has a cyclic dependency via b.
|
||||
// TypeError: (71-90): The value of the constant b has a cyclic dependency via c.
|
||||
// TypeError: (96-115): The value of the constant c has a cyclic dependency via b.
|
||||
// TypeError 6161: (17-36): The value of the constant x has a cyclic dependency via a.
|
||||
// TypeError 6161: (42-65): The value of the constant a has a cyclic dependency via b.
|
||||
// TypeError 6161: (71-90): The value of the constant b has a cyclic dependency via c.
|
||||
// TypeError 6161: (96-115): The value of the constant c has a cyclic dependency via b.
|
||||
|
||||
@@ -5,5 +5,5 @@ contract c {
|
||||
uint constant b2 = 7 / (a2 - 1);
|
||||
}
|
||||
// ----
|
||||
// TypeError: (88-94): Division by zero.
|
||||
// TypeError: (119-131): Division by zero.
|
||||
// TypeError 1211: (88-94): Division by zero.
|
||||
// TypeError 1211: (119-131): Division by zero.
|
||||
|
||||
@@ -5,5 +5,5 @@ contract c {
|
||||
uint constant b2 = 3 % (a2 - 1);
|
||||
}
|
||||
// ----
|
||||
// TypeError: (88-94): Modulo zero.
|
||||
// TypeError: (119-131): Modulo zero.
|
||||
// TypeError 1211: (88-94): Modulo zero.
|
||||
// TypeError 1211: (119-131): Modulo zero.
|
||||
|
||||
@@ -6,6 +6,6 @@ contract c {
|
||||
uint constant b3 = mulmod(3, 4, a2 - 1);
|
||||
}
|
||||
// ----
|
||||
// TypeError: (88-103): Arithmetic modulo zero.
|
||||
// TypeError: (128-144): Arithmetic modulo zero.
|
||||
// TypeError: (169-189): Arithmetic modulo zero.
|
||||
// TypeError 4195: (88-103): Arithmetic modulo zero.
|
||||
// TypeError 4195: (128-144): Arithmetic modulo zero.
|
||||
// TypeError 4195: (169-189): Arithmetic modulo zero.
|
||||
|
||||
@@ -8,4 +8,4 @@ contract C {
|
||||
uint[c] mem;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (392-393): Invalid array length, expected integer literal or constant expression.
|
||||
// TypeError 5462: (392-393): Invalid array length, expected integer literal or constant expression.
|
||||
|
||||
@@ -12,4 +12,4 @@ contract Parent {
|
||||
contract Child is Parent {
|
||||
}
|
||||
// ----
|
||||
// TypeError: (233-261): Contract "Child" should be marked as abstract.
|
||||
// TypeError 3656: (233-261): Contract "Child" should be marked as abstract.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
contract A { constructor() {} }
|
||||
// ----
|
||||
// SyntaxError: (13-29): No visibility specified. Did you intend to add "public"?
|
||||
// SyntaxError 4937: (13-29): No visibility specified. Did you intend to add "public"?
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
contract A { function A() public {} }
|
||||
// ----
|
||||
// SyntaxError: (13-35): Functions are not allowed to have the same name as the contract. If you intend this to be a constructor, use "constructor(...) { ... }" to define it.
|
||||
// Warning: (13-35): This declaration shadows an existing declaration.
|
||||
// SyntaxError 5796: (13-35): Functions are not allowed to have the same name as the contract. If you intend this to be a constructor, use "constructor(...) { ... }" to define it.
|
||||
// Warning 2519: (13-35): This declaration shadows an existing declaration.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
constructor() override public {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (17-49): Constructors cannot override.
|
||||
// TypeError 1209: (17-49): Constructors cannot override.
|
||||
|
||||
@@ -5,5 +5,5 @@ contract test2 {
|
||||
constructor() public pure {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (19-47): Constructor must be payable or non-payable, but is "view".
|
||||
// TypeError: (69-97): Constructor must be payable or non-payable, but is "pure".
|
||||
// TypeError 1558: (19-47): Constructor must be payable or non-payable, but is "view".
|
||||
// TypeError 1558: (69-97): Constructor must be payable or non-payable, but is "pure".
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
constructor() virtual public {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (17-48): Constructors cannot be virtual.
|
||||
// TypeError 7001: (17-48): Constructors cannot be virtual.
|
||||
|
||||
@@ -9,5 +9,5 @@ contract B is A {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (131-301): Contract "B" should be marked as abstract.
|
||||
// TypeError: (250-254): Explicit type conversion not allowed from "string memory" to "contract A".
|
||||
// TypeError 3656: (131-301): Contract "B" should be marked as abstract.
|
||||
// TypeError 9640: (250-254): Explicit type conversion not allowed from "string memory" to "contract A".
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
constructor() public;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (14-35): Constructor must be implemented if declared.
|
||||
// TypeError 5700: (14-35): Constructor must be implemented if declared.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract test {
|
||||
constructor() external {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (17-42): Constructor must be public or internal.
|
||||
// TypeError 9239: (17-42): Constructor must be public or internal.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
function constructor() public;
|
||||
}
|
||||
// ----
|
||||
// ParserError: (26-37): This function is named "constructor" but is not the constructor of the contract. If you intend this to be a constructor, use "constructor(...) { ... }" without the "function" keyword to define it.
|
||||
// ParserError 3323: (26-37): This function is named "constructor" but is not the constructor of the contract. If you intend this to be a constructor, use "constructor(...) { ... }" without the "function" keyword to define it.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract D {
|
||||
function f() public { C c = new C(); c; }
|
||||
}
|
||||
// ----
|
||||
// TypeError: (84-89): Contract with internal constructor cannot be created directly.
|
||||
// TypeError 9054: (84-89): Contract with internal constructor cannot be created directly.
|
||||
|
||||
+1
-1
@@ -10,4 +10,4 @@ contract A {
|
||||
constructor(address) internal {}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (141-146): Contract with internal constructor cannot be created directly.
|
||||
// TypeError 9054: (141-146): Contract with internal constructor cannot be created directly.
|
||||
|
||||
@@ -2,6 +2,6 @@ interface I {
|
||||
constructor() public;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (15-36): Functions in interfaces must be declared external.
|
||||
// TypeError: (15-36): Constructor cannot be defined in interfaces.
|
||||
// TypeError: (15-36): Constructor must be implemented if declared.
|
||||
// TypeError 1560: (15-36): Functions in interfaces must be declared external.
|
||||
// TypeError 6482: (15-36): Constructor cannot be defined in interfaces.
|
||||
// TypeError 5700: (15-36): Constructor must be implemented if declared.
|
||||
|
||||
@@ -2,5 +2,5 @@ library Lib {
|
||||
constructor() public;
|
||||
}
|
||||
// ----
|
||||
// TypeError: (15-36): Constructor cannot be defined in libraries.
|
||||
// TypeError: (15-36): Constructor must be implemented if declared.
|
||||
// TypeError 7634: (15-36): Constructor cannot be defined in libraries.
|
||||
// TypeError 5700: (15-36): Constructor must be implemented if declared.
|
||||
|
||||
@@ -17,7 +17,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (235-252): Cannot set option "value", since the constructor of contract B1 is not payable.
|
||||
// TypeError: (258-275): Cannot set option "value", since the constructor of contract B2 is not payable.
|
||||
// TypeError: (281-298): Cannot set option "value", since the constructor of contract B3 is not payable.
|
||||
// TypeError: (304-321): Cannot set option "value", since the constructor of contract B4 is not payable.
|
||||
// TypeError 7006: (235-252): Cannot set option "value", since the constructor of contract B1 is not payable.
|
||||
// TypeError 7006: (258-275): Cannot set option "value", since the constructor of contract B2 is not payable.
|
||||
// TypeError 7006: (281-298): Cannot set option "value", since the constructor of contract B3 is not payable.
|
||||
// TypeError 7006: (304-321): Cannot set option "value", since the constructor of contract B4 is not payable.
|
||||
|
||||
@@ -6,4 +6,4 @@ contract Test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (147-152): Identifier is not a contract.
|
||||
// TypeError 5540: (147-152): Identifier is not a contract.
|
||||
|
||||
@@ -6,5 +6,5 @@ contract B is A {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (58-101): This declaration shadows an existing declaration.
|
||||
// TypeError: (130-133): Member "f" not found or not visible after argument-dependent lookup in function () pure returns (uint8).
|
||||
// Warning 2519: (58-101): This declaration shadows an existing declaration.
|
||||
// TypeError 9582: (130-133): Member "f" not found or not visible after argument-dependent lookup in function () pure returns (uint8).
|
||||
|
||||
@@ -2,4 +2,4 @@ contract test {
|
||||
constructor() public returns (uint a) { }
|
||||
}
|
||||
// ----
|
||||
// TypeError: (46-54): Non-empty "returns" directive for constructor.
|
||||
// TypeError 9712: (46-54): Non-empty "returns" directive for constructor.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user