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:
@@ -6,5 +6,7 @@ contract C {
|
||||
return (s.a, s.b);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f((uint256,uint256)): 42, 23 -> 42, 23
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
contract C {
|
||||
struct S {
|
||||
uint256 a;
|
||||
bool x;
|
||||
}
|
||||
|
||||
function s() public returns(S memory)
|
||||
{
|
||||
return S({x: true, a: 8});
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// s() -> 8, true
|
||||
@@ -28,5 +28,7 @@ contract Test {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 1, 2, 3
|
||||
|
||||
@@ -38,5 +38,7 @@ contract Test {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 1, 2, 3, 4
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
contract C {
|
||||
struct I {
|
||||
uint b;
|
||||
uint c;
|
||||
function(uint) external returns (uint) x;
|
||||
}
|
||||
struct S {
|
||||
I a;
|
||||
}
|
||||
|
||||
function o(uint a) external returns(uint) { return a+1; }
|
||||
|
||||
function f() external returns (uint) {
|
||||
S memory s = S(I(1,2, this.o));
|
||||
return s.a.x(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 2
|
||||
@@ -0,0 +1,18 @@
|
||||
contract C {
|
||||
struct I {
|
||||
uint b;
|
||||
uint c;
|
||||
}
|
||||
struct S {
|
||||
I a;
|
||||
}
|
||||
|
||||
function f() external returns (uint) {
|
||||
S memory s = S(I(1,2));
|
||||
return s.a.b;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 1
|
||||
@@ -0,0 +1,14 @@
|
||||
contract C {
|
||||
struct S {
|
||||
uint a;
|
||||
}
|
||||
|
||||
function f() external returns (uint) {
|
||||
S memory s = S(1);
|
||||
return s.a;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> 1
|
||||
@@ -27,6 +27,8 @@ contract test {
|
||||
data.recursive[4].z = 9;
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// check() -> false
|
||||
// set() ->
|
||||
|
||||
Reference in New Issue
Block a user