mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #4736 from ethereum/removeFillRight
Remove remaining instances of ``fillRight``.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// This used to crash in certain compiler versions.
|
||||
contract CrashContract {
|
||||
struct S { uint a; }
|
||||
S x;
|
||||
function f() public {
|
||||
(x, x) = 1(x, x);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (170-177): Type is not callable
|
||||
// TypeError: (170-177): Type tuple() is not implicitly convertible to expected type tuple(struct CrashContract.S storage ref,struct CrashContract.S storage ref).
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
contract C {
|
||||
struct S { uint a; uint b; }
|
||||
S x; S y;
|
||||
function f() public {
|
||||
(,x, y) = (1, 2, y, x);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (89-101): Type tuple(int_const 1,int_const 2,struct C.S storage ref,struct C.S storage ref) is not implicitly convertible to expected type tuple(,struct C.S storage ref,struct C.S storage ref).
|
||||
// Warning: (79-101): This assignment performs two copies to storage. Since storage copies do not first copy to a temporary location, one of them might be overwritten before the second is executed and thus may have unexpected effects. It is safer to perform the copies separately or assign to storage pointers first.
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
contract C {
|
||||
struct S { uint a; uint b; }
|
||||
S x; S y;
|
||||
function f() public {
|
||||
(x, y, ) = (y, x, 1, 2);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (90-102): Type tuple(struct C.S storage ref,struct C.S storage ref,int_const 1,int_const 2) is not implicitly convertible to expected type tuple(struct C.S storage ref,struct C.S storage ref,).
|
||||
// Warning: (79-102): This assignment performs two copies to storage. Since storage copies do not first copy to a temporary location, one of them might be overwritten before the second is executed and thus may have unexpected effects. It is safer to perform the copies separately or assign to storage pointers first.
|
||||
Reference in New Issue
Block a user