mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into breaking
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
contract C {
|
||||
function f() pure external {
|
||||
assembly {
|
||||
let s := returndatasize()
|
||||
returndatacopy(0, 0, s)
|
||||
}
|
||||
}
|
||||
function g() view external returns (uint ret) {
|
||||
assembly {
|
||||
ret := staticcall(0, gas(), 0, 0, 0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// EVMVersion: >=byzantium
|
||||
// ----
|
||||
@@ -0,0 +1,21 @@
|
||||
contract C {
|
||||
function f() pure external {
|
||||
assembly {
|
||||
let s := returndatasize()
|
||||
returndatacopy(0, 0, s)
|
||||
}
|
||||
}
|
||||
function g() view external returns (uint ret) {
|
||||
assembly {
|
||||
ret := staticcall(0, gas(), 0, 0, 0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// EVMVersion: =homestead
|
||||
// ----
|
||||
// TypeError 7756: (86-100): The "returndatasize" instruction is only available for Byzantium-compatible VMs (you are currently compiling for "homestead").
|
||||
// DeclarationError 3812: (77-102): Variable count mismatch: 1 variables and 0 values.
|
||||
// TypeError 7756: (115-129): The "returndatacopy" instruction is only available for Byzantium-compatible VMs (you are currently compiling for "homestead").
|
||||
// TypeError 1503: (245-255): The "staticcall" instruction is only available for Byzantium-compatible VMs (you are currently compiling for "homestead").
|
||||
// DeclarationError 8678: (238-277): Variable count does not match number of values (1 vs. 0)
|
||||
@@ -0,0 +1,17 @@
|
||||
contract C {
|
||||
function f() view external returns (uint ret) {
|
||||
assembly {
|
||||
ret := shl(gas(), 5)
|
||||
ret := shr(ret, 2)
|
||||
ret := sar(ret, 2)
|
||||
}
|
||||
}
|
||||
function g() external returns (address ret) {
|
||||
assembly {
|
||||
ret := create2(0, 0, 0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// EVMVersion: >=constantinople
|
||||
// ----
|
||||
@@ -0,0 +1,25 @@
|
||||
contract C {
|
||||
function f() view external returns (uint ret) {
|
||||
assembly {
|
||||
ret := shl(gas(), 5)
|
||||
ret := shr(ret, 2)
|
||||
ret := sar(ret, 2)
|
||||
}
|
||||
}
|
||||
function g() external returns (address ret) {
|
||||
assembly {
|
||||
ret := create2(0, 0, 0, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// EVMVersion: =byzantium
|
||||
// ----
|
||||
// TypeError 6612: (103-106): The "shl" instruction is only available for Constantinople-compatible VMs (you are currently compiling for "byzantium").
|
||||
// DeclarationError 8678: (96-116): Variable count does not match number of values (1 vs. 0)
|
||||
// TypeError 6612: (136-139): The "shr" instruction is only available for Constantinople-compatible VMs (you are currently compiling for "byzantium").
|
||||
// DeclarationError 8678: (129-147): Variable count does not match number of values (1 vs. 0)
|
||||
// TypeError 6612: (167-170): The "sar" instruction is only available for Constantinople-compatible VMs (you are currently compiling for "byzantium").
|
||||
// DeclarationError 8678: (160-178): Variable count does not match number of values (1 vs. 0)
|
||||
// TypeError 6166: (283-290): The "create2" instruction is only available for Constantinople-compatible VMs (you are currently compiling for "byzantium").
|
||||
// DeclarationError 8678: (276-302): Variable count does not match number of values (1 vs. 0)
|
||||
+2
-2
@@ -13,7 +13,7 @@ contract C {
|
||||
// ====
|
||||
// EVMVersion: =petersburg
|
||||
// ----
|
||||
// TypeError 7079: (101-108): The "chainid" instruction is only available for Istanbul-compatible VMs (you are currently compiling for "petersburg").
|
||||
// TypeError 1561: (101-108): The "chainid" instruction is only available for Istanbul-compatible VMs (you are currently compiling for "petersburg").
|
||||
// DeclarationError 8678: (95-110): Variable count does not match number of values (1 vs. 0)
|
||||
// TypeError 7079: (215-226): The "selfbalance" instruction is only available for Istanbul-compatible VMs (you are currently compiling for "petersburg").
|
||||
// TypeError 3672: (215-226): The "selfbalance" instruction is only available for Istanbul-compatible VMs (you are currently compiling for "petersburg").
|
||||
// DeclarationError 8678: (209-228): Variable count does not match number of values (1 vs. 0)
|
||||
@@ -0,0 +1,10 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
pop(linkersymbol("contract/library.sol:L"))
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// DeclarationError 4619: (67-79): Function not found.
|
||||
// TypeError 3950: (67-105): Expected expression to evaluate to one value, but got 0 values instead.
|
||||
@@ -0,0 +1,10 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
function linkersymbol(a) {}
|
||||
|
||||
linkersymbol("contract/library.sol:L")
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
mapping(uint => uint[2**100]) x;
|
||||
}
|
||||
// ----
|
||||
// Warning 7325: (17-48): Type uint256[1267650600228229401496703205376] has large size and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
@@ -0,0 +1,4 @@
|
||||
contract C {
|
||||
uint[200][200][2**30][][2**30] x;
|
||||
}
|
||||
// ----
|
||||
@@ -0,0 +1,65 @@
|
||||
contract C {
|
||||
struct P { uint256[2**63] x; }
|
||||
|
||||
struct S0 {
|
||||
P[2**62] x;
|
||||
P y;
|
||||
}
|
||||
S0 s0;
|
||||
|
||||
struct S1 {
|
||||
P x;
|
||||
P[2**62] y;
|
||||
}
|
||||
S1 s1;
|
||||
|
||||
struct S2 {
|
||||
mapping(uint => P[2**62]) x;
|
||||
mapping(uint => P[2**62]) y;
|
||||
mapping(uint => S2) z;
|
||||
}
|
||||
S2 s2;
|
||||
|
||||
struct Q0
|
||||
{
|
||||
uint[1][][2**65] x;
|
||||
uint[2**65][][1] y;
|
||||
uint[][2**65] z;
|
||||
uint[2**65][] t;
|
||||
}
|
||||
Q0 q0;
|
||||
|
||||
struct Q1
|
||||
{
|
||||
uint[1][][2**65] x;
|
||||
}
|
||||
Q1 q1;
|
||||
|
||||
struct Q2
|
||||
{
|
||||
uint[2**65][][1] y;
|
||||
}
|
||||
Q2 q2;
|
||||
|
||||
struct Q3
|
||||
{
|
||||
uint[][2**65] z;
|
||||
}
|
||||
Q3 q3;
|
||||
|
||||
struct Q4
|
||||
{
|
||||
uint[2**65][] t;
|
||||
}
|
||||
Q4 q4;
|
||||
}
|
||||
// ----
|
||||
// Warning 3408: (108-113): Variable 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 3408: (175-180): Variable 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: (314-319): Type C.P[4611686018427387904] has large size 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 3408: (458-463): Variable 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: (458-463): Type uint256[36893488147419103232] has large size 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 3408: (524-529): Variable 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: (590-595): Type uint256[36893488147419103232] has large size 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 3408: (653-658): Variable 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: (716-721): Type uint256[36893488147419103232] has large size and thus makes collisions likely. Either use mappings or dynamic arrays and allow their size to be increased only in small quantities per transaction.
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
contract C {
|
||||
uint[200][200][2**30][][2**30] x;
|
||||
}
|
||||
// ----
|
||||
// Warning 3408: (17-49): Variable 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.
|
||||
@@ -1,5 +0,0 @@
|
||||
contract C {
|
||||
mapping(uint => uint[2**100]) x;
|
||||
}
|
||||
// ----
|
||||
// Warning 3408: (17-48): Variable 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.
|
||||
@@ -3,4 +3,4 @@ abstract contract C {
|
||||
function vote(uint id) public {}
|
||||
}
|
||||
// ----
|
||||
// DocstringParsingError 9222: End of tag @param not found
|
||||
// DocstringParsingError 3335: No param name given
|
||||
|
||||
Reference in New Issue
Block a user