mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9862 from ethereum/develop
Merge develop into breaking
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
contract test {
|
||||
function f(uint a, bool b, bytes memory c, uint d, bool e) public returns (uint r) {
|
||||
if (b && !e)
|
||||
r = a + d;
|
||||
else
|
||||
r = c.length;
|
||||
}
|
||||
function g() public returns (uint r) {
|
||||
r = f({c: "abc", x: 1, e: 2, a: 11, b: 12});
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 4974: (249-288): Named argument "x" does not match function declaration.
|
||||
@@ -13,6 +13,8 @@ contract b {
|
||||
}
|
||||
// ----
|
||||
// Warning 7325: (66-67): Type struct b.c covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (66-67): Type uint256[14474011154664524427946373126085988481658748083205070504932198000989141204992] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (111-112): Type struct b.c covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (111-112): Type uint256[14474011154664524427946373126085988481658748083205070504932198000989141204992] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (152-169): Type function ()[984770902183611232881] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 2072: (152-180): Unused local variable.
|
||||
|
||||
@@ -56,13 +56,19 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// Warning 7325: (106-108): Type struct C.S0 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (106-108): Type struct C.P[101] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (171-173): Type struct C.S1 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (171-173): Type struct C.P[102] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (341-343): Type struct C.P[103] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (341-343): Type struct C.P[104] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (505-507): Type uint256[100000000000000000002] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (505-507): Type uint256[100000000000000000004] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (505-507): Type struct C.Q0 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (505-507): Type uint256[1][][100000000000000000001] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (505-507): Type uint256[][100000000000000000003] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (505-507): Type uint256[100000000000000000004] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (505-507): Type uint256[100000000000000000002] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (576-578): Type struct C.Q1 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (576-578): Type uint256[1][][100000000000000000005] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (647-649): Type uint256[100000000000000000006] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (715-717): Type struct C.Q3 covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (715-717): Type uint256[][100000000000000000007] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (783-785): Type uint256[100000000000000000008] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
|
||||
@@ -4,5 +4,5 @@ contract C {
|
||||
uint[2**255][2] a;
|
||||
}
|
||||
// ----
|
||||
// TypeError 7676: (60-97): Contract too large for storage.
|
||||
// TypeError 7676: (60-97): Contract requires too much storage.
|
||||
// TypeError 1534: (77-94): Type too large for storage.
|
||||
|
||||
@@ -5,4 +5,4 @@ contract C {
|
||||
uint[2**255] b;
|
||||
}
|
||||
// ----
|
||||
// TypeError 7676: (60-114): Contract too large for storage.
|
||||
// TypeError 7676: (60-114): Contract requires too much storage.
|
||||
|
||||
@@ -7,4 +7,4 @@ contract D is C {
|
||||
uint[2**255] b;
|
||||
}
|
||||
// ----
|
||||
// TypeError 7676: (95-134): Contract too large for storage.
|
||||
// TypeError 7676: (95-134): Contract requires too much storage.
|
||||
|
||||
@@ -8,5 +8,5 @@ contract C {
|
||||
S s;
|
||||
}
|
||||
// ----
|
||||
// TypeError 7676: (60-152): Contract too large for storage.
|
||||
// TypeError 7676: (60-152): Contract requires too much storage.
|
||||
// TypeError 1534: (146-149): Type too large for storage.
|
||||
|
||||
@@ -4,3 +4,4 @@ contract C {
|
||||
}
|
||||
// ----
|
||||
// Warning 7325: (64-65): Type struct C.S covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
// Warning 7325: (64-65): Type uint256[57896044618658097711785492504343953926634992332820282019728792003956564819968] covers a large part of storage and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
contract test {
|
||||
function a(uint a, uint b) public returns (uint r) {
|
||||
r = a + b;
|
||||
}
|
||||
function b() public returns (uint r) {
|
||||
r = a({a: 1, c: 2});
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 2519: (31-37): This declaration shadows an existing declaration.
|
||||
// TypeError 4974: (153-168): Named argument "c" does not match function declaration.
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
abi.encodePacked([new uint[](5), new uint[](7)]);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9578: (69-99): Type not supported in packed mode.
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract C {
|
||||
function f() public pure {
|
||||
abi.encodePacked([new uint[](5), new uint[](7)]);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9578: (104-134): Type not supported in packed mode.
|
||||
@@ -0,0 +1,7 @@
|
||||
contract C {
|
||||
function test() public pure {
|
||||
abi.encode([new uint[](5), new uint[](7)]);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 2056: (66-96): This type cannot be encoded.
|
||||
@@ -0,0 +1,9 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract C {
|
||||
function f() public pure {
|
||||
abi.encode([new uint[](5), new uint[](7)]);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6133: (87-129): Statement has no effect.
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
abi.decode("1234", (uint[][3]));
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9611: (72-81): Decoding type uint256[] memory[3] memory not supported.
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract C {
|
||||
function f() public pure {
|
||||
abi.decode("1234", (uint[][3]));
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6133: (87-118): Statement has no effect.
|
||||
@@ -0,0 +1,11 @@
|
||||
struct S {
|
||||
uint x;
|
||||
}
|
||||
|
||||
contract C {
|
||||
function f() public pure {
|
||||
abi.decode("1234", (S));
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 9611: (98-99): Decoding type struct S memory not supported.
|
||||
@@ -0,0 +1,13 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
struct S {
|
||||
uint x;
|
||||
}
|
||||
|
||||
contract C {
|
||||
function f() public pure {
|
||||
abi.decode("1234", (S));
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning 6133: (113-136): Statement has no effect.
|
||||
Reference in New Issue
Block a user