[test] Update tests to include location string.

This commit is contained in:
Alexander Arlt
2022-04-01 23:41:18 -05:00
parent d4c02f2270
commit 0783ad9000
2684 changed files with 5877 additions and 5877 deletions
@@ -6,4 +6,4 @@ contract C {
}
}
// ----
// TypeError 9428: (68-71): Can only use modifiers defined in the current contract or in base contracts.
// TypeError 9428: (68-71='L.m'): Can only use modifiers defined in the current contract or in base contracts.
@@ -3,5 +3,5 @@ contract B is C {
constructor() C(2) C(2) {}
}
// ----
// DeclarationError 3364: (74-78): Base constructor arguments given twice.
// DeclarationError 1697: (79-83): Base constructor already provided.
// DeclarationError 3364: (74-78='C(2)'): Base constructor arguments given twice.
// DeclarationError 1697: (79-83='C(2)'): Base constructor already provided.
@@ -2,4 +2,4 @@ contract C {
constructor() C() {}
}
// ----
// TypeError 4659: (31-34): Referenced declaration is neither modifier nor base class.
// TypeError 4659: (31-34='C()'): Referenced declaration is neither modifier nor base class.
@@ -6,4 +6,4 @@ contract D is C {
constructor() C(5) {}
}
// ----
// TypeError 2973: (120-124): Wrong argument count for modifier invocation: 1 arguments given but expected 0.
// TypeError 2973: (120-124='C(5)'): Wrong argument count for modifier invocation: 1 arguments given but expected 0.
@@ -6,4 +6,4 @@ contract D {
}
}
// ----
// TypeError 9428: (69-72): Can only use modifiers defined in the current contract or in base contracts.
// TypeError 9428: (69-72='C.m'): Can only use modifiers defined in the current contract or in base contracts.
@@ -6,4 +6,4 @@ contract D is C {
}
}
// ----
// DeclarationError 7920: (74-81): Identifier not found or not unique.
// DeclarationError 7920: (74-81='super.m'): Identifier not found or not unique.
@@ -8,4 +8,4 @@ contract D is A {
}
contract T is D, C {}
// ----
// TypeError 9428: (93-96): Can only use modifiers defined in the current contract or in base contracts.
// TypeError 9428: (93-96='C.m'): Can only use modifiers defined in the current contract or in base contracts.
@@ -4,4 +4,4 @@ contract C {
}
// ----
// TypeError 3656: (0-57): Contract "C" should be marked as abstract.
// TypeError 8063: (17-29): Modifiers without implementation must be marked virtual.
// TypeError 8063: (17-29='modifier mu;'): Modifiers without implementation must be marked virtual.
@@ -5,8 +5,8 @@ interface I {
modifier muv virtual;
}
// ----
// TypeError 6408: (18-35): Modifiers cannot be defined or declared in interfaces.
// TypeError 6408: (40-52): Modifiers cannot be defined or declared in interfaces.
// TypeError 8063: (40-52): Modifiers without implementation must be marked virtual.
// TypeError 6408: (57-83): Modifiers cannot be defined or declared in interfaces.
// TypeError 6408: (88-109): Modifiers cannot be defined or declared in interfaces.
// TypeError 6408: (18-35='modifier m { _; }'): Modifiers cannot be defined or declared in interfaces.
// TypeError 6408: (40-52='modifier mu;'): Modifiers cannot be defined or declared in interfaces.
// TypeError 8063: (40-52='modifier mu;'): Modifiers without implementation must be marked virtual.
// TypeError 6408: (57-83='modifier mv virtual { _; }'): Modifiers cannot be defined or declared in interfaces.
// TypeError 6408: (88-109='modifier muv virtual;'): Modifiers cannot be defined or declared in interfaces.
@@ -2,4 +2,4 @@ library L {
modifier mv virtual { _; }
}
// ----
// TypeError 3275: (16-42): Modifiers in a library cannot be virtual.
// TypeError 3275: (16-42='modifier mv virtual { _; }'): Modifiers in a library cannot be virtual.
@@ -3,5 +3,5 @@ library L {
modifier muv virtual;
}
// ----
// TypeError 8063: (16-28): Modifiers without implementation must be marked virtual.
// TypeError 3275: (33-54): Modifiers in a library cannot be virtual.
// TypeError 8063: (16-28='modifier mu;'): Modifiers without implementation must be marked virtual.
// TypeError 3275: (33-54='modifier muv virtual;'): Modifiers in a library cannot be virtual.
@@ -5,6 +5,6 @@ contract C is B { }
abstract contract D {modifier m;}
// ----
// TypeError 3656: (0-32): Contract "A" should be marked as abstract.
// TypeError 3656: (76-95): Contract "C" should be marked as abstract.
// TypeError 8063: (118-129): Modifiers without implementation must be marked virtual.
// TypeError 3656: (0-32='contract A {modifier m virtual;}'): Contract "A" should be marked as abstract.
// TypeError 3656: (76-95='contract C is B { }'): Contract "C" should be marked as abstract.
// TypeError 8063: (118-129='modifier m;'): Modifiers without implementation must be marked virtual.
@@ -3,4 +3,4 @@ contract B {
modifier mod(uint a) { if (a > 0) _; }
}
// ----
// DeclarationError 7576: (34-35): Undeclared identifier.
// DeclarationError 7576: (34-35='x'): Undeclared identifier.
@@ -1,5 +1,5 @@
contract A { function mod(uint a) public { } }
contract B is A { modifier mod(uint a) { _; } }
// ----
// DeclarationError 9097: (65-92): Identifier already declared.
// TypeError 5631: (65-92): Override changes function or public state variable to modifier.
// DeclarationError 9097: (65-92='modifier mod(uint a) { _; }'): Identifier already declared.
// TypeError 5631: (65-92='modifier mod(uint a) { _; }'): Override changes function or public state variable to modifier.
@@ -1,6 +1,6 @@
contract A { modifier mod(uint a) { _; } }
contract B is A { modifier mod(uint8 a) { _; } }
// ----
// TypeError 1078: (61-89): Override changes modifier signature.
// TypeError 9456: (61-89): Overriding modifier is missing "override" specifier.
// TypeError 4334: (13-40): Trying to override non-virtual modifier. Did you forget to add "virtual"?
// TypeError 1078: (61-89='modifier mod(uint8 a) { _; }'): Override changes modifier signature.
// TypeError 9456: (61-89='modifier mod(uint8 a) { _; }'): Overriding modifier is missing "override" specifier.
// TypeError 4334: (13-40='modifier mod(uint a) { _; }'): Trying to override non-virtual modifier. Did you forget to add "virtual"?
@@ -4,8 +4,8 @@ contract C {
modifier _ { _; }
}
// ----
// DeclarationError 3726: (14-34): The name "this" is reserved.
// DeclarationError 3726: (36-57): The name "super" is reserved.
// DeclarationError 3726: (59-76): The name "_" is reserved.
// Warning 2319: (14-34): This declaration shadows a builtin symbol.
// Warning 2319: (36-57): This declaration shadows a builtin symbol.
// DeclarationError 3726: (14-34='modifier this { _; }'): The name "this" is reserved.
// DeclarationError 3726: (36-57='modifier super { _; }'): The name "super" is reserved.
// DeclarationError 3726: (59-76='modifier _ { _; }'): The name "_" is reserved.
// Warning 2319: (14-34='modifier this { _; }'): This declaration shadows a builtin symbol.
// Warning 2319: (36-57='modifier super { _; }'): This declaration shadows a builtin symbol.
@@ -3,4 +3,4 @@ contract B {
modifier mod1(uint a) { if (a > 0) _; }
}
// ----
// TypeError 4649: (35-39): Invalid type for argument in modifier invocation. Invalid implicit conversion from bool to uint256 requested.
// TypeError 4649: (35-39='true'): Invalid type for argument in modifier invocation. Invalid implicit conversion from bool to uint256 requested.
@@ -7,4 +7,4 @@ contract C {
}
}
// ----
// TypeError 9428: (87-90): Can only use modifiers defined in the current contract or in base contracts.
// TypeError 9428: (87-90='L.m'): Can only use modifiers defined in the current contract or in base contracts.
@@ -8,4 +8,4 @@ contract C is B {
function f() m public {}
}
// ----
// TypeError 4593: (78-108): Overriding an implemented modifier with an unimplemented modifier is not allowed.
// TypeError 4593: (78-108='modifier m() virtual override;'): Overriding an implemented modifier with an unimplemented modifier is not allowed.
@@ -1,5 +1,5 @@
contract A { modifier mod(uint a) { _; } }
contract B is A { function mod(uint a) public { } }
// ----
// DeclarationError 9097: (61-92): Identifier already declared.
// TypeError 1469: (61-92): Override changes modifier to function.
// DeclarationError 9097: (61-92='function mod(uint a) public { }'): Identifier already declared.
// TypeError 1469: (61-92='function mod(uint a) public { }'): Override changes modifier to function.
@@ -1,5 +1,5 @@
contract A { modifier mod(uint a) { _; } }
contract B is A { uint public mod; }
// ----
// DeclarationError 9097: (61-76): Identifier already declared.
// TypeError 1456: (61-76): Override changes modifier to public state variable.
// DeclarationError 9097: (61-76='uint public mod'): Identifier already declared.
// TypeError 1456: (61-76='uint public mod'): Override changes modifier to public state variable.
@@ -3,4 +3,4 @@ contract A {
modifier mod(uint a) { _; return 7; }
}
// ----
// TypeError 7552: (101-109): Return arguments not allowed.
// TypeError 7552: (101-109='return 7'): Return arguments not allowed.
@@ -2,4 +2,4 @@ contract test {
modifier m() {}
}
// ----
// SyntaxError 2883: (33-35): Modifier body does not contain '_'.
// SyntaxError 2883: (33-35='{}'): Modifier body does not contain '_'.
@@ -1,4 +1,4 @@
contract A { modifier mod(uint a) { _; } }
contract B is A { modifier mod(uint a) override { _; } }
// ----
// TypeError 4334: (13-40): Trying to override non-virtual modifier. Did you forget to add "virtual"?
// TypeError 4334: (13-40='modifier mod(uint a) { _; }'): Trying to override non-virtual modifier. Did you forget to add "virtual"?
@@ -6,4 +6,4 @@ contract test {
}
}
// ----
// TypeError 3112: (77-80): Modifier can only be referenced in function headers.
// TypeError 3112: (77-80='mod'): Modifier can only be referenced in function headers.
@@ -4,4 +4,4 @@ interface I {
}
// ----
// SyntaxError 5842: (16-60): Functions in interfaces cannot have modifiers.
// TypeError 6408: (63-82): Modifiers cannot be defined or declared in interfaces.
// TypeError 6408: (63-82='modifier m() { _; }'): Modifiers cannot be defined or declared in interfaces.
@@ -9,4 +9,4 @@ contract C is A, B {
function f() B.m public {}
}
// ----
// TypeError 1835: (174-177): Cannot call unimplemented modifier. The modifier has no implementation in the referenced contract. Refer to it by its unqualified name if you want to call the implementation from the most derived contract.
// TypeError 1835: (174-177='B.m'): Cannot call unimplemented modifier. The modifier has no implementation in the referenced contract. Refer to it by its unqualified name if you want to call the implementation from the most derived contract.