Merge pull request #3790 from ethereum/empty-structs

Disallow empty structs
This commit is contained in:
chriseth
2018-03-30 13:58:35 +02:00
committed by GitHub
7 changed files with 30 additions and 2 deletions
@@ -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.