mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
a211b89118
This patch enfoces an error when it encounters an empty struct, effectively eliminating the deprecation warning. Also adjust 419_interface_structs to explicitely test for (non-empty) structs, as this behaviour "may" change in the future.
17 lines
491 B
Solidity
17 lines
491 B
Solidity
contract C {
|
|
struct S { uint x; }
|
|
S s;
|
|
struct T { uint y; }
|
|
T t;
|
|
enum A { X, Y }
|
|
function f() public pure {
|
|
bool a = address(this).delegatecall(S, A, A.X, T, uint, uint[]);
|
|
}
|
|
}
|
|
// ----
|
|
// TypeError: (176-177): This type cannot be encoded.
|
|
// TypeError: (179-180): This type cannot be encoded.
|
|
// TypeError: (187-188): This type cannot be encoded.
|
|
// TypeError: (190-194): This type cannot be encoded.
|
|
// TypeError: (196-202): This type cannot be encoded.
|