[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
@@ -16,4 +16,4 @@ contract C {
}
}
// ----
// ParserError 2314: (156-157): Expected identifier but got '*'
// ParserError 2314: (156-157='*'): Expected identifier but got '*'
@@ -19,4 +19,4 @@ function f() pure {
y = y.id();
}
// ----
// TypeError 9582: (B:57-61): Member "id" not found or not visible after argument-dependent lookup in uint256.
// TypeError 9582: (B:57-61='y.id'): Member "id" not found or not visible after argument-dependent lookup in uint256.
@@ -5,4 +5,4 @@ contract C {
using {id} for uint256;
}
// ----
// TypeError 3100: (85-87): The function "id" cannot be bound to the type "uint256" because the type cannot be implicitly converted to the first argument of the function ("uint16").
// TypeError 3100: (85-87='id'): The function "id" cannot be bound to the type "uint256" because the type cannot be implicitly converted to the first argument of the function ("uint16").
@@ -9,4 +9,4 @@ contract C {
using {id} for uint256;
}
// ----
// DeclarationError 7920: (145-147): Identifier not found or not unique.
// DeclarationError 7920: (145-147='id'): Identifier not found or not unique.
@@ -7,4 +7,4 @@ function f(int8 storage x) pure returns (int) {
using {f} for uint8;
using {f} for int;
// ----
// DeclarationError 7920: (132-133): Identifier not found or not unique.
// DeclarationError 7920: (132-133='f'): Identifier not found or not unique.
@@ -6,4 +6,4 @@ function f(uint x, uint y) pure returns (int) {
}
using {f} for uint;
// ----
// DeclarationError 7920: (138-139): Identifier not found or not unique.
// DeclarationError 7920: (138-139='f'): Identifier not found or not unique.
@@ -1,5 +1,5 @@
using {f} for * global;
function f(uint) pure{}
// ----
// SyntaxError 8118: (0-23): The type has to be specified explicitly at file level (cannot use '*').
// SyntaxError 2854: (0-23): Can only globally bind functions to specific types.
// SyntaxError 8118: (0-23='using {f} for * global;'): The type has to be specified explicitly at file level (cannot use '*').
// SyntaxError 2854: (0-23='using {f} for * global;'): Can only globally bind functions to specific types.
@@ -1,4 +1,4 @@
using {f} for uint global;
function f(uint) pure{}
// ----
// TypeError 8841: (0-26): Can only use "global" with user-defined types.
// TypeError 8841: (0-26='using {f} for uint global;'): Can only use "global" with user-defined types.
@@ -4,4 +4,4 @@ library L {
struct S { uint x; }
}
// ----
// TypeError 4117: (0-25): Can only use "global" with types defined in the same source unit at file level.
// TypeError 4117: (0-25='using {f} for L.S global;'): Can only use "global" with types defined in the same source unit at file level.
@@ -10,5 +10,5 @@ function f(S memory) pure{}
import {S} from "A";
import "A" as A;
// ----
// TypeError 4117: (B:1-24): Can only use "global" with types defined in the same source unit at file level.
// TypeError 4117: (B:25-50): Can only use "global" with types defined in the same source unit at file level.
// TypeError 4117: (B:1-24='using {f} for S global;'): Can only use "global" with types defined in the same source unit at file level.
// TypeError 4117: (B:25-50='using {f} for A.S global;'): Can only use "global" with types defined in the same source unit at file level.
@@ -3,5 +3,5 @@ contract C {
}
function f(uint) pure{}
// ----
// SyntaxError 3367: (17-43): "global" can only be used at file level.
// TypeError 8841: (17-43): Can only use "global" with user-defined types.
// SyntaxError 3367: (17-43='using {f} for uint global;'): "global" can only be used at file level.
// TypeError 8841: (17-43='using {f} for uint global;'): Can only use "global" with user-defined types.
@@ -18,4 +18,4 @@ contract C {
import {gen as g, f1 as f, S} from "A";
import "A" as A;
// ----
// TypeError 6675: (B:181-186): Member "f" not unique after argument-dependent lookup in struct S memory.
// TypeError 6675: (B:181-186='g().f'): Member "f" not unique after argument-dependent lookup in struct S memory.
@@ -14,4 +14,4 @@ function test() pure
}
// ----
// TypeError 9582: (B:54-61): Member "g" not found or not visible after argument-dependent lookup in struct S memory.
// TypeError 9582: (B:54-61='gen().g'): Member "g" not found or not visible after argument-dependent lookup in struct S memory.
@@ -11,4 +11,4 @@ contract C {
}
}
// ----
// DeclarationError 7920: (115-123): Identifier not found or not unique.
// DeclarationError 7920: (115-123='L.id_ext'): Identifier not found or not unique.
@@ -9,4 +9,4 @@ contract C {
using M for uint;
}
// ----
// TypeError 4357: (B:40-41): Library name expected. If you want to attach a function, use '{...}'.
// TypeError 4357: (B:40-41='M'): Library name expected. If you want to attach a function, use '{...}'.
@@ -10,4 +10,4 @@ contract C {
using { id } for uint;
}
// ----
// DeclarationError 7920: (B:43-45): Identifier not found or not unique.
// DeclarationError 7920: (B:43-45='id'): Identifier not found or not unique.
@@ -10,4 +10,4 @@ contract Test {
using C for uint;
}
// ----
// TypeError 4357: (127-128): Library name expected. If you want to attach a function, use '{...}'.
// TypeError 4357: (127-128='C'): Library name expected. If you want to attach a function, use '{...}'.
@@ -2,4 +2,4 @@ contract C {
using {} for uint;
}
// ----
// ParserError 2314: (24-25): Expected identifier but got '}'
// ParserError 2314: (24-25='}'): Expected identifier but got '}'
@@ -1,3 +1,3 @@
using {} for uint;
// ----
// ParserError 2314: (7-8): Expected identifier but got '}'
// ParserError 2314: (7-8='}'): Expected identifier but got '}'
@@ -4,4 +4,4 @@ function id(uint x) pure returns (uint) {
using {id} for *;
// ----
// SyntaxError 8118: (59-76): The type has to be specified explicitly at file level (cannot use '*').
// SyntaxError 8118: (59-76='using {id} for *;'): The type has to be specified explicitly at file level (cannot use '*').
@@ -4,4 +4,4 @@ function one() pure returns(uint) {
using {one} for uint;
// ----
// TypeError 4731: (60-63): The function "one" does not have any parameters, and therefore cannot be bound to the type "uint256".
// TypeError 4731: (60-63='one'): The function "one" does not have any parameters, and therefore cannot be bound to the type "uint256".
@@ -4,4 +4,4 @@ contract C {
using {f} for *;
}
// ----
// SyntaxError 3349: (38-54): The type has to be specified explicitly when attaching specific functions.
// SyntaxError 3349: (38-54='using {f} for *;'): The type has to be specified explicitly when attaching specific functions.
@@ -1,3 +1,3 @@
using * for uint;
// ----
// ParserError 2314: (6-7): Expected identifier but got '*'
// ParserError 2314: (6-7='*'): Expected identifier but got '*'
@@ -2,4 +2,4 @@ contract C {
using * for uint;
}
// ----
// ParserError 2314: (23-24): Expected identifier but got '*'
// ParserError 2314: (23-24='*'): Expected identifier but got '*'
@@ -1,4 +1,4 @@
library L { }
using L for *;
// ----
// SyntaxError 8118: (14-28): The type has to be specified explicitly at file level (cannot use '*').
// SyntaxError 8118: (14-28='using L for *;'): The type has to be specified explicitly at file level (cannot use '*').
@@ -5,5 +5,5 @@ contract C {
function g(uint) public { }
}
// ----
// TypeError 4167: (24-25): Only file-level functions and library functions can be bound to a type in a "using" statement
// TypeError 4167: (27-28): Only file-level functions and library functions can be bound to a type in a "using" statement
// TypeError 4167: (24-25='f'): Only file-level functions and library functions can be bound to a type in a "using" statement
// TypeError 4167: (27-28='g'): Only file-level functions and library functions can be bound to a type in a "using" statement
@@ -3,4 +3,4 @@ contract C {
using {x} for uint;
}
// ----
// TypeError 8187: (56-57): Expected function name.
// TypeError 8187: (56-57='x'): Expected function name.