Skip to content

Commit e38139c

Browse files
christianparpartChristian Parpart
authored andcommitted
test: Adapted to the change of the var-keyword elimination.
1 parent a083ccd commit e38139c

50 files changed

Lines changed: 119 additions & 320 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

test/libsolidity/syntaxTests/empty_string_var.sol

Lines changed: 0 additions & 11 deletions
This file was deleted.

test/libsolidity/syntaxTests/functionTypes/delete_function_type.sol

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,13 @@ contract C {
33
function(uint) internal returns (uint) y;
44
function f() public {
55
delete x;
6-
var a = y;
6+
function(uint) internal returns (uint) a = y;
77
delete a;
88
delete y;
9-
var c = f;
9+
function() internal c = f;
1010
delete c;
1111
function(uint) internal returns (uint) g;
1212
delete g;
1313
}
1414
}
1515
// ----
16-
// Warning: (157-162): Use of the "var" keyword is deprecated.
17-
// Warning: (212-217): Use of the "var" keyword is deprecated.

test/libsolidity/syntaxTests/nameAndTypeResolution/005_type_inference_smoke_test.sol

Lines changed: 0 additions & 8 deletions
This file was deleted.

test/libsolidity/syntaxTests/nameAndTypeResolution/012_type_inference_explicit_conversion.sol

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
contract test {
2-
function f() public { var x = "123456789012345678901234567890123"; }
2+
function f() public { string memory x = "123456789012345678901234567890123"; }
33
}
44
// ----
5-
// Warning: (42-47): Use of the "var" keyword is deprecated.
6-
// Warning: (42-47): Unused local variable.
7-
// Warning: (20-88): Function state mutability can be restricted to pure
5+
// Warning: (42-57): Unused local variable.
6+
// Warning: (20-98): Function state mutability can be restricted to pure

test/libsolidity/syntaxTests/nameAndTypeResolution/016_assignment_to_mapping.sol

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ contract test {
44
}
55
str data;
66
function fun() public {
7-
var a = data.map;
7+
mapping(uint=>uint) a = data.map;
88
data.map = a;
99
}
1010
}
1111
// ----
12-
// Warning: (122-127): Use of the "var" keyword is deprecated.
13-
// TypeError: (148-160): Mappings cannot be assigned to.
12+
// TypeError: (164-176): Mappings cannot be assigned to.

test/libsolidity/syntaxTests/nameAndTypeResolution/017_assignment_to_struct.sol

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ contract test {
44
}
55
str data;
66
function fun() public {
7-
var a = data;
7+
str storage a = data;
88
data = a;
99
}
1010
}
1111
// ----
12-
// Warning: (122-127): Use of the "var" keyword is deprecated.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
contract C {
22
mapping(uint => uint) x;
33
function f() public returns (bool ret) {
4-
var y = x;
4+
mapping(uint => uint) y = x;
55
return x == y;
66
}
77
}
88
// ----
9-
// Warning: (95-100): Use of the "var" keyword is deprecated.
10-
// TypeError: (121-127): Operator == not compatible with types mapping(uint256 => uint256) and mapping(uint256 => uint256)
9+
// TypeError: (139-145): Operator == not compatible with types mapping(uint256 => uint256) and mapping(uint256 => uint256)

test/libsolidity/syntaxTests/nameAndTypeResolution/109_disallow_declaration_of_void_type.sol

Lines changed: 0 additions & 7 deletions
This file was deleted.

test/libsolidity/syntaxTests/nameAndTypeResolution/120_warn_var_from_uint8.sol

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)