mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #10795 from ethereum/improve-experimental-pragma-tests
Replace "pragma experimental ABIEncoderV2" in tests where appropriate
This commit is contained in:
commit
055c4b4d44
@ -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,
|
||||
|
@ -1,4 +1,4 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
pragma abicoder v2;
|
||||
|
||||
enum E { A, B, C }
|
||||
library L {
|
@ -1,4 +1,4 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
pragma abicoder v2;
|
||||
enum E { A, B, C }
|
||||
contract test {
|
||||
mapping(E => uint8) table;
|
||||
|
@ -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)
|
||||
|
@ -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.
|
||||
|
@ -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.
|
||||
|
@ -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".
|
@ -0,0 +1 @@
|
||||
pragma abicoder "v1";
|
@ -0,0 +1 @@
|
||||
pragma abicoder "v2";
|
@ -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.
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user