mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Explicitly set coder to v1 for syntax tests.
This commit is contained in:
+2
-1
@@ -1,7 +1,8 @@
|
||||
pragma abicoder v1;
|
||||
contract C {
|
||||
function f() public pure {
|
||||
abi.encodePacked([new uint[](5), new uint[](7)]);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9578: (69-99): Type not supported in packed mode.
|
||||
// TypeError 9578: (89-119): Type not supported in packed mode.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
pragma abicoder v1;
|
||||
contract C {
|
||||
function test() public pure {
|
||||
abi.encode([new uint[](5), new uint[](7)]);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 2056: (66-96): This type cannot be encoded.
|
||||
// TypeError 2056: (86-116): This type cannot be encoded.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
pragma abicoder v1;
|
||||
contract C {
|
||||
struct S { uint x; }
|
||||
S s;
|
||||
@@ -11,7 +12,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 2056: (131-132): This type cannot be encoded.
|
||||
// TypeError 2056: (134-135): This type cannot be encoded.
|
||||
// TypeError 9578: (200-201): Type not supported in packed mode.
|
||||
// TypeError 9578: (203-204): Type not supported in packed mode.
|
||||
// TypeError 2056: (151-152): This type cannot be encoded.
|
||||
// TypeError 2056: (154-155): This type cannot be encoded.
|
||||
// TypeError 9578: (220-221): Type not supported in packed mode.
|
||||
// TypeError 9578: (223-224): Type not supported in packed mode.
|
||||
|
||||
+2
-1
@@ -1,7 +1,8 @@
|
||||
pragma abicoder v1;
|
||||
contract C {
|
||||
function f() public pure {
|
||||
abi.decode("1234", (uint[][3]));
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9611: (72-81): Decoding type uint256[] memory[3] memory not supported.
|
||||
// TypeError 9611: (92-101): Decoding type uint256[] memory[3] memory not supported.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
pragma abicoder v1;
|
||||
struct S {
|
||||
uint x;
|
||||
}
|
||||
@@ -8,4 +9,4 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9611: (98-99): Decoding type struct S memory not supported.
|
||||
// TypeError 9611: (118-119): Decoding type struct S memory not supported.
|
||||
|
||||
Reference in New Issue
Block a user