Skip to content

Commit 430c846

Browse files
fixup! Add and update tests
1 parent 0f382f5 commit 430c846

File tree

14 files changed

+55
-25
lines changed

14 files changed

+55
-25
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Warning: "memoryguard" will be promoted to reserved Yul identifier in the next breaking version and will not be allowed anymore as an identifier.
2+
--> input.sol:10:20:
3+
|
4+
10 | assembly { function memoryguard() {} }
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
6+
7+
Warning: "memoryguard" will be promoted to reserved Yul identifier in the next breaking version and will not be allowed anymore as an identifier.
8+
--> input.sol:11:31:
9+
|
10+
11 | assembly { function f(memoryguard) {} }
11+
| ^^^^^^^^^^^
12+
13+
Warning: "memoryguard" will be promoted to reserved Yul identifier in the next breaking version and will not be allowed anymore as an identifier.
14+
--> input.sol:12:36:
15+
|
16+
12 | assembly { function f() -> memoryguard {} }
17+
| ^^^^^^^^^^^
18+
19+
Warning: "memoryguard" will be promoted to reserved Yul identifier in the next breaking version and will not be allowed anymore as an identifier.
20+
--> input.sol:13:24:
21+
|
22+
13 | assembly { let memoryguard }
23+
| ^^^^^^^^^^^

test/libsolidity/syntaxTests/duplicateFunctions/illegal_names_functions.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ contract C {
1010
}
1111
}
1212
// ----
13-
// Warning 6335: (84-117): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
14-
// Warning 6335: (123-155): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
1513
// DeclarationError 3726: (17-78): The name "_" is reserved.
1614
// DeclarationError 3726: (84-117): The name "super" is reserved.
15+
// Warning 6335: (84-117): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
1716
// DeclarationError 3726: (123-155): The name "this" is reserved.
17+
// Warning 6335: (123-155): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
1818
// Warning 2319: (84-117): This declaration shadows a builtin symbol.
1919
// Warning 2319: (123-155): This declaration shadows a builtin symbol.

test/libsolidity/syntaxTests/enums/illegal_names.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ contract C {
2121
E e;
2222
}
2323
// ----
24-
// Warning 6335: (0-19): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
25-
// Warning 6335: (20-40): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
26-
// Warning 6335: (72-76): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
27-
// Warning 6335: (82-87): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
2824
// DeclarationError 3726: (0-19): The name "this" is reserved.
25+
// Warning 6335: (0-19): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
2926
// DeclarationError 3726: (20-40): The name "super" is reserved.
27+
// Warning 6335: (20-40): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
3028
// DeclarationError 3726: (41-57): The name "_" is reserved.
3129
// DeclarationError 3726: (72-76): The name "this" is reserved.
30+
// Warning 6335: (72-76): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
3231
// DeclarationError 3726: (82-87): The name "super" is reserved.
32+
// Warning 6335: (82-87): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
3333
// DeclarationError 3726: (93-94): The name "_" is reserved.
3434
// Warning 2319: (0-19): This declaration shadows a builtin symbol.
3535
// Warning 2319: (20-40): This declaration shadows a builtin symbol.

test/libsolidity/syntaxTests/errors/struct_named_error.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ contract C {
44
error x;
55
}
66
// ----
7+
// Warning 6335: (52-74): "error" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.

test/libsolidity/syntaxTests/freeFunctions/illegal_names.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ contract C {
1010
}
1111
}
1212
// ----
13-
// Warning 6335: (0-18): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
14-
// Warning 6335: (19-38): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
1513
// DeclarationError 3726: (0-18): The name "this" is reserved.
14+
// Warning 6335: (0-18): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
1615
// DeclarationError 3726: (19-38): The name "super" is reserved.
16+
// Warning 6335: (19-38): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
1717
// DeclarationError 3726: (39-54): The name "_" is reserved.
1818
// Warning 2319: (0-18): This declaration shadows a builtin symbol.
1919
// Warning 2319: (19-38): This declaration shadows a builtin symbol.

test/libsolidity/syntaxTests/functionTypes/function_type_with_transient_param.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ contract C {
44
}
55
// ----
66
// Warning 6162: (27-41): Naming function type parameters is deprecated.
7-
// Warning 6335: (27-41): "transient" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
87
// Warning 6162: (69-85): Naming function type parameters is deprecated.
8+
// Warning 6335: (27-41): "transient" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
99
// Warning 6335: (69-85): "transient" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
1010
// TypeError 6651: (69-85): Data location must be "memory" or "calldata" for parameter in function, but none was given.

test/libsolidity/syntaxTests/immutable/illegal_names.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ contract C {
44
uint immutable this;
55
}
66
// ----
7-
// Warning 6335: (17-37): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
8-
// Warning 6335: (65-84): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
97
// DeclarationError 3726: (17-37): The name "super" is reserved.
8+
// Warning 6335: (17-37): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
109
// DeclarationError 3726: (43-59): The name "_" is reserved.
1110
// DeclarationError 3726: (65-84): The name "this" is reserved.
11+
// Warning 6335: (65-84): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
1212
// Warning 2319: (17-37): This declaration shadows a builtin symbol.
1313
// Warning 2319: (65-84): This declaration shadows a builtin symbol.

test/libsolidity/syntaxTests/modifiers/illegal_name.sol

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ contract C {
55
}
66
// ----
77
// DeclarationError 3726: (14-34): The name "this" is reserved.
8+
// Warning 6335: (14-34): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
89
// DeclarationError 3726: (36-57): The name "super" is reserved.
10+
// Warning 6335: (36-57): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
911
// DeclarationError 3726: (59-76): The name "_" is reserved.
1012
// Warning 2319: (14-34): This declaration shadows a builtin symbol.
1113
// Warning 2319: (36-57): This declaration shadows a builtin symbol.

test/libsolidity/syntaxTests/nameAndTypeResolution/shadowsBuiltin/illegal_names_function_parameters.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ contract C {
1616
}
1717
}
1818
// ----
19-
// Warning 6335: (28-38): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
20-
// Warning 6335: (70-79): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
21-
// Warning 6335: (167-177): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
22-
// Warning 6335: (238-247): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
2319
// DeclarationError 3726: (28-38): The name "super" is reserved.
20+
// Warning 6335: (28-38): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
2421
// DeclarationError 3726: (70-79): The name "this" is reserved.
22+
// Warning 6335: (70-79): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
2523
// DeclarationError 3726: (111-117): The name "_" is reserved.
2624
// DeclarationError 3726: (167-177): The name "super" is reserved.
25+
// Warning 6335: (167-177): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
2726
// DeclarationError 3726: (238-247): The name "this" is reserved.
27+
// Warning 6335: (238-247): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
2828
// DeclarationError 3726: (308-314): The name "_" is reserved.
2929
// Warning 2319: (28-38): This declaration shadows a builtin symbol.
3030
// Warning 2319: (70-79): This declaration shadows a builtin symbol.

test/libsolidity/syntaxTests/nameAndTypeResolution/shadowsBuiltin/illegal_names_library_using_for.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ contract C {
1919
using _ for int;
2020
}
2121
// ----
22-
// Warning 6335: (0-49): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
23-
// Warning 6335: (51-99): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
2422
// DeclarationError 3726: (0-49): The name "super" is reserved.
23+
// Warning 6335: (0-49): "super" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
2524
// DeclarationError 3726: (51-99): The name "this" is reserved.
25+
// Warning 6335: (51-99): "this" will be promoted to keyword in the next breaking version and will not be allowed as an identifier anymore.
2626
// DeclarationError 3726: (100-145): The name "_" is reserved.
2727
// Warning 2319: (0-49): This declaration shadows a builtin symbol.
2828
// Warning 2319: (51-99): This declaration shadows a builtin symbol.

0 commit comments

Comments
 (0)