mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #3790 from ethereum/empty-structs
Disallow empty structs
This commit is contained in:
@@ -7289,7 +7289,7 @@ BOOST_AUTO_TEST_CASE(modifiers_access_storage_pointer)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract C {
|
||||
struct S { }
|
||||
struct S { uint a; }
|
||||
modifier m(S storage x) {
|
||||
x;
|
||||
_;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
contract test {
|
||||
struct A {}
|
||||
}
|
||||
// ----
|
||||
// Warning: Defining empty structs is deprecated.
|
||||
@@ -0,0 +1,6 @@
|
||||
pragma experimental "v0.5.0";
|
||||
contract test {
|
||||
struct A {}
|
||||
}
|
||||
// ----
|
||||
// SyntaxError: Defining empty structs is disallowed.
|
||||
Reference in New Issue
Block a user