mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
[test] Update tests to include location string.
This commit is contained in:
@@ -6,4 +6,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9582: (129-138): Member "address" not found or not visible after argument-dependent lookup in struct C.S memory.
|
||||
// TypeError 9582: (129-138='s.address'): Member "address" not found or not visible after argument-dependent lookup in struct C.S memory.
|
||||
|
||||
@@ -2,4 +2,4 @@ contract C {
|
||||
struct S { uint address; }
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (33-40): Expected identifier but got 'address'
|
||||
// ParserError 2314: (33-40='address'): Expected identifier but got 'address'
|
||||
|
||||
@@ -6,4 +6,4 @@ contract Test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4156: (144-147): Calldata structs are read-only.
|
||||
// TypeError 4156: (144-147='s.a'): Calldata structs are read-only.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract Test {
|
||||
function f(S calldata s) external { s.a = 4; }
|
||||
}
|
||||
// ----
|
||||
// TypeError 4156: (114-117): Calldata structs are read-only.
|
||||
// TypeError 4156: (114-117='s.a'): Calldata structs are read-only.
|
||||
|
||||
@@ -11,4 +11,4 @@ contract test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (155-167): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
// TypeError 4103: (155-167='S calldata b'): Types containing (nested) mappings can only be parameters or return variables of internal or library functions.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
contract S {}
|
||||
struct S { uint256 a; }
|
||||
// ----
|
||||
// DeclarationError 2333: (14-37): Identifier already declared.
|
||||
// DeclarationError 2333: (14-37='struct S { uint256 a; }'): Identifier already declared.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
struct S { uint256 a; }
|
||||
contract S {}
|
||||
// ----
|
||||
// DeclarationError 2333: (24-37): Identifier already declared.
|
||||
// DeclarationError 2333: (24-37='contract S {}'): Identifier already declared.
|
||||
|
||||
@@ -7,4 +7,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 2519: (38-61): This declaration shadows an existing declaration.
|
||||
// Warning 2519: (38-61='struct S { address x; }'): This declaration shadows an existing declaration.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
struct S { uint256 a; }
|
||||
struct S { uint256 a; }
|
||||
// ----
|
||||
// DeclarationError 2333: (24-47): Identifier already declared.
|
||||
// DeclarationError 2333: (24-47='struct S { uint256 a; }'): Identifier already declared.
|
||||
|
||||
@@ -8,8 +8,8 @@ contract C {
|
||||
_ c;
|
||||
}
|
||||
// ----
|
||||
// DeclarationError 3726: (0-23): The name "this" is reserved.
|
||||
// DeclarationError 3726: (24-48): The name "super" is reserved.
|
||||
// DeclarationError 3726: (49-69): The name "_" is reserved.
|
||||
// Warning 2319: (0-23): This declaration shadows a builtin symbol.
|
||||
// Warning 2319: (24-48): This declaration shadows a builtin symbol.
|
||||
// DeclarationError 3726: (0-23='struct this { uint a; }'): The name "this" is reserved.
|
||||
// DeclarationError 3726: (24-48='struct super { uint b; }'): The name "super" is reserved.
|
||||
// DeclarationError 3726: (49-69='struct _ { uint c; }'): The name "_" is reserved.
|
||||
// Warning 2319: (0-23='struct this { uint a; }'): This declaration shadows a builtin symbol.
|
||||
// Warning 2319: (24-48='struct super { uint b; }'): This declaration shadows a builtin symbol.
|
||||
|
||||
@@ -3,4 +3,4 @@ contract C {
|
||||
function f(function(S memory) external) public {}
|
||||
}
|
||||
// ----
|
||||
// DeclarationError 7920: (25-26): Identifier not found or not unique.
|
||||
// DeclarationError 7920: (25-26='t'): Identifier not found or not unique.
|
||||
|
||||
@@ -5,8 +5,8 @@ contract C {
|
||||
struct U {function (E E) external f;}
|
||||
}
|
||||
// ----
|
||||
// Warning 6162: (58-61): Naming function type parameters is deprecated.
|
||||
// Warning 6162: (108-111): Naming function type parameters is deprecated.
|
||||
// Warning 6162: (158-161): Naming function type parameters is deprecated.
|
||||
// Warning 2519: (108-111): This declaration shadows an existing declaration.
|
||||
// Warning 2519: (158-161): This declaration shadows an existing declaration.
|
||||
// Warning 6162: (58-61='E X'): Naming function type parameters is deprecated.
|
||||
// Warning 6162: (108-111='E T'): Naming function type parameters is deprecated.
|
||||
// Warning 6162: (158-161='E E'): Naming function type parameters is deprecated.
|
||||
// Warning 2519: (108-111='E T'): This declaration shadows an existing declaration.
|
||||
// Warning 2519: (158-161='E E'): This declaration shadows an existing declaration.
|
||||
|
||||
@@ -4,4 +4,4 @@ contract C {
|
||||
function g(function(S memory) external) public {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 5172: (50-51): Name has to refer to a struct, enum or contract.
|
||||
// TypeError 5172: (50-51='f'): Name has to refer to a struct, enum or contract.
|
||||
|
||||
@@ -5,5 +5,5 @@ contract Test {
|
||||
function g(S calldata s) external { S memory m; s = m; }
|
||||
}
|
||||
// ----
|
||||
// TypeError 7407: (118-122): Type struct Test.S memory is not implicitly convertible to expected type struct Test.S calldata.
|
||||
// TypeError 7407: (182-183): Type struct Test.S memory is not implicitly convertible to expected type struct Test.S calldata.
|
||||
// TypeError 7407: (118-122='S(2)'): Type struct Test.S memory is not implicitly convertible to expected type struct Test.S calldata.
|
||||
// TypeError 7407: (182-183='m'): Type struct Test.S memory is not implicitly convertible to expected type struct Test.S calldata.
|
||||
|
||||
+1
-1
@@ -9,4 +9,4 @@ contract Test {
|
||||
function f(MyStructName memory s) public {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (147-168): Recursive type not allowed for public or external contract functions.
|
||||
// TypeError 4103: (147-168='MyStructName memory s'): Recursive type not allowed for public or external contract functions.
|
||||
|
||||
+1
-1
@@ -10,4 +10,4 @@ library Test {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (146-168): Recursive structs can only be passed as storage pointers to libraries, not as memory objects to contract functions.
|
||||
// TypeError 4103: (146-168='MyStructName memory _x'): Recursive structs can only be passed as storage pointers to libraries, not as memory objects to contract functions.
|
||||
|
||||
+1
-1
@@ -7,4 +7,4 @@ contract Data {
|
||||
struct S { S[] x; }
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (63-78): Recursive type not allowed for public or external contract functions.
|
||||
// TypeError 4103: (63-78='Data.S memory a'): Recursive type not allowed for public or external contract functions.
|
||||
|
||||
+1
-1
@@ -6,4 +6,4 @@ library a {
|
||||
function d(b memory) public {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (149-157): Recursive structs can only be passed as storage pointers to libraries, not as memory objects to contract functions.
|
||||
// TypeError 4103: (149-157='b memory'): Recursive structs can only be passed as storage pointers to libraries, not as memory objects to contract functions.
|
||||
|
||||
+1
-1
@@ -8,4 +8,4 @@ library Test {
|
||||
function f(MyStructName storage s) public {}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (142-164): Internal type is not allowed for public or external functions.
|
||||
// TypeError 4103: (142-164='MyStructName storage s'): Internal type is not allowed for public or external functions.
|
||||
|
||||
@@ -6,4 +6,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (126-134): Recursive type not allowed for public or external contract functions.
|
||||
// TypeError 4103: (126-134='S memory'): Recursive type not allowed for public or external contract functions.
|
||||
|
||||
@@ -6,4 +6,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (129-137): Recursive type not allowed for public or external contract functions.
|
||||
// TypeError 4103: (129-137='S memory'): Recursive type not allowed for public or external contract functions.
|
||||
|
||||
@@ -7,4 +7,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4103: (154-164): Recursive type not allowed for public or external contract functions.
|
||||
// TypeError 4103: (154-164='T memory t'): Recursive type not allowed for public or external contract functions.
|
||||
|
||||
Reference in New Issue
Block a user