diff --git a/test/libsolidity/semanticTests/enums/enum_with_256_members.sol b/test/libsolidity/semanticTests/enums/enum_with_256_members.sol index dbb21c47f..ea94bc0c1 100644 --- a/test/libsolidity/semanticTests/enums/enum_with_256_members.sol +++ b/test/libsolidity/semanticTests/enums/enum_with_256_members.sol @@ -1,5 +1,4 @@ -pragma experimental ABIEncoderV2; - +pragma abicoder v2; enum E { E000, E001, E002, E003, E004, E005, E006, E007, E008, E009, E010, E011, E012, E013, E014, E015, E016, E017, E018, E019, diff --git a/test/libsolidity/semanticTests/types/mapping_enum_key_library_encoderV2.sol b/test/libsolidity/semanticTests/types/mapping_enum_key_library_v2.sol similarity index 96% rename from test/libsolidity/semanticTests/types/mapping_enum_key_library_encoderV2.sol rename to test/libsolidity/semanticTests/types/mapping_enum_key_library_v2.sol index 50f50dbb1..c034e26ff 100644 --- a/test/libsolidity/semanticTests/types/mapping_enum_key_library_encoderV2.sol +++ b/test/libsolidity/semanticTests/types/mapping_enum_key_library_v2.sol @@ -1,4 +1,4 @@ -pragma experimental ABIEncoderV2; +pragma abicoder v2; enum E { A, B, C } library L { diff --git a/test/libsolidity/semanticTests/types/mapping_enum_key_v2.sol b/test/libsolidity/semanticTests/types/mapping_enum_key_v2.sol index abf9b7163..fd0ad3823 100644 --- a/test/libsolidity/semanticTests/types/mapping_enum_key_v2.sol +++ b/test/libsolidity/semanticTests/types/mapping_enum_key_v2.sol @@ -1,4 +1,4 @@ -pragma experimental ABIEncoderV2; +pragma abicoder v2; enum E { A, B, C } contract test { mapping(E => uint8) table; diff --git a/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol b/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol index 44186cf53..384db2946 100644 --- a/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol +++ b/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2.sol @@ -1,5 +1,5 @@ pragma experimental SMTChecker; -pragma experimental "ABIEncoderV2"; +pragma abicoder v2; contract C { struct S { uint x; uint[] b; } @@ -8,9 +8,9 @@ contract C { } } // ---- -// Warning 8364: (231-237): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (231-240): Assertion checker does not yet implement type type(uint256[] memory[2] memory) -// Warning 8364: (221-222): Assertion checker does not yet implement type type(struct C.S storage pointer) -// Warning 8364: (231-237): Assertion checker does not yet implement type type(uint256[] memory) -// Warning 8364: (231-240): Assertion checker does not yet implement type type(uint256[] memory[2] memory) -// Warning 8364: (221-222): Assertion checker does not yet implement type type(struct C.S storage pointer) +// Warning 8364: (215-221): Assertion checker does not yet implement type type(uint256[] memory) +// Warning 8364: (215-224): Assertion checker does not yet implement type type(uint256[] memory[2] memory) +// Warning 8364: (205-206): Assertion checker does not yet implement type type(struct C.S storage pointer) +// Warning 8364: (215-221): Assertion checker does not yet implement type type(uint256[] memory) +// Warning 8364: (215-224): Assertion checker does not yet implement type type(uint256[] memory[2] memory) +// Warning 8364: (205-206): Assertion checker does not yet implement type type(struct C.S storage pointer) diff --git a/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2_value_types.sol b/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2_value_types.sol index 0b48ec3b3..fa409befe 100644 --- a/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2_value_types.sol +++ b/test/libsolidity/smtCheckerTests/special/abi_decode_memory_v2_value_types.sol @@ -1,5 +1,5 @@ pragma experimental SMTChecker; -pragma experimental "ABIEncoderV2"; +pragma abicoder v2; contract C { function f(bytes memory data) public pure { @@ -9,5 +9,5 @@ contract C { } } // ---- -// Warning 2072: (139-146): Unused local variable. -// Warning 2072: (194-201): Unused local variable. +// Warning 2072: (123-130): Unused local variable. +// Warning 2072: (178-185): Unused local variable. diff --git a/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse.sol b/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse.sol index 855378e9e..f06b2458c 100644 --- a/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse.sol +++ b/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse.sol @@ -1,4 +1,4 @@ pragma abicoder v1; -pragma experimental ABIEncoderV2; +pragma abicoder v2; // ---- -// SyntaxError 8273: (20-53): ABI coder v1 has already been selected through "pragma abicoder v1". +// SyntaxError 3845: (20-39): ABI coder has already been selected for this source unit. diff --git a/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse_experimental.sol b/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse_experimental.sol new file mode 100644 index 000000000..855378e9e --- /dev/null +++ b/test/libsolidity/syntaxTests/abiEncoder/conflicting_settings_reverse_experimental.sol @@ -0,0 +1,4 @@ +pragma abicoder v1; +pragma experimental ABIEncoderV2; +// ---- +// SyntaxError 8273: (20-53): ABI coder v1 has already been selected through "pragma abicoder v1". diff --git a/test/libsolidity/syntaxTests/abiEncoder/select_v1_quoted_string.sol b/test/libsolidity/syntaxTests/abiEncoder/select_v1_quoted_string.sol new file mode 100644 index 000000000..77bdb9109 --- /dev/null +++ b/test/libsolidity/syntaxTests/abiEncoder/select_v1_quoted_string.sol @@ -0,0 +1 @@ +pragma abicoder "v1"; \ No newline at end of file diff --git a/test/libsolidity/syntaxTests/abiEncoder/select_v2_quoted_string.sol b/test/libsolidity/syntaxTests/abiEncoder/select_v2_quoted_string.sol new file mode 100644 index 000000000..4e18d4977 --- /dev/null +++ b/test/libsolidity/syntaxTests/abiEncoder/select_v2_quoted_string.sol @@ -0,0 +1 @@ +pragma abicoder "v2"; \ No newline at end of file diff --git a/test/libsolidity/syntaxTests/metaTypes/super_name.sol b/test/libsolidity/syntaxTests/metaTypes/super_name.sol index 120c60dd9..5b9ac73a1 100644 --- a/test/libsolidity/syntaxTests/metaTypes/super_name.sol +++ b/test/libsolidity/syntaxTests/metaTypes/super_name.sol @@ -1,4 +1,4 @@ -pragma experimental ABIEncoderV2; +pragma abicoder v2; function compareStrings(string memory s1, string memory s2) returns (bool) { return keccak256(abi.encodePacked(s1)) == keccak256(abi.encodePacked(s2)); @@ -50,4 +50,4 @@ contract D is B, C { } } // ---- -// TypeError 4259: (440-445): Invalid type for argument in the function call. A contract type or an integer type is required, but type(contract super B) provided. +// TypeError 4259: (426-431): Invalid type for argument in the function call. A contract type or an integer type is required, but type(contract super B) provided. diff --git a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_memory_v2.sol b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_memory_v2.sol index d8d2ceb66..3a776e036 100644 --- a/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_memory_v2.sol +++ b/test/libsolidity/syntaxTests/specialFunctions/abidecode/abi_decode_memory_v2.sol @@ -1,5 +1,4 @@ -pragma experimental "ABIEncoderV2"; - +pragma abicoder v2; contract C { struct S { uint x; uint[] b; } function f() public pure returns (S memory, bytes memory, uint[][2] memory) {